diff options
author | David S. Miller <davem@davemloft.net> | 2014-03-05 20:32:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-05 20:32:02 -0500 |
commit | 67ddc87f162e2d0e29db2b6b21c5a3fbcb8be206 (patch) | |
tree | c83ac73e3d569156d4b7f3dab3e7e27e0054cd0d /tools | |
parent | 6092c79fd00ce48ee8698955ea6419cc5cd65641 (diff) | |
parent | c3bebc71c4bcdafa24b506adf0c1de3c1f77e2e0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/mwifiex/pcie.c
net/ipv6/sit.c
The SIT driver conflict consists of a bug fix being done by hand
in 'net' (missing u64_stats_init()) whilst in 'net-next' a helper
was created (netdev_alloc_pcpu_stats()) which takes care of this.
The two wireless conflicts were overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/lockdep/Makefile | 6 | ||||
-rw-r--r-- | tools/lib/lockdep/preload.c | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/lib/lockdep/run_tests.sh | 0 | ||||
-rw-r--r-- | tools/lib/lockdep/uinclude/asm/hash.h | 6 | ||||
-rw-r--r-- | tools/lib/lockdep/uinclude/linux/rcu.h | 5 | ||||
-rw-r--r-- | tools/perf/builtin-report.c | 40 | ||||
-rw-r--r-- | tools/perf/builtin-top.c | 6 | ||||
-rw-r--r-- | tools/perf/builtin-trace.c | 22 | ||||
-rw-r--r-- | tools/perf/config/Makefile | 2 | ||||
-rw-r--r-- | tools/perf/config/feature-checks/Makefile | 2 | ||||
-rw-r--r-- | tools/perf/util/annotate.c | 9 | ||||
-rw-r--r-- | tools/perf/util/annotate.h | 2 | ||||
-rw-r--r-- | tools/perf/util/include/linux/bitops.h | 4 | ||||
-rw-r--r-- | tools/perf/util/parse-events.c | 17 | ||||
-rw-r--r-- | tools/perf/util/probe-event.c | 2 | ||||
-rw-r--r-- | tools/perf/util/session.c | 6 | ||||
-rw-r--r-- | tools/perf/util/symbol.c | 2 |
17 files changed, 104 insertions, 29 deletions
diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile index da8b7aa3d351..07b0b7542511 100644 --- a/tools/lib/lockdep/Makefile +++ b/tools/lib/lockdep/Makefile | |||
@@ -87,8 +87,8 @@ endif # BUILD_SRC | |||
87 | # We process the rest of the Makefile if this is the final invocation of make | 87 | # We process the rest of the Makefile if this is the final invocation of make |
88 | ifeq ($(skip-makefile),) | 88 | ifeq ($(skip-makefile),) |
89 | 89 | ||
90 | srctree := $(if $(BUILD_SRC),$(BUILD_SRC),$(CURDIR)) | 90 | srctree := $(realpath $(if $(BUILD_SRC),$(BUILD_SRC),$(CURDIR))) |
91 | objtree := $(CURDIR) | 91 | objtree := $(realpath $(CURDIR)) |
92 | src := $(srctree) | 92 | src := $(srctree) |
93 | obj := $(objtree) | 93 | obj := $(objtree) |
94 | 94 | ||
@@ -112,7 +112,7 @@ export Q VERBOSE | |||
112 | 112 | ||
113 | LIBLOCKDEP_VERSION = $(LL_VERSION).$(LL_PATCHLEVEL).$(LL_EXTRAVERSION) | 113 | LIBLOCKDEP_VERSION = $(LL_VERSION).$(LL_PATCHLEVEL).$(LL_EXTRAVERSION) |
114 | 114 | ||
115 | INCLUDES = -I. -I/usr/local/include -I./uinclude $(CONFIG_INCLUDES) | 115 | INCLUDES = -I. -I/usr/local/include -I./uinclude -I./include $(CONFIG_INCLUDES) |
116 | 116 | ||
117 | # Set compile option CFLAGS if not set elsewhere | 117 | # Set compile option CFLAGS if not set elsewhere |
118 | CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g | 118 | CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g |
diff --git a/tools/lib/lockdep/preload.c b/tools/lib/lockdep/preload.c index f8465a811aa5..23bd69cb5ade 100644 --- a/tools/lib/lockdep/preload.c +++ b/tools/lib/lockdep/preload.c | |||
@@ -418,7 +418,7 @@ int pthread_rwlock_unlock(pthread_rwlock_t *rwlock) | |||
418 | 418 | ||
419 | __attribute__((constructor)) static void init_preload(void) | 419 | __attribute__((constructor)) static void init_preload(void) |
420 | { | 420 | { |
421 | if (__init_state != done) | 421 | if (__init_state == done) |
422 | return; | 422 | return; |
423 | 423 | ||
424 | #ifndef __GLIBC__ | 424 | #ifndef __GLIBC__ |
diff --git a/tools/lib/lockdep/run_tests.sh b/tools/lib/lockdep/run_tests.sh index 5334ad9d39b7..5334ad9d39b7 100644..100755 --- a/tools/lib/lockdep/run_tests.sh +++ b/tools/lib/lockdep/run_tests.sh | |||
diff --git a/tools/lib/lockdep/uinclude/asm/hash.h b/tools/lib/lockdep/uinclude/asm/hash.h new file mode 100644 index 000000000000..d82b170bb216 --- /dev/null +++ b/tools/lib/lockdep/uinclude/asm/hash.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_GENERIC_HASH_H | ||
2 | #define __ASM_GENERIC_HASH_H | ||
3 | |||
4 | /* Stub */ | ||
5 | |||
6 | #endif /* __ASM_GENERIC_HASH_H */ | ||
diff --git a/tools/lib/lockdep/uinclude/linux/rcu.h b/tools/lib/lockdep/uinclude/linux/rcu.h index 4c99fcb5da27..042ee8e463c9 100644 --- a/tools/lib/lockdep/uinclude/linux/rcu.h +++ b/tools/lib/lockdep/uinclude/linux/rcu.h | |||
@@ -13,4 +13,9 @@ static inline int rcu_is_cpu_idle(void) | |||
13 | return 1; | 13 | return 1; |
14 | } | 14 | } |
15 | 15 | ||
16 | static inline bool rcu_is_watching(void) | ||
17 | { | ||
18 | return false; | ||
19 | } | ||
20 | |||
16 | #endif | 21 | #endif |
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 3c53ec268fbc..02f985f3a396 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -113,14 +113,16 @@ static int report__add_mem_hist_entry(struct perf_tool *tool, struct addr_locati | |||
113 | if (!he) | 113 | if (!he) |
114 | return -ENOMEM; | 114 | return -ENOMEM; |
115 | 115 | ||
116 | err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); | 116 | if (ui__has_annotation()) { |
117 | if (err) | 117 | err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); |
118 | goto out; | 118 | if (err) |
119 | goto out; | ||
119 | 120 | ||
120 | mx = he->mem_info; | 121 | mx = he->mem_info; |
121 | err = addr_map_symbol__inc_samples(&mx->daddr, evsel->idx); | 122 | err = addr_map_symbol__inc_samples(&mx->daddr, evsel->idx); |
122 | if (err) | 123 | if (err) |
123 | goto out; | 124 | goto out; |
125 | } | ||
124 | 126 | ||
125 | evsel->hists.stats.total_period += cost; | 127 | evsel->hists.stats.total_period += cost; |
126 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); | 128 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); |
@@ -164,14 +166,18 @@ static int report__add_branch_hist_entry(struct perf_tool *tool, struct addr_loc | |||
164 | he = __hists__add_entry(&evsel->hists, al, parent, &bi[i], NULL, | 166 | he = __hists__add_entry(&evsel->hists, al, parent, &bi[i], NULL, |
165 | 1, 1, 0); | 167 | 1, 1, 0); |
166 | if (he) { | 168 | if (he) { |
167 | bx = he->branch_info; | 169 | if (ui__has_annotation()) { |
168 | err = addr_map_symbol__inc_samples(&bx->from, evsel->idx); | 170 | bx = he->branch_info; |
169 | if (err) | 171 | err = addr_map_symbol__inc_samples(&bx->from, |
170 | goto out; | 172 | evsel->idx); |
171 | 173 | if (err) | |
172 | err = addr_map_symbol__inc_samples(&bx->to, evsel->idx); | 174 | goto out; |
173 | if (err) | 175 | |
174 | goto out; | 176 | err = addr_map_symbol__inc_samples(&bx->to, |
177 | evsel->idx); | ||
178 | if (err) | ||
179 | goto out; | ||
180 | } | ||
175 | 181 | ||
176 | evsel->hists.stats.total_period += 1; | 182 | evsel->hists.stats.total_period += 1; |
177 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); | 183 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); |
@@ -205,7 +211,9 @@ static int report__add_hist_entry(struct perf_tool *tool, struct perf_evsel *evs | |||
205 | if (err) | 211 | if (err) |
206 | goto out; | 212 | goto out; |
207 | 213 | ||
208 | err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); | 214 | if (ui__has_annotation()) |
215 | err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); | ||
216 | |||
209 | evsel->hists.stats.total_period += sample->period; | 217 | evsel->hists.stats.total_period += sample->period; |
210 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); | 218 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); |
211 | out: | 219 | out: |
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 76cd510d34d0..5f989a7d8bc2 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -176,7 +176,7 @@ static void perf_top__record_precise_ip(struct perf_top *top, | |||
176 | { | 176 | { |
177 | struct annotation *notes; | 177 | struct annotation *notes; |
178 | struct symbol *sym; | 178 | struct symbol *sym; |
179 | int err; | 179 | int err = 0; |
180 | 180 | ||
181 | if (he == NULL || he->ms.sym == NULL || | 181 | if (he == NULL || he->ms.sym == NULL || |
182 | ((top->sym_filter_entry == NULL || | 182 | ((top->sym_filter_entry == NULL || |
@@ -190,7 +190,9 @@ static void perf_top__record_precise_ip(struct perf_top *top, | |||
190 | return; | 190 | return; |
191 | 191 | ||
192 | ip = he->ms.map->map_ip(he->ms.map, ip); | 192 | ip = he->ms.map->map_ip(he->ms.map, ip); |
193 | err = hist_entry__inc_addr_samples(he, counter, ip); | 193 | |
194 | if (ui__has_annotation()) | ||
195 | err = hist_entry__inc_addr_samples(he, counter, ip); | ||
194 | 196 | ||
195 | pthread_mutex_unlock(¬es->lock); | 197 | pthread_mutex_unlock(¬es->lock); |
196 | 198 | ||
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 896f27047ed6..6aa6fb6f7bd9 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -37,6 +37,10 @@ | |||
37 | # define MADV_UNMERGEABLE 13 | 37 | # define MADV_UNMERGEABLE 13 |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifndef EFD_SEMAPHORE | ||
41 | # define EFD_SEMAPHORE 1 | ||
42 | #endif | ||
43 | |||
40 | struct tp_field { | 44 | struct tp_field { |
41 | int offset; | 45 | int offset; |
42 | union { | 46 | union { |
@@ -279,6 +283,11 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size, | |||
279 | 283 | ||
280 | #define SCA_STRARRAY syscall_arg__scnprintf_strarray | 284 | #define SCA_STRARRAY syscall_arg__scnprintf_strarray |
281 | 285 | ||
286 | #if defined(__i386__) || defined(__x86_64__) | ||
287 | /* | ||
288 | * FIXME: Make this available to all arches as soon as the ioctl beautifier | ||
289 | * gets rewritten to support all arches. | ||
290 | */ | ||
282 | static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, | 291 | static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, |
283 | struct syscall_arg *arg) | 292 | struct syscall_arg *arg) |
284 | { | 293 | { |
@@ -286,6 +295,7 @@ static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, | |||
286 | } | 295 | } |
287 | 296 | ||
288 | #define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray | 297 | #define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray |
298 | #endif /* defined(__i386__) || defined(__x86_64__) */ | ||
289 | 299 | ||
290 | static size_t syscall_arg__scnprintf_fd(char *bf, size_t size, | 300 | static size_t syscall_arg__scnprintf_fd(char *bf, size_t size, |
291 | struct syscall_arg *arg); | 301 | struct syscall_arg *arg); |
@@ -839,6 +849,10 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal | |||
839 | 849 | ||
840 | #define SCA_SIGNUM syscall_arg__scnprintf_signum | 850 | #define SCA_SIGNUM syscall_arg__scnprintf_signum |
841 | 851 | ||
852 | #if defined(__i386__) || defined(__x86_64__) | ||
853 | /* | ||
854 | * FIXME: Make this available to all arches. | ||
855 | */ | ||
842 | #define TCGETS 0x5401 | 856 | #define TCGETS 0x5401 |
843 | 857 | ||
844 | static const char *tioctls[] = { | 858 | static const char *tioctls[] = { |
@@ -860,6 +874,7 @@ static const char *tioctls[] = { | |||
860 | }; | 874 | }; |
861 | 875 | ||
862 | static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); | 876 | static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); |
877 | #endif /* defined(__i386__) || defined(__x86_64__) */ | ||
863 | 878 | ||
864 | #define STRARRAY(arg, name, array) \ | 879 | #define STRARRAY(arg, name, array) \ |
865 | .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \ | 880 | .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \ |
@@ -941,9 +956,16 @@ static struct syscall_fmt { | |||
941 | { .name = "getrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), }, | 956 | { .name = "getrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), }, |
942 | { .name = "ioctl", .errmsg = true, | 957 | { .name = "ioctl", .errmsg = true, |
943 | .arg_scnprintf = { [0] = SCA_FD, /* fd */ | 958 | .arg_scnprintf = { [0] = SCA_FD, /* fd */ |
959 | #if defined(__i386__) || defined(__x86_64__) | ||
960 | /* | ||
961 | * FIXME: Make this available to all arches. | ||
962 | */ | ||
944 | [1] = SCA_STRHEXARRAY, /* cmd */ | 963 | [1] = SCA_STRHEXARRAY, /* cmd */ |
945 | [2] = SCA_HEX, /* arg */ }, | 964 | [2] = SCA_HEX, /* arg */ }, |
946 | .arg_parm = { [1] = &strarray__tioctls, /* cmd */ }, }, | 965 | .arg_parm = { [1] = &strarray__tioctls, /* cmd */ }, }, |
966 | #else | ||
967 | [2] = SCA_HEX, /* arg */ }, }, | ||
968 | #endif | ||
947 | { .name = "kill", .errmsg = true, | 969 | { .name = "kill", .errmsg = true, |
948 | .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, }, | 970 | .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, }, |
949 | { .name = "linkat", .errmsg = true, | 971 | { .name = "linkat", .errmsg = true, |
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index c48d44958172..0331ea2701a3 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -478,7 +478,7 @@ else | |||
478 | endif | 478 | endif |
479 | 479 | ||
480 | ifeq ($(feature-libbfd), 1) | 480 | ifeq ($(feature-libbfd), 1) |
481 | EXTLIBS += -lbfd | 481 | EXTLIBS += -lbfd -lz -liberty |
482 | endif | 482 | endif |
483 | 483 | ||
484 | ifdef NO_DEMANGLE | 484 | ifdef NO_DEMANGLE |
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile index 12e551346fa6..523b7bc10553 100644 --- a/tools/perf/config/feature-checks/Makefile +++ b/tools/perf/config/feature-checks/Makefile | |||
@@ -121,7 +121,7 @@ test-libpython-version.bin: | |||
121 | $(BUILD) $(FLAGS_PYTHON_EMBED) | 121 | $(BUILD) $(FLAGS_PYTHON_EMBED) |
122 | 122 | ||
123 | test-libbfd.bin: | 123 | test-libbfd.bin: |
124 | $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl | 124 | $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl |
125 | 125 | ||
126 | test-liberty.bin: | 126 | test-liberty.bin: |
127 | $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty | 127 | $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty |
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 469eb679fb9d..3aa555ff9d89 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -8,6 +8,8 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "util.h" | 10 | #include "util.h" |
11 | #include "ui/ui.h" | ||
12 | #include "sort.h" | ||
11 | #include "build-id.h" | 13 | #include "build-id.h" |
12 | #include "color.h" | 14 | #include "color.h" |
13 | #include "cache.h" | 15 | #include "cache.h" |
@@ -489,7 +491,7 @@ static int symbol__inc_addr_samples(struct symbol *sym, struct map *map, | |||
489 | { | 491 | { |
490 | struct annotation *notes; | 492 | struct annotation *notes; |
491 | 493 | ||
492 | if (sym == NULL || use_browser != 1 || !sort__has_sym) | 494 | if (sym == NULL) |
493 | return 0; | 495 | return 0; |
494 | 496 | ||
495 | notes = symbol__annotation(sym); | 497 | notes = symbol__annotation(sym); |
@@ -1399,3 +1401,8 @@ int hist_entry__annotate(struct hist_entry *he, size_t privsize) | |||
1399 | { | 1401 | { |
1400 | return symbol__annotate(he->ms.sym, he->ms.map, privsize); | 1402 | return symbol__annotate(he->ms.sym, he->ms.map, privsize); |
1401 | } | 1403 | } |
1404 | |||
1405 | bool ui__has_annotation(void) | ||
1406 | { | ||
1407 | return use_browser == 1 && sort__has_sym; | ||
1408 | } | ||
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index b2aef59d6bb2..56ad4f5287de 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h | |||
@@ -151,6 +151,8 @@ void symbol__annotate_zero_histogram(struct symbol *sym, int evidx); | |||
151 | void symbol__annotate_decay_histogram(struct symbol *sym, int evidx); | 151 | void symbol__annotate_decay_histogram(struct symbol *sym, int evidx); |
152 | void disasm__purge(struct list_head *head); | 152 | void disasm__purge(struct list_head *head); |
153 | 153 | ||
154 | bool ui__has_annotation(void); | ||
155 | |||
154 | int symbol__tty_annotate(struct symbol *sym, struct map *map, | 156 | int symbol__tty_annotate(struct symbol *sym, struct map *map, |
155 | struct perf_evsel *evsel, bool print_lines, | 157 | struct perf_evsel *evsel, bool print_lines, |
156 | bool full_paths, int min_pcnt, int max_lines); | 158 | bool full_paths, int min_pcnt, int max_lines); |
diff --git a/tools/perf/util/include/linux/bitops.h b/tools/perf/util/include/linux/bitops.h index 45cf10a562bd..dadfa7e54287 100644 --- a/tools/perf/util/include/linux/bitops.h +++ b/tools/perf/util/include/linux/bitops.h | |||
@@ -87,13 +87,15 @@ static __always_inline unsigned long __ffs(unsigned long word) | |||
87 | return num; | 87 | return num; |
88 | } | 88 | } |
89 | 89 | ||
90 | typedef const unsigned long __attribute__((__may_alias__)) long_alias_t; | ||
91 | |||
90 | /* | 92 | /* |
91 | * Find the first set bit in a memory region. | 93 | * Find the first set bit in a memory region. |
92 | */ | 94 | */ |
93 | static inline unsigned long | 95 | static inline unsigned long |
94 | find_first_bit(const unsigned long *addr, unsigned long size) | 96 | find_first_bit(const unsigned long *addr, unsigned long size) |
95 | { | 97 | { |
96 | const unsigned long *p = addr; | 98 | long_alias_t *p = (long_alias_t *) addr; |
97 | unsigned long result = 0; | 99 | unsigned long result = 0; |
98 | unsigned long tmp; | 100 | unsigned long tmp; |
99 | 101 | ||
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index d248fca6d7ed..1e15df10a88c 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -1091,12 +1091,12 @@ int is_valid_tracepoint(const char *event_string) | |||
1091 | static bool is_event_supported(u8 type, unsigned config) | 1091 | static bool is_event_supported(u8 type, unsigned config) |
1092 | { | 1092 | { |
1093 | bool ret = true; | 1093 | bool ret = true; |
1094 | int open_return; | ||
1094 | struct perf_evsel *evsel; | 1095 | struct perf_evsel *evsel; |
1095 | struct perf_event_attr attr = { | 1096 | struct perf_event_attr attr = { |
1096 | .type = type, | 1097 | .type = type, |
1097 | .config = config, | 1098 | .config = config, |
1098 | .disabled = 1, | 1099 | .disabled = 1, |
1099 | .exclude_kernel = 1, | ||
1100 | }; | 1100 | }; |
1101 | struct { | 1101 | struct { |
1102 | struct thread_map map; | 1102 | struct thread_map map; |
@@ -1108,7 +1108,20 @@ static bool is_event_supported(u8 type, unsigned config) | |||
1108 | 1108 | ||
1109 | evsel = perf_evsel__new(&attr); | 1109 | evsel = perf_evsel__new(&attr); |
1110 | if (evsel) { | 1110 | if (evsel) { |
1111 | ret = perf_evsel__open(evsel, NULL, &tmap.map) >= 0; | 1111 | open_return = perf_evsel__open(evsel, NULL, &tmap.map); |
1112 | ret = open_return >= 0; | ||
1113 | |||
1114 | if (open_return == -EACCES) { | ||
1115 | /* | ||
1116 | * This happens if the paranoid value | ||
1117 | * /proc/sys/kernel/perf_event_paranoid is set to 2 | ||
1118 | * Re-run with exclude_kernel set; we don't do that | ||
1119 | * by default as some ARM machines do not support it. | ||
1120 | * | ||
1121 | */ | ||
1122 | evsel->attr.exclude_kernel = 1; | ||
1123 | ret = perf_evsel__open(evsel, NULL, &tmap.map) >= 0; | ||
1124 | } | ||
1112 | perf_evsel__delete(evsel); | 1125 | perf_evsel__delete(evsel); |
1113 | } | 1126 | } |
1114 | 1127 | ||
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index a8a9b6cd93a8..d8b048c20cde 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -336,8 +336,8 @@ static int add_exec_to_probe_trace_events(struct probe_trace_event *tevs, | |||
336 | return ret; | 336 | return ret; |
337 | 337 | ||
338 | for (i = 0; i < ntevs && ret >= 0; i++) { | 338 | for (i = 0; i < ntevs && ret >= 0; i++) { |
339 | /* point.address is the addres of point.symbol + point.offset */ | ||
339 | offset = tevs[i].point.address - stext; | 340 | offset = tevs[i].point.address - stext; |
340 | offset += tevs[i].point.offset; | ||
341 | tevs[i].point.offset = 0; | 341 | tevs[i].point.offset = 0; |
342 | zfree(&tevs[i].point.symbol); | 342 | zfree(&tevs[i].point.symbol); |
343 | ret = e_snprintf(buf, 32, "0x%lx", offset); | 343 | ret = e_snprintf(buf, 32, "0x%lx", offset); |
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 0b39a48e5110..5da6ce74c676 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -1008,6 +1008,12 @@ static int perf_session__process_user_event(struct perf_session *session, union | |||
1008 | if (err == 0) | 1008 | if (err == 0) |
1009 | perf_session__set_id_hdr_size(session); | 1009 | perf_session__set_id_hdr_size(session); |
1010 | return err; | 1010 | return err; |
1011 | case PERF_RECORD_HEADER_EVENT_TYPE: | ||
1012 | /* | ||
1013 | * Depreceated, but we need to handle it for sake | ||
1014 | * of old data files create in pipe mode. | ||
1015 | */ | ||
1016 | return 0; | ||
1011 | case PERF_RECORD_HEADER_TRACING_DATA: | 1017 | case PERF_RECORD_HEADER_TRACING_DATA: |
1012 | /* setup for reading amidst mmap */ | 1018 | /* setup for reading amidst mmap */ |
1013 | lseek(fd, file_offset, SEEK_SET); | 1019 | lseek(fd, file_offset, SEEK_SET); |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index a9d758a3b371..e89afc097d8a 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1336,6 +1336,8 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter) | |||
1336 | 1336 | ||
1337 | if (syms_ss && runtime_ss) | 1337 | if (syms_ss && runtime_ss) |
1338 | break; | 1338 | break; |
1339 | } else { | ||
1340 | symsrc__destroy(ss); | ||
1339 | } | 1341 | } |
1340 | 1342 | ||
1341 | } | 1343 | } |