From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Date: Mon, 26 May 2008 07:30:16 +0000 Subject: Re: [RFC] Implement simple messages in blktrace stream Message-Id: <20080526073016.GC7712@kernel.dk> List-Id: References: <48372A83.9040204@hp.com> In-Reply-To: <48372A83.9040204@hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-btrace@vger.kernel.org On Fri, May 23 2008, Alan D. Brunelle wrote: > The following two patches (kernel + application) would allow one to > annotate parts of the blktrace stream w/ simple messages. > > I've included a sample one for elevator switches: > > 8,16 1 813055 20.259000000 4692 I R 3088320 + 8 [dd] > 8,16 1 813056 20.259000000 4692 Q R 3088328 + 8 [dd] > 8,16 1 20.259000000 0 m N elv switch: deadline > 8,16 1 813057 20.259000000 4692 G R 3088328 + 8 [dd] > 8,16 1 813058 20.259000000 4692 I R 3088328 + 8 [dd] > > These patches are a bit rough (but compile, and appear to work ok so > far). In particular, I'd break the kernel patch into a blktrace addition > and an elevator switch addition, plus the application patch would need > documentation updates. > > My nefarious ultimate goal would be to add in the ability for user-level > insertions for (e.g.): > > 1. Start blktrace > 2. Do some stuff... > 3. Insert a tag "switching to other stuff" > 4. Do other stuff > 5. Insert a tag "switching to yet other stuff" > 6. Do yet other stuff > > This way you could study different parts of the resultant traces using > the tags to separate them time-wise. [For now, I'd just switch > schedulers back and forth to see the separators.) > > Looking for comments (hence the RFC). Great stuff, I've done custom trace events and processing before so it's really nice to have it generalized here. Thanks Alan! -- Jens Axboe