Skip to content

Commit 6c051ce

Browse files
Li ZefanIngo Molnar
authored andcommitted
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 <[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]>
1 parent 0934199 commit 6c051ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/blktrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ static int blk_trace_synthesize_old_trace(struct trace_iterator *iter)
11681168
const int offset = offsetof(struct blk_io_trace, sector);
11691169
struct blk_io_trace old = {
11701170
.magic = BLK_IO_TRACE_MAGIC | BLK_IO_TRACE_VERSION,
1171-
.time = ns2usecs(iter->ts),
1171+
.time = iter->ts,
11721172
};
11731173

11741174
if (!trace_seq_putmem(s, &old, offset))

0 commit comments

Comments
 (0)