linux/tools/perf
Arnaldo Carvalho de Melo 03548ebf6d perf trace: Do not show the runtime_ms for a thread when not collecting it
That field is only updated when we use the "sched:sched_stat_runtime"
tracepoint, and that is only done so far when we use the '--stat' command line
option, without it we get just zeros, confusing the users:

Without this patch:

  # trace -a -s sleep 1
  <SNIP>
   qemu-system-x86 (9931), 468 events, 9.6%, 0.000 msec

     syscall     calls    total       min       avg       max      stddev
                          (msec)    (msec)    (msec)    (msec)        (%)
     ---------- ------ --------- --------- --------- ---------     ------
     ppoll          98   982.374     0.000    10.024    29.983     12.65%
     write          34     0.401     0.005     0.012     0.027      5.49%
     ioctl         102     0.347     0.002     0.003     0.007      3.08%

   firefox (10871), 1856 events, 38.2%, 0.000 msec

                          (msec)    (msec)    (msec)    (msec)        (%)
     ---------- ------ --------- --------- --------- ---------     ------
     poll          395   934.873     0.000     2.367    17.120     11.51%
     recvmsg       395     0.988     0.001     0.003     0.021      4.20%
     read          106     0.460     0.002     0.004     0.007      3.17%
     futex          24     0.108     0.001     0.004     0.010     10.05%
     mmap            2     0.041     0.016     0.021     0.026     23.92%
     write           6     0.027     0.004     0.004     0.005      2.52%

After this patch that ', 0.000 msecs' gets suppressed when --stat is not
in use.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-p7emqrsw7900tdkg43v9l1e1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-05-05 21:03:57 -03:00
..
arch perf tools: Update x86's syscall_64.tbl, adding preadv2 & pwritev2 2016-04-26 13:15:02 -03:00
bench perf bench: Remove one more die() call 2016-04-26 13:28:40 -03:00
config perf tools: Build syscall table .c header from kernel's syscall_64.tbl 2016-04-08 09:58:14 -03:00
Documentation perf record: Disable buildid cache options by default in switch output mode 2016-04-28 09:58:59 -03:00
jvmti perf jit: Add support for using TSC as a timestamp 2016-04-01 18:42:55 -03:00
python perf python: Support the PERF_RECORD_SWITCH event 2015-10-07 19:41:50 -03:00
scripts perf script: Fix postgresql ubuntu install instructions 2016-04-19 12:36:54 -03:00
tests perf tests: Do not use sizeof on pointer type 2016-04-28 15:37:52 -03:00
trace perf trace: Move msg_flags beautifier to tools/perf/trace/beauty/ 2016-04-28 09:58:59 -03:00
ui perf hists browser: Fold two consecutive symbol_conf.use_callchain ifs 2016-04-18 12:26:27 -03:00
util perf tools: Add template for generating rbtree resort class 2016-05-05 21:03:55 -03:00
.gitignore perf tools: Add Intel PT instruction decoder 2015-08-17 11:11:36 -03:00
Build perf tools: Set and pass DOCDIR to builtin-report.c 2016-01-12 12:42:07 -03:00
builtin-annotate.c perf machine: Rename perf_event__preprocess_sample to machine__resolve 2016-03-23 12:03:08 -03:00
builtin-bench.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-buildid-cache.c perf tools: Move timestamp creation to util 2016-01-29 17:30:06 -03:00
builtin-buildid-list.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-config.c perf config: Make show_config() use perf_config_set 2016-04-14 09:15:47 -03:00
builtin-data.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-diff.c perf machine: Rename perf_event__preprocess_sample to machine__resolve 2016-03-23 12:03:08 -03:00
builtin-evlist.c perf evlist: Add --trace-fields option to show trace fields 2016-01-08 14:23:02 -03:00
builtin-help.c perf help: Use asprintf instead of adhoc equivalents 2016-03-23 16:36:07 -03:00
builtin-inject.c perf tools: Add time conversion event 2016-03-31 10:52:24 -03:00
builtin-kmem.c perf callchain: Start moving away from global per thread cursors 2016-04-14 14:48:07 -03:00
builtin-kvm.c perf evsel: Do not use globals in config() 2016-04-11 22:18:20 -03:00
builtin-list.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-lock.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-mem.c perf mem: Add -U/-K (--all-user/--all-kernel) options 2016-03-30 11:14:07 -03:00
builtin-probe.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-record.c perf record: Generate tracking events for process forked by perf 2016-04-28 09:58:59 -03:00
builtin-report.c perf tools: Set the maximum allowed stack from /proc/sys/kernel/perf_event_max_stack 2016-04-27 10:29:07 -03:00
builtin-sched.c perf sched map: Display only given cpus 2016-04-13 10:11:52 -03:00
builtin-script.c perf tools: Set the maximum allowed stack from /proc/sys/kernel/perf_event_max_stack 2016-04-27 10:29:07 -03:00
builtin-stat.c perf stat: Add --metric-only support for -A 2016-03-10 16:50:47 -03:00
builtin-timechart.c perf machine: Rename perf_event__preprocess_sample to machine__resolve 2016-03-23 12:03:08 -03:00
builtin-top.c perf tools: Set the maximum allowed stack from /proc/sys/kernel/perf_event_max_stack 2016-04-27 10:29:07 -03:00
builtin-trace.c perf trace: Do not show the runtime_ms for a thread when not collecting it 2016-05-05 21:03:57 -03:00
builtin-version.c perf tools: Move cmd_version() to builtin-version.c 2015-12-09 13:42:03 -03:00
builtin.h perf tools: Remove needless 'extern' from function prototypes 2016-03-23 15:06:35 -03:00
command-list.txt perf tools: Do not show trace command if it's not compiled in 2016-01-08 12:46:17 -03:00
CREDITS
design.txt
Makefile perf build tests: Do parallell builds with 'build-test' 2016-02-04 15:57:00 -03:00
Makefile.perf perf tools: Build syscall table .c header from kernel's syscall_64.tbl 2016-04-08 09:58:14 -03:00
MANIFEST perf bench: Fix detached tarball building due to missing 'perf bench memcpy' headers 2016-03-24 12:28:57 -03:00
perf-archive.sh
perf-completion.sh perf tools: Avoid confusion with preloaded bash function for perf bash completion 2015-03-19 13:53:27 -03:00
perf-read-vdso.c
perf-sys.h perf tools: Move generic barriers out of perf-sys.h 2015-05-08 16:05:08 -03:00
perf-with-kcore.sh perf tools: Fix perf-with-kcore handling of arguments containing spaces 2015-08-06 16:48:27 -03:00
perf.c perf tools: Set the maximum allowed stack from /proc/sys/kernel/perf_event_max_stack 2016-04-27 10:29:07 -03:00
perf.h perf tools: Ditch record_opts.callgraph_set 2016-04-18 12:26:27 -03:00