linux/tools/perf
Arnaldo Carvalho de Melo 77170988ff perf trace: Don't relookup fields by name in each sample
Instead do the lookups just when creating the tracepoints, initially for
the most common, raw_syscalls:sys_{enter,exit}.

It works by having evsel->priv have a per tracepoint structure with
entries for the fields, for direct access, with the offset and a
function to get the value from the sample, doing the swap if needed.

Using a simple workload that does M millions write syscalls, we go from:

 # perf stat -i -e cycles /tmp/oldperf trace ./sc_hello 100 > /dev/null

 Performance counter stats for '/tmp/oldperf trace ./sc_hello 100':

     8,366,771,459 cycles

       2.668025928 seconds time elapsed

 # perf stat -i -e cycles perf trace ./sc_hello 100 > /dev/null

 Performance counter stats for 'perf trace ./sc_hello 100':

     8,345,187,650 cycles

       2.631748425 seconds time elapsed

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-eyfhvoo510a5i10b27dnvm88@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-11-07 10:40:47 -03:00
..
arch tools/perf: Standardize feature support define names to: HAVE_{FEATURE}_SUPPORT 2013-10-09 08:48:28 +02:00
bench perf bench: Fix two warnings 2013-11-01 10:41:54 -03:00
config tools/perf/build: Fix detection of non-core features 2013-11-05 10:08:03 -03:00
Documentation Merge branch 'perf/urgent' into perf/core 2013-10-29 11:23:32 +01:00
python perf python: Remove duplicate TID bit from mask 2013-08-07 17:35:25 -03:00
scripts perf tools: Finish the removal of 'self' arguments 2013-11-05 15:32:36 -03:00
tests tools/perf: Add required memory barriers 2013-11-06 12:34:26 +01:00
ui perf tools: Finish the removal of 'self' arguments 2013-11-05 15:32:36 -03:00
util perf tools: Fix version when building out of tree 2013-11-07 10:40:47 -03:00
.gitignore perf tools: Ignore 'perf timechart' output file 2013-10-11 12:17:37 -03:00
bash_completion perf completion: Use more comp words 2013-10-09 11:12:31 -03:00
builtin-annotate.c perf hists: Consolidate __hists__add_*entry() 2013-11-04 20:59:09 -03:00
builtin-bench.c perf bench: Change the procps visible command-name of invididual benchmark tests plus cleanups 2013-10-23 09:57:34 -03:00
builtin-buildid-cache.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-buildid-list.c perf session: Separating data file properties from session 2013-10-21 17:33:25 -03:00
builtin-diff.c perf hists: Consolidate __hists__add_*entry() 2013-11-04 20:59:09 -03:00
builtin-evlist.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-help.c perf help: Fix --help for builtins 2012-10-22 12:35:49 -02:00
builtin-inject.c perf evsel: Ditch evsel->handler.data field 2013-11-07 10:40:47 -03:00
builtin-kmem.c perf evsel: Ditch evsel->handler.data field 2013-11-07 10:40:47 -03:00
builtin-kvm.c perf kvm: Disable live command if timerfd is not supported 2013-11-05 10:03:22 -03:00
builtin-list.c perf list: Add usage 2013-11-05 14:26:41 -03:00
builtin-lock.c perf evsel: Ditch evsel->handler.data field 2013-11-07 10:40:47 -03:00
builtin-mem.c perf tools: Add data object to handle perf data file 2013-10-21 17:33:24 -03:00
builtin-probe.c tools/perf: Standardize feature support define names to: HAVE_{FEATURE}_SUPPORT 2013-10-09 08:48:28 +02:00
builtin-record.c perf tools: Check maximum frequency rate for record/top 2013-11-05 15:15:08 -03:00
builtin-report.c perf hists: Consolidate __hists__add_*entry() 2013-11-04 20:59:09 -03:00
builtin-sched.c perf evsel: Ditch evsel->handler.data field 2013-11-07 10:40:47 -03:00
builtin-script.c perf script: Set up output options for in-stream attributes 2013-11-04 12:19:26 -03:00
builtin-stat.c perf stat: Enhance option parse error message 2013-11-04 12:57:36 -03:00
builtin-timechart.c perf evsel: Ditch evsel->handler.data field 2013-11-07 10:40:47 -03:00
builtin-top.c perf tools: Check maximum frequency rate for record/top 2013-11-05 15:15:08 -03:00
builtin-trace.c perf trace: Don't relookup fields by name in each sample 2013-11-07 10:40:47 -03:00
builtin.h perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
command-list.txt perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP 2012-05-31 11:38:42 -03:00
Makefile tools/perf/build: Pass through DEBUG parameter 2013-10-14 10:29:07 -03:00
Makefile.perf perf tools: Factor sysfs code into generic fs object 2013-11-05 14:44:26 -03:00
MANIFEST perf tools: Introduce tools/lib/lk library 2013-03-15 13:06:00 -03:00
perf-archive.sh perf archive: Make 'f' the last parameter for tar 2012-09-17 13:10:42 -03:00
perf.c perf trace: Add 'trace' alias to 'perf trace' 2013-10-11 12:17:10 -03:00
perf.h tools/perf: Add required memory barriers 2013-11-06 12:34:26 +01:00