diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-06 00:11:38 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-06 00:11:42 -0400 |
commit | ed011b22ce567eabefa9ea571d3721c10ecd0553 (patch) | |
tree | c7aee6684613075c772388a99a9137014549434e /tools/perf/util | |
parent | 85bac32c4a52c592b857f2c360cc5ec93a097d70 (diff) | |
parent | e07cccf4046978df10f2e13fe2b99b2f9b3a65db (diff) |
Merge commit 'v2.6.31-rc9' into tracing/core
Merge reason: move from -rc5 to -rc9.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/parse-events.c | 10 | ||||
-rw-r--r-- | tools/perf/util/symbol.c | 17 | ||||
-rw-r--r-- | tools/perf/util/symbol.h | 24 |
3 files changed, 36 insertions, 15 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index a5d661b99af6..4bab2784b453 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -379,6 +379,7 @@ static int parse_tracepoint_event(const char **strp, | |||
379 | struct perf_counter_attr *attr) | 379 | struct perf_counter_attr *attr) |
380 | { | 380 | { |
381 | const char *evt_name; | 381 | const char *evt_name; |
382 | char *flags; | ||
382 | char sys_name[MAX_EVENT_LENGTH]; | 383 | char sys_name[MAX_EVENT_LENGTH]; |
383 | char id_buf[4]; | 384 | char id_buf[4]; |
384 | int fd; | 385 | int fd; |
@@ -400,6 +401,15 @@ static int parse_tracepoint_event(const char **strp, | |||
400 | strncpy(sys_name, *strp, sys_length); | 401 | strncpy(sys_name, *strp, sys_length); |
401 | sys_name[sys_length] = '\0'; | 402 | sys_name[sys_length] = '\0'; |
402 | evt_name = evt_name + 1; | 403 | evt_name = evt_name + 1; |
404 | |||
405 | flags = strchr(evt_name, ':'); | ||
406 | if (flags) { | ||
407 | *flags = '\0'; | ||
408 | flags++; | ||
409 | if (!strncmp(flags, "record", strlen(flags))) | ||
410 | attr->sample_type |= PERF_SAMPLE_RAW; | ||
411 | } | ||
412 | |||
403 | evt_length = strlen(evt_name); | 413 | evt_length = strlen(evt_name); |
404 | if (evt_length >= MAX_EVENT_LENGTH) | 414 | if (evt_length >= MAX_EVENT_LENGTH) |
405 | return 0; | 415 | return 0; |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index f1dcede14307..5c0f42e6b33b 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -7,23 +7,8 @@ | |||
7 | #include <gelf.h> | 7 | #include <gelf.h> |
8 | #include <elf.h> | 8 | #include <elf.h> |
9 | 9 | ||
10 | #ifndef NO_DEMANGLE | ||
11 | #include <bfd.h> | ||
12 | #else | ||
13 | static inline | ||
14 | char *bfd_demangle(void __used *v, const char __used *c, int __used i) | ||
15 | { | ||
16 | return NULL; | ||
17 | } | ||
18 | #endif | ||
19 | |||
20 | const char *sym_hist_filter; | 10 | const char *sym_hist_filter; |
21 | 11 | ||
22 | #ifndef DMGL_PARAMS | ||
23 | #define DMGL_PARAMS (1 << 0) /* Include function args */ | ||
24 | #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ | ||
25 | #endif | ||
26 | |||
27 | enum dso_origin { | 12 | enum dso_origin { |
28 | DSO__ORIG_KERNEL = 0, | 13 | DSO__ORIG_KERNEL = 0, |
29 | DSO__ORIG_JAVA_JIT, | 14 | DSO__ORIG_JAVA_JIT, |
@@ -816,6 +801,8 @@ more: | |||
816 | } | 801 | } |
817 | out: | 802 | out: |
818 | free(name); | 803 | free(name); |
804 | if (ret < 0 && strstr(self->name, " (deleted)") != NULL) | ||
805 | return 0; | ||
819 | return ret; | 806 | return ret; |
820 | } | 807 | } |
821 | 808 | ||
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 1e003ec2f4b1..b53bf0125c1b 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -7,6 +7,30 @@ | |||
7 | #include <linux/rbtree.h> | 7 | #include <linux/rbtree.h> |
8 | #include "module.h" | 8 | #include "module.h" |
9 | 9 | ||
10 | #ifdef HAVE_CPLUS_DEMANGLE | ||
11 | extern char *cplus_demangle(const char *, int); | ||
12 | |||
13 | static inline char *bfd_demangle(void __used *v, const char *c, int i) | ||
14 | { | ||
15 | return cplus_demangle(c, i); | ||
16 | } | ||
17 | #else | ||
18 | #ifdef NO_DEMANGLE | ||
19 | static inline char *bfd_demangle(void __used *v, const char __used *c, | ||
20 | int __used i) | ||
21 | { | ||
22 | return NULL; | ||
23 | } | ||
24 | #else | ||
25 | #include <bfd.h> | ||
26 | #endif | ||
27 | #endif | ||
28 | |||
29 | #ifndef DMGL_PARAMS | ||
30 | #define DMGL_PARAMS (1 << 0) /* Include function args */ | ||
31 | #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ | ||
32 | #endif | ||
33 | |||
10 | struct symbol { | 34 | struct symbol { |
11 | struct rb_node rb_node; | 35 | struct rb_node rb_node; |
12 | u64 start; | 36 | u64 start; |