Skip to content

Commit

Permalink
blktrace: fix timestamp in binary output
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jens Axboe <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Mar 31, 2009
1 parent 0934199 commit 6c051ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 6c051ce

Please sign in to comment.