aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-11-13 13:05:09 -0500
committerIngo Molnar <mingo@kernel.org>2012-11-13 13:13:41 -0500
commitccf59d8da119ab03dcbdf95fb5e5adcef6ba51f2 (patch)
treed390f9230edac3d9c42a8ad8b030182890b6e609
parent95d18aa2b6c05351181934b3bc34ce038cc7b637 (diff)
parent27f94d52394003d444a383eaf8d4824daf32432e (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: * Don't show scripts menu for 'perf top', fix from Feng Tang * Add framework for automated perf_event_attr tests, where tools with different command line options will be run from a 'perf test', via python glue, and the perf syscall will be intercepted to verify that the perf_event_attr fields set by the tool are those expected, from Jiri Olsa * Use normalized arch name for searching objdump path. This fixes cases where the system's objdump (e.g. x86_64) supports the architecture in the perf.data file (e.g. i686), but is not the same, fix from Namhyung Kim. * Postpone objdump check until annotation requested, from Namhyung Kim. * Add a 'link' method for hists, so that we can have the leader with buckets for all the entries in all the hists. This new method is now used in the default 'diff' output, making the sum of the 'baseline' column be 100%, eliminating blind spots. Now we need to use this for 'diff' with > 2 perf.data files and for multi event 'report' and 'annotate'. * libtraceevent fixes for compiler warnings trying to make perf it build on some distros, like fedora 14, 32-bit, some of the warnings really pointed to real bugs. * Remove temp dir on failure in 'perf test', fix from Jiri Olsa. * Fixes for handling data, stack mmaps, from Namhyung Kim. * Fix live annotation bug related to recent objdump lookup patches, from Namhyung Kim * Don't try to follow jump target on PLT symbols in the annotation browser, fix from Namhyung Kim. * Fix leak on hist_entry delete, from Namhyung Kim. * Fix a CPU_ALLOC related build error on builtin-test, from Zheng Liu. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--tools/lib/traceevent/event-parse.c22
-rw-r--r--tools/perf/Documentation/android.txt5
-rw-r--r--tools/perf/Makefile34
-rw-r--r--tools/perf/arch/common.c47
-rw-r--r--tools/perf/builtin-annotate.c2
-rw-r--r--tools/perf/builtin-diff.c48
-rw-r--r--tools/perf/builtin-report.c11
-rw-r--r--tools/perf/builtin-top.c10
-rw-r--r--tools/perf/perf.c2
-rw-r--r--tools/perf/perf.h17
-rw-r--r--tools/perf/tests/attr.c174
-rw-r--r--tools/perf/tests/attr.py322
-rw-r--r--tools/perf/tests/attr/README64
-rw-r--r--tools/perf/tests/attr/base-record39
-rw-r--r--tools/perf/tests/attr/base-stat39
-rw-r--r--tools/perf/tests/attr/test-record-basic5
-rw-r--r--tools/perf/tests/attr/test-record-branch-any8
-rw-r--r--tools/perf/tests/attr/test-record-branch-filter-any8
-rw-r--r--tools/perf/tests/attr/test-record-branch-filter-any_call8
-rw-r--r--tools/perf/tests/attr/test-record-branch-filter-any_ret8
-rw-r--r--tools/perf/tests/attr/test-record-branch-filter-hv8
-rw-r--r--tools/perf/tests/attr/test-record-branch-filter-ind_call8
-rw-r--r--tools/perf/tests/attr/test-record-branch-filter-k8
-rw-r--r--tools/perf/tests/attr/test-record-branch-filter-u8
-rw-r--r--tools/perf/tests/attr/test-record-count8
-rw-r--r--tools/perf/tests/attr/test-record-data8
-rw-r--r--tools/perf/tests/attr/test-record-freq6
-rw-r--r--tools/perf/tests/attr/test-record-graph-default6
-rw-r--r--tools/perf/tests/attr/test-record-graph-dwarf10
-rw-r--r--tools/perf/tests/attr/test-record-graph-fp6
-rw-r--r--tools/perf/tests/attr/test-record-group17
-rw-r--r--tools/perf/tests/attr/test-record-group120
-rw-r--r--tools/perf/tests/attr/test-record-no-delay9
-rw-r--r--tools/perf/tests/attr/test-record-no-inherit7
-rw-r--r--tools/perf/tests/attr/test-record-no-samples6
-rw-r--r--tools/perf/tests/attr/test-record-period7
-rw-r--r--tools/perf/tests/attr/test-record-raw7
-rw-r--r--tools/perf/tests/attr/test-stat-basic6
-rw-r--r--tools/perf/tests/attr/test-stat-default64
-rw-r--r--tools/perf/tests/attr/test-stat-detailed-1101
-rw-r--r--tools/perf/tests/attr/test-stat-detailed-2155
-rw-r--r--tools/perf/tests/attr/test-stat-detailed-3173
-rw-r--r--tools/perf/tests/attr/test-stat-group15
-rw-r--r--tools/perf/tests/attr/test-stat-group117
-rw-r--r--tools/perf/tests/attr/test-stat-no-inherit7
-rw-r--r--tools/perf/tests/builtin-test.c (renamed from tools/perf/builtin-test.c)51
-rw-r--r--tools/perf/tests/dso-data.c (renamed from tools/perf/util/dso-test-data.c)1
-rw-r--r--tools/perf/tests/parse-events.c (renamed from tools/perf/util/parse-events-test.c)0
-rw-r--r--tools/perf/ui/browsers/annotate.c39
-rw-r--r--tools/perf/ui/browsers/hists.c63
-rw-r--r--tools/perf/ui/gtk/browser.c4
-rw-r--r--tools/perf/ui/hist.c10
-rwxr-xr-xtools/perf/util/PERF-VERSION-GEN14
-rw-r--r--tools/perf/util/annotate.c71
-rw-r--r--tools/perf/util/annotate.h9
-rw-r--r--tools/perf/util/dso.c1
-rw-r--r--tools/perf/util/hist.c100
-rw-r--r--tools/perf/util/hist.h34
-rw-r--r--tools/perf/util/machine.c205
-rw-r--r--tools/perf/util/machine.h131
-rw-r--r--tools/perf/util/map.c181
-rw-r--r--tools/perf/util/map.h93
-rw-r--r--tools/perf/util/parse-events.l2
-rw-r--r--tools/perf/util/session.h5
-rw-r--r--tools/perf/util/sort.h27
-rw-r--r--tools/perf/util/symbol.c1
-rw-r--r--tools/perf/util/symbol.h20
67 files changed, 2118 insertions, 504 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index f2989c525e48..5a824e355d04 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -174,7 +174,7 @@ static int cmdline_init(struct pevent *pevent)
174 return 0; 174 return 0;
175} 175}
176 176
177static char *find_cmdline(struct pevent *pevent, int pid) 177static const char *find_cmdline(struct pevent *pevent, int pid)
178{ 178{
179 const struct cmdline *comm; 179 const struct cmdline *comm;
180 struct cmdline key; 180 struct cmdline key;
@@ -2637,7 +2637,7 @@ process_func_handler(struct event_format *event, struct pevent_function_handler
2637 struct print_arg *farg; 2637 struct print_arg *farg;
2638 enum event_type type; 2638 enum event_type type;
2639 char *token; 2639 char *token;
2640 char *test; 2640 const char *test;
2641 int i; 2641 int i;
2642 2642
2643 arg->type = PRINT_FUNC; 2643 arg->type = PRINT_FUNC;
@@ -3889,7 +3889,7 @@ static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size,
3889 struct event_format *event, struct print_arg *arg) 3889 struct event_format *event, struct print_arg *arg)
3890{ 3890{
3891 unsigned char *buf; 3891 unsigned char *buf;
3892 char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x"; 3892 const char *fmt = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x";
3893 3893
3894 if (arg->type == PRINT_FUNC) { 3894 if (arg->type == PRINT_FUNC) {
3895 process_defined_func(s, data, size, event, arg); 3895 process_defined_func(s, data, size, event, arg);
@@ -3931,7 +3931,8 @@ static int is_printable_array(char *p, unsigned int len)
3931 return 1; 3931 return 1;
3932} 3932}
3933 3933
3934static void print_event_fields(struct trace_seq *s, void *data, int size, 3934static void print_event_fields(struct trace_seq *s, void *data,
3935 int size __maybe_unused,
3935 struct event_format *event) 3936 struct event_format *event)
3936{ 3937{
3937 struct format_field *field; 3938 struct format_field *field;
@@ -4408,7 +4409,7 @@ void pevent_event_info(struct trace_seq *s, struct event_format *event,
4408void pevent_print_event(struct pevent *pevent, struct trace_seq *s, 4409void pevent_print_event(struct pevent *pevent, struct trace_seq *s,
4409 struct pevent_record *record) 4410 struct pevent_record *record)
4410{ 4411{
4411 static char *spaces = " "; /* 20 spaces */ 4412 static const char *spaces = " "; /* 20 spaces */
4412 struct event_format *event; 4413 struct event_format *event;
4413 unsigned long secs; 4414 unsigned long secs;
4414 unsigned long usecs; 4415 unsigned long usecs;
@@ -5070,8 +5071,8 @@ static const char * const pevent_error_str[] = {
5070}; 5071};
5071#undef _PE 5072#undef _PE
5072 5073
5073int pevent_strerror(struct pevent *pevent, enum pevent_errno errnum, 5074int pevent_strerror(struct pevent *pevent __maybe_unused,
5074 char *buf, size_t buflen) 5075 enum pevent_errno errnum, char *buf, size_t buflen)
5075{ 5076{
5076 int idx; 5077 int idx;
5077 const char *msg; 5078 const char *msg;
@@ -5100,6 +5101,7 @@ int pevent_strerror(struct pevent *pevent, enum pevent_errno errnum,
5100 case PEVENT_ERRNO__READ_FORMAT_FAILED: 5101 case PEVENT_ERRNO__READ_FORMAT_FAILED:
5101