• Li Zefan's avatar
    blktrace: print out BLK_TN_MESSAGE properly · 18cea459
    Li Zefan authored
    Impact: improve ftrace plugin output
    
    Before this patch:
    
     # cat trace
             make-5383  [001]   741.240059:   8,7    P   N [make]
     __trace_note_message: cfq1074
    
     # echo 1 > options/blk_classic
     # cat trace
       8,7    1     0.692221252     0  C   W 130411392 + 1024 [0]
     Bad pc action 6361
     Bad pc action 283d
    
     # echo 0 > options/blk_classic
     # echo bin > trace_options
     # cat trace_pipe | blkparse -i -
     (can't parse messages generated by blk_add_trace_msg())
    
    After this patch:
     # cat trace
          <idle>-0     [001]   187.600933:   8,7    C   W 145220224 + 8 [0]
          <idle>-0     [001]   187.600946:   8,7    m   N cfq1076 complete
    
     # echo 1 > options/blk_classic
     # cat trace
       8,7    1     0.256378996   238  I   W 113190728 + 8 [pdflush]
       8,7    1     0.256378998   238  m   N cfq1076 insert_request
    
     # echo 0 > options/blk_classic
     # echo bin > trace_options
     # cat trace_pipe | blkparse -i -
      8,7    1        0    22.973250293     0  C   W 102770576 + 8 [0]
      8,7    1        0    22.973259213     0  m   N cfq1076 complete
    Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
    Acked-by: default avatarJens 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: default avatarIngo Molnar <mingo@elte.hu>
    18cea459
blktrace.c 36.4 KB