summaryrefslogtreecommitdiff
path: root/blkparse.c
diff options
context:
space:
mode:
authorMartin Peschke <mpeschke@linux.vnet.ibm.com>2008-10-17 15:09:05 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-10-17 15:09:05 +0200
commitc701176c4befb44efe68e3b5e09ca710b4be357d (patch)
tree2b517bb39535970d700408e7219511bee943b71b /blkparse.c
parent2baef5087c57d39ee2fc488cd52348f61f32b1fc (diff)
downloadblktrace-c701176c4befb44efe68e3b5e09ca710b4be357d.tar.gz
blktrace-c701176c4befb44efe68e3b5e09ca710b4be357d.tar.bz2
blkparse: add hint for discarded drv_data traces
Display an informational message on blkparse exit to notify users that additional data was available which would require to be dumped to binary output. Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'blkparse.c')
-rw-r--r--blkparse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/blkparse.c b/blkparse.c
index 24e2d92..3177a41 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -292,6 +292,8 @@ static volatile int done;
struct timespec abs_start_time;
static unsigned long long start_timestamp;
+static int have_drv_data = 0;
+
#define JHASH_RANDOM (0x3af5f2ee)
#define CPUS_PER_LONG (8 * sizeof(unsigned long))
@@ -1584,6 +1586,7 @@ static void dump_trace_fs(struct blk_io_trace *t, struct per_dev_info *pdi,
log_generic(pci, t, "A");
break;
case __BLK_TA_DRV_DATA:
+ have_drv_data = 1;
/* dump to binary file only */
break;
default:
@@ -2844,6 +2847,10 @@ int main(int argc, char *argv[])
if (!ret)
show_stats();
+ if (have_drv_data && !dump_binary)
+ printf("\ndiscarded traces containing low-level device driver "
+ "specific data (only available in binary output)\n");
+
if (ofp_buffer) {
fflush(ofp);
free(ofp_buffer);