Linux s390 Architecture development
 help / color / mirror / Atom feed
* [Patch 3/3] driver data: add support to blktrace user space code
@ 2008-07-16 11:26 Martin Peschke
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Peschke @ 2008-07-16 11:26 UTC (permalink / raw)
  To: linux-s390, linux-btrace

Adds a new type of action 'drv_data' for blktrace to handle binary
driver-specific data. Since the data is binary, blkparse will only put it in
a binary file, not in the regular human-readable output.


Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
---
 act_mask.c     |    1 +
 blkparse.c     |    3 +++
 blktrace_api.h |    5 ++++-
 3 files changed, 8 insertions(+), 1 deletion(-)

--- a/act_mask.c
+++ b/act_mask.c
@@ -25,6 +25,7 @@ static struct mask_map mask_maps[] = {
 	DECLARE_MASK_MAP(PC),
 	DECLARE_MASK_MAP(AHEAD),
 	DECLARE_MASK_MAP(META),
+	DECLARE_MASK_MAP(DRV_DATA),
 };
 
 int find_mask_map(char *string)
--- a/blktrace_api.h
+++ b/blktrace_api.h
@@ -7,7 +7,7 @@
  * Trace categories
  */
 enum {
-	BLK_TC_READ	= 1 << 0,	/* reads */
+	BLK_TC_READ 	= 1 << 0,	/* reads */
 	BLK_TC_WRITE	= 1 << 1,	/* writes */
 	BLK_TC_BARRIER	= 1 << 2,	/* barrier */
 	BLK_TC_SYNC	= 1 << 3,	/* sync */
@@ -20,6 +20,7 @@ enum {
 	BLK_TC_NOTIFY	= 1 << 10,	/* special message */
 	BLK_TC_AHEAD	= 1 << 11,	/* readahead */
 	BLK_TC_META	= 1 << 12,	/* metadata */
+	BLK_TC_DRV_DATA	= 1 << 13,	/* binary driver data */
 
 	BLK_TC_END	= 1 << 15,	/* only 16-bits, reminder */
 };
@@ -46,6 +47,7 @@ enum {
 	__BLK_TA_SPLIT,			/* bio was split */
 	__BLK_TA_BOUNCE,		/* bio was bounced */
 	__BLK_TA_REMAP,			/* bio was remapped */
+	__BLK_TA_DRV_DATA,		/* binary driver data */
 };
 
 /*
@@ -75,6 +77,7 @@ enum blktrace_notify {
 #define BLK_TA_SPLIT		(__BLK_TA_SPLIT)
 #define BLK_TA_BOUNCE		(__BLK_TA_BOUNCE)
 #define BLK_TA_REMAP		(__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE))
+#define BLK_TA_DRV_DATA	(__BLK_TA_DRV_DATA | BLK_TC_ACT(BLK_TC_DRV_DATA))
 
 #define BLK_TN_PROCESS		(__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
 #define BLK_TN_TIMESTAMP	(__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
--- a/blkparse.c
+++ b/blkparse.c
@@ -1583,6 +1583,9 @@ static void dump_trace_fs(struct blk_io_
 		case __BLK_TA_REMAP:
 			log_generic(pci, t, "A");
 			break;
+		case __BLK_TA_DRV_DATA:
+			// dump to binary file only
+			break;
 		default:
 			fprintf(stderr, "Bad fs action %x\n", t->action);
 			break;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch 3/3] driver data: add support to blktrace user space code
       [not found] <1224146144.8197.8.camel@kitka.ibm.com>
@ 2008-10-16  8:53 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2008-10-16  8:53 UTC (permalink / raw)
  To: linux-s390, linux-btrace

On Thu, Oct 16 2008, Martin Peschke wrote:
> 
> On Thu, 2008-10-16 at 08:07 +0200, Jens Axboe wrote:
> > On Sun, Oct 05 2008, Martin Peschke wrote:
> > > From: Stefan Raspl <raspl@linux.vnet.ibm.com>
> > > 
> > > Adds a new type of action 'drv_data' for blktrace to handle binary
> > > driver-specific data. Since the data is binary, blkparse will only put it in
> > > a binary file, not in the regular human-readable output.
> > 
> > I wonder if that should display some kind of informational message on
> > blkparse exit, if you are not dumping binary? Just to notify the user
> > that there was extra data available, but that it wasn't dumped.
> 
> Don't know.
> 
> But I can volunteer to send a patch if you think so.

I think it would be beneficial, so if you could that would be great ;)

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-16  8:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1224146144.8197.8.camel@kitka.ibm.com>
2008-10-16  8:53 ` [Patch 3/3] driver data: add support to blktrace user space code Jens Axboe
2008-07-16 11:26 Martin Peschke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox