• Andi Kleen's avatar
    perf report: Fix --ns time sort key output · 3dab6ac0
    Andi Kleen authored
    If the user specified --ns, the column to print the sort time stamp
    wasn't wide enough to actually print the full nanoseconds.
    
    Widen the time key column width when --ns is specified.
    
    Before:
    
      % perf record -a sleep 1
      % perf report --sort time,overhead,symbol --stdio --ns
      ...
           2.39%  187851.10000  [k] smp_call_function_single   -      -
           1.53%  187851.10000  [k] intel_idle                 -      -
           0.59%  187851.10000  [.] __wcscmp_ifunc             -      -
           0.33%  187851.10000  [.] 0000000000000000           -      -
           0.28%  187851.10000  [k] cpuidle_enter_state        -      -
    
    After:
    
      % perf report --sort time,overhead,symbol --stdio --ns
      ...
           2.39%  187851.100000000  [k] smp_call_function_single   -      -
           1.53%  187851.100000000  [k] intel_idle                 -      -
           0.59%  187851.100000000  [.] __wcscmp_ifunc             -      -
           0.33%  187851.100000000  [.] 0000000000000000           -      -
           0.28%  187851.100000000  [k] cpuidle_enter_state        -      -
    Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
    Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Link: http://lkml.kernel.org/r/20190823210338.12360-2-andi@firstfloor.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    3dab6ac0
hist.c 65.9 KB