diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-04-05 11:53:45 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-04-08 10:34:26 -0400 |
commit | eed05fe70f96b04ebeb218b07ae8898e605f9b23 (patch) | |
tree | b6cfaaca79ac4dbceaf9efbd3ae5549be033182d /tools/perf/util/probe-finder.h | |
parent | c0ed55d2e4f600335193612725c0d7c8211a7a4a (diff) |
perf tools: Reorganize some structs to save space
Using 'pahole --packable' I found some structs that could be reorganized
to eliminate alignment holes, in some cases getting them to be cacheline
multiples.
[acme@doppio linux-2.6-tip]$ codiff perf.old ~/bin/perf
builtin-annotate.c:
struct perf_session | -8
struct perf_header | -8
2 structs changed
builtin-diff.c:
struct sample_data | -8
1 struct changed
diff__process_sample_event | -8
1 function changed, 8 bytes removed, diff: -8
builtin-sched.c:
struct sched_atom | -8
1 struct changed
builtin-timechart.c:
struct per_pid | -8
1 struct changed
cmd_timechart | -16
1 function changed, 16 bytes removed, diff: -16
builtin-probe.c:
struct perf_probe_point | -8
struct perf_probe_event | -8
2 structs changed
opt_add_probe_event | -3
1 function changed, 3 bytes removed, diff: -3
util/probe-finder.c:
struct probe_finder | -8
1 struct changed
find_kprobe_trace_events | -16
1 function changed, 16 bytes removed, diff: -16
/home/acme/bin/perf:
4 functions changed, 43 bytes removed, diff: -43
[acme@doppio linux-2.6-tip]$
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-finder.h')
-rw-r--r-- | tools/perf/util/probe-finder.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index 3564f22954f1..2a271321944f 100644 --- a/tools/perf/util/probe-finder.h +++ b/tools/perf/util/probe-finder.h | |||
@@ -31,13 +31,13 @@ extern int find_line_range(int fd, struct line_range *lr); | |||
31 | 31 | ||
32 | struct probe_finder { | 32 | struct probe_finder { |
33 | struct perf_probe_event *pev; /* Target probe event */ | 33 | struct perf_probe_event *pev; /* Target probe event */ |
34 | int ntevs; /* number of trace events */ | ||
35 | struct kprobe_trace_event *tevs; /* Result trace events */ | 34 | struct kprobe_trace_event *tevs; /* Result trace events */ |
35 | int ntevs; /* number of trace events */ | ||
36 | 36 | ||
37 | /* For function searching */ | 37 | /* For function searching */ |
38 | int lno; /* Line number */ | ||
38 | Dwarf_Addr addr; /* Address */ | 39 | Dwarf_Addr addr; /* Address */ |
39 | const char *fname; /* Real file name */ | 40 | const char *fname; /* Real file name */ |
40 | int lno; /* Line number */ | ||
41 | Dwarf_Die cu_die; /* Current CU */ | 41 | Dwarf_Die cu_die; /* Current CU */ |
42 | struct list_head lcache; /* Line cache for lazy match */ | 42 | struct list_head lcache; /* Line cache for lazy match */ |
43 | 43 | ||