]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
blktrace: fix timestamp in binary output
authorLi Zefan <lizf@cn.fujitsu.com>
Wed, 25 Mar 2009 09:18:56 +0000 (17:18 +0800)
committerIngo Molnar <mingo@elte.hu>
Tue, 31 Mar 2009 15:26:47 +0000 (17:26 +0200)
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>
kernel/trace/blktrace.c

index 6fb274f5f34e47219ed5d5af45bbdf279364bf02..ee7a8bb8b1e8e292d733f20f1c398c7a30b1a2c1 100644 (file)
@@ -1168,7 +1168,7 @@ static int blk_trace_synthesize_old_trace(struct trace_iterator *iter)
        const int offset = offsetof(struct blk_io_trace, sector);
        struct blk_io_trace old = {
                .magic    = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION,
-               .time     = ns2usecs(iter->ts),
+               .time     = iter->ts,
        };
 
        if (!trace_seq_putmem(s, &old, offset))