• Adrian Hunter's avatar
    perf record: Set timestamp boundary for AUX area events · 66286ed3
    Adrian Hunter authored
    AUX area data is not processed by 'perf record' and consequently the
     --timestamp-boundary option may result in no values for "time of first
    sample" and "time of last sample". However there are non-sample events
    that can be used instead, namely 'itrace_start' and 'aux'.
    'itrace_start' is issued before tracing starts, and 'aux' is issued
    every time data is ready.
    
    Implement tool callbacks for those two for 'perf record', to update the
    timestamp boundary.
    
    Example:
    
     $ perf record -e intel_pt//u --timestamp-boundary uname
     Linux
     [ perf record: Woken up 1 times to write data ]
     [ perf record: Captured and wrote 0.022 MB perf.data ]
     $ perf script --header-only | grep "time of"
     # time of first sample : 4574.835541
     # time of last sample : 4574.835907
     $ perf script --itrace=be -F-ip | head -1
               uname 13752 [001]  4574.835589:          1 branches:uH:
     $ perf script --itrace=be -F-ip | tail -1
               uname 13752 [001]  4574.835867:          1 branches:uH:
     $
    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Acked-by: default avatarAndi Kleen <ak@linux.intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Link: http://lore.kernel.org/lkml/20210503064222.5319-1-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    66286ed3
builtin-record.c 77.9 KB