lkml.org 
[lkml]   [2009]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/3] 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>
    ---
    kernel/trace/blktrace.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
    index 6fb274f..ee7a8bb 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)
    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))
    --
    1.5.4.rc3



    \
     
     \ /
      Last update: 2009-03-25 10:21    [W:0.022 / U:87.808 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site