linux/tools/perf/tests
Arnaldo Carvalho de Melo c5c584d2db perf maps: Do not use an rbtree to sort by map name
This is only used for the kernel maps, shave 24 bytes out 'struct map'
and just traverse the existing per ip rbtree to look for maps by name,
use a front end cache to reuse the last search if its the same name.

After this 'struct map' is down to just two cachelines:

  $ pahole -C map ~/bin/perf
  struct map {
  	union {
  		struct rb_node rb_node __attribute__((__aligned__(8))); /*     0    24 */
  		struct list_head node;                   /*     0    16 */
  	} __attribute__((__aligned__(8)));                                               /*     0    24 */
  	u64                        start;                /*    24     8 */
  	u64                        end;                  /*    32     8 */
  	_Bool                      erange_warned;        /*    40     1 */

  	/* XXX 3 bytes hole, try to pack */

  	u32                        priv;                 /*    44     4 */
  	u32                        prot;                 /*    48     4 */
  	u32                        flags;                /*    52     4 */
  	u64                        pgoff;                /*    56     8 */
  	/* --- cacheline 1 boundary (64 bytes) --- */
  	u64                        reloc;                /*    64     8 */
  	u32                        maj;                  /*    72     4 */
  	u32                        min;                  /*    76     4 */
  	u64                        ino;                  /*    80     8 */
  	u64                        ino_generation;       /*    88     8 */
  	u64                        (*map_ip)(struct map *, u64); /*    96     8 */
  	u64                        (*unmap_ip)(struct map *, u64); /*   104     8 */
  	struct dso *               dso;                  /*   112     8 */
  	refcount_t                 refcnt;               /*   120     4 */

  	/* size: 128, cachelines: 2, members: 17 */
  	/* sum members: 121, holes: 1, sum holes: 3 */
  	/* padding: 4 */
  	/* forced alignments: 1 */
  } __attribute__((__aligned__(8)));
  $

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-bvr8fqfgzxtgnhnwt5sssx5g@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-11-18 11:19:51 -03:00
..
attr perf tools: Save bpf_prog_info and BTF of new BPF programs 2019-03-21 11:27:04 -03:00
shell perf tests: Fixes hang in zstd compression test by changing the source of random data 2019-08-26 11:58:29 -03:00
.gitignore perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
attr.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
attr.py perf script python: Add Python3 support to tests/attr.py 2019-02-05 10:31:08 -03:00
backward-ring-buffer.c perf tests: Fix out of bounds memory access 2019-11-07 09:04:22 -03:00
bitmap.c perf env: Remove needless cpumap.h header 2019-09-20 09:19:21 -03:00
bp_account.c perf tests bp_account: Add dedicated checking helper is_supported() 2019-10-19 15:35:01 -03:00
bp_signal.c perf tests: Fix a typo 2019-11-06 15:43:05 -03:00
bp_signal_overflow.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
bpf-script-example.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf-script-test-kbuild.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf-script-test-prologue.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf-script-test-relocation.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf.c libperf: Adopt perf_mmap__read_event() from tools/perf 2019-10-10 11:49:46 -03:00
Build perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
builtin-test.c perf tests bp_account: Add dedicated checking helper is_supported() 2019-10-19 15:35:01 -03:00
clang.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
code-reading.c libperf: Adopt perf_mmap__read_event() from tools/perf 2019-10-10 11:49:46 -03:00
cpumap.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
dso-data.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
dwarf-unwind.c perf unwind: Use 'struct map_symbol' in 'struct unwind_entry' 2019-11-12 08:20:53 -03:00
event-times.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
event_update.c libperf: Add perf_evlist__id_add() function 2019-09-25 09:51:48 -03:00
evsel-roundtrip-name.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
evsel-tp-sched.c perf evsel: Rename perf_evsel__delete() to evsel__delete() 2019-07-29 18:34:43 -03:00
expr.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
fdarray.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hists_common.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
hists_common.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hists_cumulate.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
hists_filter.c perf tools: Remove needless thread.h include directives 2019-08-31 22:24:10 -03:00
hists_link.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
hists_output.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
is_printable_array.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
keep-tracking.c libperf: Adopt perf_mmap__read_event() from tools/perf 2019-10-10 11:49:46 -03:00
kmod-path.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
llvm.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
llvm.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
make perf tests: Fix static build test 2019-09-20 14:37:28 -03:00
map_groups.c perf maps: Do not use an rbtree to sort by map name 2019-11-18 11:19:51 -03:00
mem.c perf symbols: Move mem_info and branch_info out of symbol.h 2019-08-31 22:27:48 -03:00
mem2node.c perf env: Remove needless cpumap.h header 2019-09-20 09:19:21 -03:00
mmap-basic.c libperf: Adopt perf_mmap__read_event() from tools/perf 2019-10-10 11:49:46 -03:00
mmap-thread-lookup.c libperf: Move 'page_size' global variable to libperf 2019-09-25 09:51:48 -03:00
openat-syscall-all-cpus.c perf env: Remove needless cpumap.h header 2019-09-20 09:19:21 -03:00
openat-syscall-tp-fields.c libperf: Adopt perf_mmap__read_event() from tools/perf 2019-10-10 11:49:46 -03:00
openat-syscall.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
parse-events.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
parse-no-sample-id-all.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
perf-hooks.c perf tests: Avoid raising SEGV using an obvious NULL dereference 2019-09-27 09:26:14 -03:00
perf-record.c libperf: Adopt perf_mmap__read_event() from tools/perf 2019-10-10 11:49:46 -03:00
perf-targz-src-pkg License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmu.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
python-use.c perf test: Use header file util/debug.h 2018-06-04 10:28:53 -03:00
sample-parsing.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
sdt.c perf tools: No need to include internal/lib.h from util/util.h 2019-09-25 09:51:48 -03:00
stat.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
sw-clock.c libperf: Adopt perf_mmap__read_event() from tools/perf 2019-10-10 11:49:46 -03:00
switch-tracking.c libperf: Adopt perf_mmap__read_event() from tools/perf 2019-10-10 11:49:46 -03:00
task-exit.c perf test: Avoid infinite loop for task exit case 2019-10-15 08:36:22 -03:00
tests.h perf tests bp_account: Add dedicated checking helper is_supported() 2019-10-19 15:35:01 -03:00
thread-map.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
thread-mg-share.c perf tools: Remove needless map.h include directives 2019-08-31 22:24:10 -03:00
time-utils-test.c perf evlist: Rename struct perf_evlist to struct evlist 2019-07-29 18:34:42 -03:00
topology.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
unit_number__scnprintf.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
vmlinux-kallsyms.c perf maps: Add for_each_entry()/_safe() iterators 2019-11-06 15:49:25 -03:00
wp.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00