• Jiri Olsa's avatar
    perf tools: Add +field argument support for --field option · 2f3f9bcf
    Jiri Olsa authored
    Adding support to add field(s) to default field order via using the '+'
    prefix, like for report:
    
      $ perf report
      Samples: 10  of event 'cycles', Event count (approx.): 4463799
      Overhead  Command  Shared Object      Symbol
        32.40%  ls       [kernel.kallsyms]  [k] filemap_fault
        28.19%  ls       [kernel.kallsyms]  [k] get_page_from_freelist
        23.38%  ls       [kernel.kallsyms]  [k] enqueue_entity
        15.04%  ls       [kernel.kallsyms]  [k] mmap_region
    
      $ perf report -F +period,sample
      Samples: 10  of event 'cycles', Event count (approx.): 4463799
      Overhead        Period       Samples  Command  Shared Object      Symbol
        32.40%       1446493             1  ls       [kernel.kallsyms]  [k] filemap_fault
        28.19%       1258486             1  ls       [kernel.kallsyms]  [k] get_page_from_freelist
        23.38%       1043754             1  ls       [kernel.kallsyms]  [k] enqueue_entity
        15.04%        671160             1  ls       [kernel.kallsyms]  [k] mmap_region
    
    Works in general for commands using --field option.
    Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
    Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Jean Pihet <jean.pihet@linaro.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/1408715919-25990-2-git-send-email-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    2f3f9bcf
hist.c 16 KB