linux/tools/perf/util
Arnaldo Carvalho de Melo 439d473b47 perf tools: Rewrite and improve support for kernel modules
Representing modules as struct map entries, backed by a DSO, etc,
using /proc/modules to find where the module is loaded.

DSOs now can have a short and long name, so that in verbose mode we
can show exactly which .ko or vmlinux image was used.

As kernel modules now are a DSO separate from the kernel, we can
ask for just the hits for a particular set of kernel modules, just
like we can do with shared libraries:

[root@doppio linux-2.6-tip]# perf report -n --vmlinux
/home/acme/git/build/tip-recvmmsg/vmlinux --modules --dsos \[drm\] | head -15
    84.58%      13266             Xorg  [k] drm_clflush_pages
     4.02%        630             Xorg  [k] trace_kmalloc.clone.0
     3.95%        619             Xorg  [k] drm_ioctl
     2.07%        324             Xorg  [k] drm_addbufs
     1.68%        263             Xorg  [k] drm_gem_close_ioctl
     0.77%        120             Xorg  [k] drm_setmaster_ioctl
     0.70%        110             Xorg  [k] drm_lastclose
     0.68%        106             Xorg  [k] drm_open
     0.54%         85             Xorg  [k] drm_mm_search_free
[root@doppio linux-2.6-tip]#

Specifying --dsos /lib/modules/2.6.31-tip/kernel/drivers/gpu/drm/drm.ko
would have the same effect. Allowing specifying just 'drm.ko' is left
for another patch.

Processing kallsyms so that per kernel module struct map are
instantiated was also left for another patch. That will allow
removing the module name from each of its symbols.

struct symbol was reduced by removing the ->module backpointer and
moving it (well now the map) to struct symbol_entry in perf top,
that is its only user right now.

The total linecount went down by ~500 lines.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-10-02 10:48:42 +02:00
..
include perf report: Adjust column width to the values sampled 2009-07-11 10:24:11 +02:00
PERF-VERSION-GEN perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
abspath.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
alias.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
cache.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
callchain.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
callchain.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
color.c perf tools: Librarize trace_event() helper 2009-08-16 23:06:45 +02:00
color.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
config.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
ctype.c perf_counter tools: Add and use isprint() 2009-06-18 09:46:00 +02:00
debug.c perf tools: Librarize trace_event() helper 2009-08-16 23:06:45 +02:00
debug.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
environment.c perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
event.h perf tools: Rewrite and improve support for kernel modules 2009-10-02 10:48:42 +02:00
exec_cmd.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
exec_cmd.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
generate-cmdlist.sh perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
header.c perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
header.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
help.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
help.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
hist.c perf tools: Put common histogram functions in their own file 2009-09-30 13:57:56 +02:00
hist.h perf tools: Put common histogram functions in their own file 2009-09-30 13:57:56 +02:00
levenshtein.c perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
levenshtein.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
map.c perf tools: Factorize the map helpers 2009-08-12 12:37:37 +02:00
pager.c perf_counter tools: Remove dead code 2009-06-27 06:06:39 +02:00
parse-events.c perf tools: Dont use openat() 2009-09-24 21:20:08 +02:00
parse-events.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
parse-options.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
parse-options.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
path.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
quote.c perf: Fix read buffer overflow 2009-08-04 11:09:56 +02:00
quote.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
run-command.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
run-command.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
sigchain.c perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
sigchain.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
sort.c perf tools: Rewrite and improve support for kernel modules 2009-10-02 10:48:42 +02:00
sort.h perf tools: Rewrite and improve support for kernel modules 2009-10-02 10:48:42 +02:00
strbuf.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00
strbuf.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
string.c perf_counter tools: Define and use our own u64, s64 etc. definitions 2009-06-19 18:25:47 +02:00
string.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
strlist.c strlist: Introduce strlist__entry and strlist__nr_entries methods 2009-07-11 19:20:25 +02:00
strlist.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
svghelper.c perf util: SVG performance improvements 2009-09-20 19:37:36 +02:00
svghelper.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
symbol.c perf tools: Rewrite and improve support for kernel modules 2009-10-02 10:48:42 +02:00
symbol.h perf tools: Rewrite and improve support for kernel modules 2009-10-02 10:48:42 +02:00
thread.c perf tools: Rewrite and improve support for kernel modules 2009-10-02 10:48:42 +02:00
thread.h perf tools: Rewrite and improve support for kernel modules 2009-10-02 10:48:42 +02:00
trace-event-info.c perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
trace-event-parse.c perf tools: Implement counter output multiplexing 2009-09-14 15:45:11 +02:00
trace-event-read.c perf sched: Display time in milliseconds, reorganize output 2009-09-13 10:22:44 +02:00
trace-event.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
types.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
usage.c perf top: Fall back to cpu-clock-tick hrtimer sampling if no cycle counter available 2009-06-07 17:31:52 +02:00
util.h Merge branch 'perfcounters/tracing' into perfcounters/core 2009-08-31 10:03:27 +02:00
values.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
values.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
wrapper.c perf_counter tools: Add more warnings and fix/annotate them 2009-07-01 12:49:48 +02:00