public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, hpa@zytor.com,
	mingo@redhat.com, lizf@cn.fujitsu.com, jens.axboe@oracle.com,
	fweisbec@gmail.com, rostedt@goodmis.org, tglx@linutronix.de,
	mingo@elte.hu
Subject: [tip:tracing/blktrace] blktrace: make classic output more classic
Date: Sat, 28 Mar 2009 21:27:53 GMT	[thread overview]
Message-ID: <tip-4a80b7286d8aff20d447977451622cdc01adb127@git.kernel.org> (raw)
In-Reply-To: <49CC37C2.7050307@cn.fujitsu.com>

Commit-ID:  4a80b7286d8aff20d447977451622cdc01adb127
Gitweb:     http://git.kernel.org/tip/4a80b7286d8aff20d447977451622cdc01adb127
Author:     Li Zefan <lizf@cn.fujitsu.com>
AuthorDate: Fri, 27 Mar 2009 10:19:46 +0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 28 Mar 2009 12:51:40 +0100

blktrace: make classic output more classic

Impact: fix ftrace plugin timestamp output

In the classic user-space blktrace, the output timestamp is sec.nsec
not sec.usec.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <49CC37C2.7050307@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 kernel/trace/blktrace.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index d43cdac..5b28f0f 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -994,8 +994,8 @@ static void get_pdu_remap(const struct trace_entry *ent,
 static int blk_log_action_iter(struct trace_iterator *iter, const char *act)
 {
 	char rwbs[6];
-	unsigned long long ts  = ns2usecs(iter->ts);
-	unsigned long usec_rem = do_div(ts, USEC_PER_SEC);
+	unsigned long long ts  = iter->ts;
+	unsigned long nsec_rem = do_div(ts, NSEC_PER_SEC);
 	unsigned secs	       = (unsigned long)ts;
 	const struct trace_entry *ent = iter->ent;
 	const struct blk_io_trace *t = (const struct blk_io_trace *)ent;
@@ -1003,9 +1003,9 @@ static int blk_log_action_iter(struct trace_iterator *iter, const char *act)
 	fill_rwbs(rwbs, t);
 
 	return trace_seq_printf(&iter->seq,
-				"%3d,%-3d %2d %5d.%06lu %5u %2s %3s ",
+				"%3d,%-3d %2d %5d.%09lu %5u %2s %3s ",
 				MAJOR(t->device), MINOR(t->device), iter->cpu,
-				secs, usec_rem, ent->pid, act, rwbs);
+				secs, nsec_rem, ent->pid, act, rwbs);
 }
 
 static int blk_log_action_seq(struct trace_seq *s, const struct blk_io_trace *t,

  parent reply	other threads:[~2009-03-28 21:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27  2:19 [PATCH 0/6] blktrace: last round of fixes Li Zefan
2009-03-27  2:19 ` [PATCH 1/6] blktrace: make classic output more classic Li Zefan
2009-03-27  3:30   ` Li Zefan
2009-03-28 21:27   ` Li Zefan [this message]
2009-03-30  1:19   ` [tip:tracing/blktrace] " Li Zefan
2009-03-27  2:20 ` [PATCH 2/6] blktrace: fix blk_probes_ref chaos Li Zefan
2009-03-28 21:28   ` [tip:tracing/blktrace] " Li Zefan
2009-03-30  1:19   ` Li Zefan
2009-03-27  2:20 ` [PATCH 3/6] blktrace: fix memory leak when freeing struct blk_io_trace Li Zefan
2009-03-28 21:28   ` [tip:tracing/blktrace] " Li Zefan
2009-03-30  1:19   ` Li Zefan
2009-03-27  2:21 ` [PATCH 4/6] trace: make argument 'mem' of trace_seq_putmem() const Li Zefan
2009-03-28 21:28   ` [tip:tracing/blktrace] " Li Zefan
2009-03-30  1:20   ` Li Zefan
2009-03-27  2:21 ` [PATCH 5/6] blktrace: extract duplidate code Li Zefan
2009-03-28 21:28   ` [tip:tracing/blktrace] " Li Zefan
2009-03-30  1:20   ` Li Zefan
2009-03-27  2:21 ` [PATCH 6/6] blktrace: print out BLK_TN_MESSAGE properly Li Zefan
2009-03-28 21:28   ` [tip:tracing/blktrace] " Li Zefan
2009-03-30  1:20   ` Li Zefan

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=tip-4a80b7286d8aff20d447977451622cdc01adb127@git.kernel.org \
    --to=lizf@cn.fujitsu.com \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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