linux/tools/perf/util
Arnaldo Carvalho de Melo 1c02c4d2e9 perf hist: Introduce hists class and move lots of methods to it
In cbbc79a we introduced support for multiple events by introducing a
new "event_stat_id" struct and then made several perf_session methods
receive a point to it instead of a pointer to perf_session, and kept the
event_stats and hists rb_tree in perf_session.

While working on the new newt based browser, I realised that it would be
better to introduce a new class, "hists" (short for "histograms"),
renaming the "event_stat_id" struct and the perf_session methods that
were really "hists" methods, as they manipulate only struct hists
members, not touching anything in the other perf_session members.

Other optimizations, such as calculating the maximum lenght of a symbol
name present in an hists instance will be possible as we add them,
avoiding a re-traversal just for finding that information.

The rationale for the name "hists" to replace "event_stat_id" is that we
may have multiple sets of hists for the same event_stat id, as, for
instance, the 'perf diff' tool has, so event stat id is not what
characterizes what this struct and the functions that manipulate it do.

Cc: Eric B Munson <ebmunson@us.ibm.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-05-10 13:13:49 -03:00
..
include perf tools: Don't use code surrounded by __KERNEL__ 2010-05-02 12:00:44 -03:00
scripting-engines perf/scripts: Tuple was set from long in both branches in python_process_event() 2010-04-02 21:32:16 +02:00
PERF-VERSION-GEN perf tools: Allow specifying O= to build files in a separate directory 2010-04-02 16:28:03 -03: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
bitmap.c perf tools: Don't use code surrounded by __KERNEL__ 2010-05-02 12:00:44 -03:00
build-id.c perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
build-id.h perf build-id: Move the routine to find DSOs with hits to the lib 2010-02-04 09:33:26 +01:00
cache.h perf newt: Properly restore the screen when error exiting 2010-03-22 18:47:34 +01:00
callchain.c perf callchains: Use zalloc to allocate objects 2010-05-10 10:57:39 -03:00
callchain.h perf report: Allow limiting the number of entries to print in callchains 2010-05-09 21:15:35 -03:00
color.c perf hist: Replace ->print() routines by ->snprintf() equivalents 2010-04-02 16:28:15 -03:00
color.h perf hist: Replace ->print() routines by ->snprintf() equivalents 2010-04-02 16:28:15 -03:00
config.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
cpumap.c perf tools: Fix sparse CPU numbering related bugs 2010-03-11 13:36:53 +01:00
cpumap.h perf tools: Fix sparse CPU numbering related bugs 2010-03-11 13:36:53 +01:00
ctype.c perf tools: Move graph_line and graph_dotted_line from top 2009-11-23 21:55:20 +01:00
debug.c perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() 2010-04-14 11:26:44 +02:00
debug.h perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() 2010-04-14 11:26:44 +02:00
debugfs.c perf trace: Clean up find_debugfs() 2009-12-28 10:36:36 +01:00
debugfs.h perf tools: Mount debugfs automatically 2009-12-28 10:36:36 +01:00
environment.c perf_counter tools: Move from Documentation/perf_counter/ to tools/perf/ 2009-06-06 20:33:43 +02:00
event.c perf hist: Introduce hists class and move lots of methods to it 2010-05-10 13:13:49 -03:00
event.h perf hist: Introduce hists class and move lots of methods to it 2010-05-10 13:13:49 -03: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: Fix performance issue with perf report 2010-05-04 10:54:09 -03:00
header.h perf/live: don't synthesize build ids at the end of a live mode trace 2010-05-02 12:04:05 -03: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 hist: Introduce hists class and move lots of methods to it 2010-05-10 13:13:49 -03:00
hist.h perf hist: Introduce hists class and move lots of methods to it 2010-05-10 13:13:49 -03:00
hweight.c perf tools: Don't use code surrounded by __KERNEL__ 2010-05-02 12:00:44 -03: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 session: Embed the host machine data on perf_session 2010-05-09 21:14:52 -03:00
map.h perf symbols: Add machine helper routines 2010-04-29 15:25:23 -03:00
newt.c perf newt: Use newtAddComponent() 2010-05-10 10:51:25 -03:00
pager.c perf_counter tools: Remove dead code 2009-06-27 06:06:39 +02:00
parse-events.c Merge branch 'perf' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core 2010-05-08 10:02:57 +02:00
parse-events.h perf: record TRACE_INFO only if using tracepoints and SAMPLE_RAW 2010-05-03 10:31:48 -03:00
parse-options.c perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() 2010-04-14 11:26:44 +02:00
parse-options.h perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() 2010-04-14 11:26:44 +02:00
path.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
probe-event.c perf machine: Adopt some map_groups functions 2010-04-27 21:21:18 -03:00
probe-event.h perf probe: Add --max-probes option 2010-04-26 15:35:20 -03:00
probe-finder.c perf probe: Add --max-probes option 2010-04-26 15:35:20 -03:00
probe-finder.h perf probe: Add --max-probes option 2010-04-26 15:35:20 -03: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
session.c perf hist: Introduce hists class and move lots of methods to it 2010-05-10 13:13:49 -03:00
session.h perf hist: Introduce hists class and move lots of methods to it 2010-05-10 13:13:49 -03: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: Fix accidentally preprocessed snprintf callback 2010-04-14 16:59:21 -03:00
sort.h perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03: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: Swap inclusion order of util.h and string.h in util/string.c 2010-04-04 16:40:42 +02:00
strlist.c perf probe: Fix --del to update current event list 2009-12-15 20:22:01 +01:00
strlist.h perf tools: Add for_each macros for strlist 2009-12-15 20:22:02 +01:00
svghelper.c perf timechart: Improve the visual appearance of scheduler delays 2009-10-20 03:39:21 +02:00
svghelper.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
symbol.c perf session: Embed the host machine data on perf_session 2010-05-09 21:14:52 -03:00
symbol.h perf session: Embed the host machine data on perf_session 2010-05-09 21:14:52 -03:00
thread.c perf symbols: Move more map_groups methods to map.c 2010-04-02 16:27:39 -03:00
thread.h perf: 'perf kvm' tool for monitoring guest performance from host 2010-04-19 12:37:24 +03:00
trace-event-info.c perf/record: simplify TRACE_INFO tracepoint check 2010-05-05 11:12:53 -03:00
trace-event-parse.c perf: Fix warning while reading ring buffer headers 2010-05-01 04:31:48 +02:00
trace-event-read.c Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/core 2010-05-03 08:29:35 +02:00
trace-event-scripting.c perf/scripts: Add Python scripting engine 2010-02-25 04:07:29 +01:00
trace-event.h Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/core 2010-05-03 08:29:35 +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.c perf: Fix implicit declaration of getline in util.c 2010-01-17 07:53:09 +01:00
util.h perf tools: Move the prototypes in util/string.h to util.h 2010-04-03 10:19:26 -03:00
values.c perf: Fix memory leak: counterwidth 2010-01-13 10:09:15 +01:00
values.h perf tools: Protect header files with a consistent style 2009-09-24 21:27:51 +02:00
wrapper.c perf tools: Remove unused wrapper routines 2009-11-24 16:37:03 +01:00