aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-03-25 05:18:56 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-31 11:26:47 -0400
commit6c051ce0307526adec32a847f0daa1af2124f0a9 (patch)
treece7317e18bf9bdd379e73782771761e4c24a156c /kernel/trace
parent093419971e03362a00f499960557c119982ea09f (diff)
blktrace: fix timestamp in binary output
I found the timestamp is wrong: # echo bin > trace_option # echo blk > current_tracer # cat trace_pipe | blkparse -i - 8,0 0 0 0.000000000 504 A W ... ... 8,7 1 0 0.008534097 0 C R ... (should be 8.534097xxx) user-space blkparse expects the timestamp to be nanosecond. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: 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> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/blktrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 6fb274f5f34e..ee7a8bb8b1e8 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -1168,7 +1168,7 @@ static int blk_trace_synthesize_old_trace(struct trace_iterator *iter)
1168 const int offset = offsetof(struct blk_io_trace, sector); 1168 const int offset = offsetof(struct blk_io_trace, sector);
1169 struct blk_io_trace old = { 1169 struct blk_io_trace old = {
1170 .magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION, 1170 .magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION,
1171 .time = ns2usecs(iter->ts), 1171 .time = iter->ts,
1172 }; 1172 };
1173 1173
1174 if (!trace_seq_putmem(s, &old, offset)) 1174 if (!trace_seq_putmem(s, &old, offset))