linux/tools/perf
Jiri Olsa 1a1c0ffb2a perf tools: Add +field argument support for --sort option
Adding support to add field(s) to default sort order via using the '+'
prefix, like for report:

  $ perf report
  Samples: 2K of event 'cycles', Event count (approx.): 882172583
  Overhead  Command  Shared Object        Symbol
     7.39%  swapper  [kernel.kallsyms]    [k] intel_idle
     1.97%  firefox  libpthread-2.17.so   [.] pthread_mutex_lock
     1.39%  firefox  [snd_hda_intel]      [k] azx_get_position
     1.11%  firefox  libpthread-2.17.so   [.] pthread_mutex_unlock

  $ perf report -s +cpu
  Samples: 2K of event 'cycles', Event count (approx.): 882172583
  Overhead  Command  Shared Object        Symbol                  CPU
     2.89%  swapper  [kernel.kallsyms]    [k] intel_idle          000
     2.61%  swapper  [kernel.kallsyms]    [k] intel_idle          002
     1.20%  swapper  [kernel.kallsyms]    [k] intel_idle          001
     0.82%  firefox  libpthread-2.17.so   [.] pthread_mutex_lock  002

Works in general for commands using --sort option.

v2 with changes suggested:
  - Use dynamic memory instead static buffer
  - Fix error message typo

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@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: Jiri Olsa <jolsa@kernel.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/20140823125948.GA1193@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-09-17 17:08:07 -03:00
..
Documentation perf top: Add -w option for setting column width 2014-08-12 12:03:06 -03:00
arch perf tools powerpc: Explicitly include util/debug.h 2014-08-20 08:29:10 -03:00
bench perf tools: Enable close-on-exec flag on perf file descriptor 2014-07-18 09:09:34 +02:00
config perf tools: Default to python version 2 2014-08-12 12:03:08 -03:00
python
scripts perf script: Add callchain to generic and tracepoint events 2014-07-16 17:57:33 -03:00
tests perf tests: Add a test for tracking with sched_switch 2014-08-22 13:10:35 -03:00
ui perf hists browser: Consolidate callchain print functions in TUI 2014-08-24 08:11:19 -03:00
util perf tools: Add +field argument support for --sort option 2014-09-17 17:08:07 -03:00
.gitignore
CREDITS
MANIFEST perf kvm: Add stat support on s390 2014-07-16 17:57:33 -03:00
Makefile
Makefile.perf perf tests: Add a test for tracking with sched_switch 2014-08-22 13:10:35 -03:00
builtin-annotate.c perf tools: Check recorded kernel version when finding vmlinux 2014-08-13 16:42:21 -03:00
builtin-bench.c perf bench: Add --repeat option 2014-06-19 16:13:15 -03:00
builtin-buildid-cache.c perf buildid-cache: Use strerror_r instead of strerror 2014-08-15 13:07:59 -03:00
builtin-buildid-list.c
builtin-diff.c perf tools: Check recorded kernel version when finding vmlinux 2014-08-13 16:42:21 -03:00
builtin-evlist.c perf tools: Move pr_* debug macros into debug object 2014-07-17 12:58:39 -03:00
builtin-help.c perf help: Use strerror_r instead of strerror 2014-08-15 13:08:26 -03:00
builtin-inject.c perf tools: Check recorded kernel version when finding vmlinux 2014-08-13 16:42:21 -03:00
builtin-kmem.c perf tools: Check recorded kernel version when finding vmlinux 2014-08-13 16:42:21 -03:00
builtin-kvm.c perf kvm: Use strerror_r instead of strerror 2014-08-15 13:08:14 -03:00
builtin-list.c
builtin-lock.c perf tools: Check recorded kernel version when finding vmlinux 2014-08-13 16:42:21 -03:00
builtin-mem.c perf tools: Check recorded kernel version when finding vmlinux 2014-08-13 16:42:21 -03:00
builtin-probe.c perf probe: Make error messages thread-safe 2014-08-15 10:56:53 -03:00
builtin-record.c perf record: Use strerror_r instead of strerror 2014-08-15 13:07:14 -03:00
builtin-report.c perf report: Set proper sort__mode for the branch option 2014-08-13 17:13:48 -03:00
builtin-sched.c perf sched: Use strerror_r instead of strerror 2014-08-15 13:07:47 -03:00
builtin-script.c perf scripting: Add 'flush' callback to scripting API 2014-08-22 13:12:11 -03:00
builtin-stat.c perf stat: Use strerror_r instead of strerror 2014-08-15 13:08:40 -03:00
builtin-timechart.c perf tools: Check recorded kernel version when finding vmlinux 2014-08-13 16:42:21 -03:00
builtin-top.c perf top: Use set_term_quiet() instead of open coded equivalent 2014-08-24 08:11:18 -03:00
builtin-trace.c perf trace: Use strerror_r instead of strerror 2014-08-15 13:06:28 -03:00
builtin.h
command-list.txt
design.txt perf tools: Update some code references in design.txt 2014-03-18 18:17:06 -03:00
perf-archive.sh
perf-completion.sh perf sched: Introduce --list-cmds for use by scripts 2014-04-16 17:16:05 +02:00
perf-sys.h perf tools: Allow to use cpuinfo on s390 2014-07-07 16:55:24 -03:00
perf.c perf: Use strerror_r instead of strerror 2014-08-15 10:54:29 -03:00
perf.h perf tools: Move ACCESS_ONCE from perf.h header 2014-05-05 17:49:07 +02:00