linux-btrace.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Peschke <mpeschke@linux.vnet.ibm.com>
To: linux-btrace@vger.kernel.org
Subject: [Patch] blkparse: add hint for discarded drv_data traces
Date: Fri, 17 Oct 2008 13:06:24 +0000	[thread overview]
Message-ID: <1224248784.4348.7.camel@kitka.ibm.com> (raw)

From: Martin Peschke <mpeschke@linux.vnet.ibm.com>

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>

---
 blkparse.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- 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_
 			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);



             reply	other threads:[~2008-10-17 13:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17 13:06 Martin Peschke [this message]
2008-10-17 13:08 ` [Patch] blkparse: add hint for discarded drv_data traces Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1224248784.4348.7.camel@kitka.ibm.com \
    --to=mpeschke@linux.vnet.ibm.com \
    --cc=linux-btrace@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).