diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-02-25 03:40:22 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-25 03:40:26 -0500 |
commit | 996de8c6fe95c5a9fc524241cc8f142ef0605d3d (patch) | |
tree | 0f637ab0d80d6d7e213707ac2d8c1cc16b69523c /tools/perf | |
parent | 017c426138122c8e9b9f5057fbd0567c37b35247 (diff) | |
parent | 60b341b778cc2929df16c0a504c91621b3c6a4ad (diff) |
Merge commit 'v2.6.33' into core/rcu
Merge reason: Update from -rc4 to -final.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/.gitignore | 1 | ||||
-rw-r--r-- | tools/perf/Makefile | 44 | ||||
-rw-r--r-- | tools/perf/builtin-kmem.c | 7 | ||||
-rw-r--r-- | tools/perf/builtin-report.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-timechart.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-top.c | 2 | ||||
-rw-r--r-- | tools/perf/util/event.c | 4 | ||||
-rw-r--r-- | tools/perf/util/probe-event.c | 3 |
8 files changed, 41 insertions, 24 deletions
diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore index fe08660ce0bd..124760bb37b5 100644 --- a/tools/perf/.gitignore +++ b/tools/perf/.gitignore | |||
@@ -13,6 +13,7 @@ perf*.xml | |||
13 | perf*.html | 13 | perf*.html |
14 | common-cmds.h | 14 | common-cmds.h |
15 | perf.data | 15 | perf.data |
16 | perf.data.old | ||
16 | tags | 17 | tags |
17 | TAGS | 18 | TAGS |
18 | cscope* | 19 | cscope* |
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 652a470b5f74..2e7fa3a06806 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -250,7 +250,19 @@ PTHREAD_LIBS = -lpthread | |||
250 | # explicitly what architecture to check for. Fix this up for yours.. | 250 | # explicitly what architecture to check for. Fix this up for yours.. |
251 | SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ | 251 | SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ |
252 | 252 | ||
253 | ifeq ($(shell sh -c "echo 'int foo(void) {char X[2]; return 3;}' | $(CC) -x c -c -Werror -fstack-protector-all - -o /dev/null "$(QUIET_STDERR)" && echo y"), y) | 253 | ifeq ($(V), 2) |
254 | QUIET_STDERR = ">/dev/null" | ||
255 | else | ||
256 | QUIET_STDERR = ">/dev/null 2>&1" | ||
257 | endif | ||
258 | |||
259 | BITBUCKET = "/dev/null" | ||
260 | |||
261 | ifneq ($(shell sh -c "(echo '\#include <stdio.h>'; echo 'int main(void) { return puts(\"hi\"); }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) "$(QUIET_STDERR)" && echo y"), y) | ||
262 | BITBUCKET = .perf.dev.null | ||
263 | endif | ||
264 | |||
265 | ifeq ($(shell sh -c "echo 'int foo(void) {char X[2]; return 3;}' | $(CC) -x c -c -Werror -fstack-protector-all - -o $(BITBUCKET) "$(QUIET_STDERR)" && echo y"), y) | ||
254 | CFLAGS := $(CFLAGS) -fstack-protector-all | 266 | CFLAGS := $(CFLAGS) -fstack-protector-all |
255 | endif | 267 | endif |
256 | 268 | ||
@@ -451,11 +463,6 @@ BUILTIN_OBJS += builtin-kmem.o | |||
451 | 463 | ||
452 | PERFLIBS = $(LIB_FILE) | 464 | PERFLIBS = $(LIB_FILE) |
453 | 465 | ||
454 | ifeq ($(V), 2) | ||
455 | QUIET_STDERR = ">/dev/null" | ||
456 | else | ||
457 | QUIET_STDERR = ">/dev/null 2>&1" | ||
458 | endif | ||
459 | # | 466 | # |
460 | # Platform specific tweaks | 467 | # Platform specific tweaks |
461 | # | 468 | # |
@@ -483,19 +490,19 @@ ifeq ($(uname_S),Darwin) | |||
483 | PTHREAD_LIBS = | 490 | PTHREAD_LIBS = |
484 | endif | 491 | endif |
485 | 492 | ||
486 | ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) | 493 | ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) |
487 | ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) | 494 | ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) |
488 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); | 495 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); |
489 | endif | 496 | endif |
490 | 497 | ||
491 | ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) | 498 | ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) |
492 | BASIC_CFLAGS += -DLIBELF_NO_MMAP | 499 | BASIC_CFLAGS += -DLIBELF_NO_MMAP |
493 | endif | 500 | endif |
494 | else | 501 | else |
495 | msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]); | 502 | msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]); |
496 | endif | 503 | endif |
497 | 504 | ||
498 | ifneq ($(shell sh -c "(echo '\#ifndef _MIPS_SZLONG'; echo '\#define _MIPS_SZLONG 0'; echo '\#endif'; echo '\#include <dwarf.h>'; echo '\#include <libdwarf.h>'; echo 'int main(void) { Dwarf_Debug dbg; Dwarf_Error err; Dwarf_Ranges *rng; dwarf_init(0, DW_DLC_READ, 0, 0, &dbg, &err); dwarf_get_ranges(dbg, 0, &rng, 0, 0, &err); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/libdwarf -ldwarf -lelf -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) | 505 | ifneq ($(shell sh -c "(echo '\#ifndef _MIPS_SZLONG'; echo '\#define _MIPS_SZLONG 0'; echo '\#endif'; echo '\#include <dwarf.h>'; echo '\#include <libdwarf.h>'; echo 'int main(void) { Dwarf_Debug dbg; Dwarf_Error err; Dwarf_Ranges *rng; dwarf_init(0, DW_DLC_READ, 0, 0, &dbg, &err); dwarf_get_ranges(dbg, 0, &rng, 0, 0, &err); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/libdwarf -ldwarf -lelf -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) |
499 | msg := $(warning No libdwarf.h found or old libdwarf.h found, disables dwarf support. Please install libdwarf-dev/libdwarf-devel >= 20081231); | 506 | msg := $(warning No libdwarf.h found or old libdwarf.h found, disables dwarf support. Please install libdwarf-dev/libdwarf-devel >= 20081231); |
500 | BASIC_CFLAGS += -DNO_LIBDWARF | 507 | BASIC_CFLAGS += -DNO_LIBDWARF |
501 | else | 508 | else |
@@ -509,7 +516,7 @@ PERL_EMBED_LDOPTS = `perl -MExtUtils::Embed -e ldopts 2>/dev/null` | |||
509 | PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` | 516 | PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` |
510 | endif | 517 | endif |
511 | 518 | ||
512 | ifneq ($(shell sh -c "(echo '\#include <EXTERN.h>'; echo '\#include <perl.h>'; echo 'int main(void) { perl_alloc(); return 0; }') | $(CC) -x c - $(PERL_EMBED_CCOPTS) -o /dev/null $(PERL_EMBED_LDOPTS) > /dev/null 2>&1 && echo y"), y) | 519 | ifneq ($(shell sh -c "(echo '\#include <EXTERN.h>'; echo '\#include <perl.h>'; echo 'int main(void) { perl_alloc(); return 0; }') | $(CC) -x c - $(PERL_EMBED_CCOPTS) -o $(BITBUCKET) $(PERL_EMBED_LDOPTS) > /dev/null 2>&1 && echo y"), y) |
513 | BASIC_CFLAGS += -DNO_LIBPERL | 520 | BASIC_CFLAGS += -DNO_LIBPERL |
514 | else | 521 | else |
515 | ALL_LDFLAGS += $(PERL_EMBED_LDOPTS) | 522 | ALL_LDFLAGS += $(PERL_EMBED_LDOPTS) |
@@ -519,20 +526,20 @@ endif | |||
519 | ifdef NO_DEMANGLE | 526 | ifdef NO_DEMANGLE |
520 | BASIC_CFLAGS += -DNO_DEMANGLE | 527 | BASIC_CFLAGS += -DNO_DEMANGLE |
521 | else | 528 | else |
522 | has_bfd := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) -lbfd "$(QUIET_STDERR)" && echo y") | 529 | has_bfd := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd "$(QUIET_STDERR)" && echo y") |
523 | 530 | ||
524 | ifeq ($(has_bfd),y) | 531 | ifeq ($(has_bfd),y) |
525 | EXTLIBS += -lbfd | 532 | EXTLIBS += -lbfd |
526 | else | 533 | else |
527 | has_bfd_iberty := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty "$(QUIET_STDERR)" && echo y") | 534 | has_bfd_iberty := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty "$(QUIET_STDERR)" && echo y") |
528 | ifeq ($(has_bfd_iberty),y) | 535 | ifeq ($(has_bfd_iberty),y) |
529 | EXTLIBS += -lbfd -liberty | 536 | EXTLIBS += -lbfd -liberty |
530 | else | 537 | else |
531 | has_bfd_iberty_z := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty -lz "$(QUIET_STDERR)" && echo y") | 538 | has_bfd_iberty_z := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty -lz "$(QUIET_STDERR)" && echo y") |
532 | ifeq ($(has_bfd_iberty_z),y) | 539 | ifeq ($(has_bfd_iberty_z),y) |
533 | EXTLIBS += -lbfd -liberty -lz | 540 | EXTLIBS += -lbfd -liberty -lz |
534 | else | 541 | else |
535 | has_cplus_demangle := $(shell sh -c "(echo 'extern char *cplus_demangle(const char *, int);'; echo 'int main(void) { cplus_demangle(0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) -liberty "$(QUIET_STDERR)" && echo y") | 542 | has_cplus_demangle := $(shell sh -c "(echo 'extern char *cplus_demangle(const char *, int);'; echo 'int main(void) { cplus_demangle(0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) -liberty "$(QUIET_STDERR)" && echo y") |
536 | ifeq ($(has_cplus_demangle),y) | 543 | ifeq ($(has_cplus_demangle),y) |
537 | EXTLIBS += -liberty | 544 | EXTLIBS += -liberty |
538 | BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE | 545 | BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE |
@@ -780,7 +787,7 @@ export TAR INSTALL DESTDIR SHELL_PATH | |||
780 | 787 | ||
781 | SHELL = $(SHELL_PATH) | 788 | SHELL = $(SHELL_PATH) |
782 | 789 | ||
783 | all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) PERF-BUILD-OPTIONS | 790 | all:: .perf.dev.null shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) PERF-BUILD-OPTIONS |
784 | ifneq (,$X) | 791 | ifneq (,$X) |
785 | $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), test '$p' -ef '$p$X' || $(RM) '$p';) | 792 | $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), test '$p' -ef '$p$X' || $(RM) '$p';) |
786 | endif | 793 | endif |
@@ -1107,6 +1114,11 @@ clean: | |||
1107 | .PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS | 1114 | .PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS |
1108 | .PHONY: .FORCE-PERF-BUILD-OPTIONS | 1115 | .PHONY: .FORCE-PERF-BUILD-OPTIONS |
1109 | 1116 | ||
1117 | .perf.dev.null: | ||
1118 | touch .perf.dev.null | ||
1119 | |||
1120 | .INTERMEDIATE: .perf.dev.null | ||
1121 | |||
1110 | ### Make sure built-ins do not have dups and listed in perf.c | 1122 | ### Make sure built-ins do not have dups and listed in perf.c |
1111 | # | 1123 | # |
1112 | check-builtins:: | 1124 | check-builtins:: |
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index 7ceb7416c316..93c67bf53d2c 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
@@ -375,7 +375,7 @@ static void __print_result(struct rb_root *root, struct perf_session *session, | |||
375 | 375 | ||
376 | printf("%.102s\n", graph_dotted_line); | 376 | printf("%.102s\n", graph_dotted_line); |
377 | printf(" %-34s |", is_caller ? "Callsite": "Alloc Ptr"); | 377 | printf(" %-34s |", is_caller ? "Callsite": "Alloc Ptr"); |
378 | printf(" Total_alloc/Per | Total_req/Per | Hit | Ping-pong | Frag\n"); | 378 | printf(" Total_alloc/Per | Total_req/Per | Hit | Ping-pong | Frag\n"); |
379 | printf("%.102s\n", graph_dotted_line); | 379 | printf("%.102s\n", graph_dotted_line); |
380 | 380 | ||
381 | next = rb_first(root); | 381 | next = rb_first(root); |
@@ -401,7 +401,7 @@ static void __print_result(struct rb_root *root, struct perf_session *session, | |||
401 | snprintf(buf, sizeof(buf), "%#Lx", addr); | 401 | snprintf(buf, sizeof(buf), "%#Lx", addr); |
402 | printf(" %-34s |", buf); | 402 | printf(" %-34s |", buf); |
403 | 403 | ||
404 | printf(" %9llu/%-5lu | %9llu/%-5lu | %6lu | %8lu | %6.3f%%\n", | 404 | printf(" %9llu/%-5lu | %9llu/%-5lu | %8lu | %8lu | %6.3f%%\n", |
405 | (unsigned long long)data->bytes_alloc, | 405 | (unsigned long long)data->bytes_alloc, |
406 | (unsigned long)data->bytes_alloc / data->hit, | 406 | (unsigned long)data->bytes_alloc / data->hit, |
407 | (unsigned long long)data->bytes_req, | 407 | (unsigned long long)data->bytes_req, |
@@ -784,7 +784,8 @@ int cmd_kmem(int argc, const char **argv, const char *prefix __used) | |||
784 | setup_sorting(&alloc_sort, default_sort_order); | 784 | setup_sorting(&alloc_sort, default_sort_order); |
785 | 785 | ||
786 | return __cmd_kmem(); | 786 | return __cmd_kmem(); |
787 | } | 787 | } else |
788 | usage_with_options(kmem_usage, kmem_options); | ||
788 | 789 | ||
789 | return 0; | 790 | return 0; |
790 | } | 791 | } |
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index db10c0e8ecae..860f1eeeea7d 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -269,7 +269,7 @@ parse_callchain_opt(const struct option *opt __used, const char *arg, | |||
269 | 269 | ||
270 | else if (!strncmp(tok, "none", strlen(arg))) { | 270 | else if (!strncmp(tok, "none", strlen(arg))) { |
271 | callchain_param.mode = CHAIN_NONE; | 271 | callchain_param.mode = CHAIN_NONE; |
272 | symbol_conf.use_callchain = true; | 272 | symbol_conf.use_callchain = false; |
273 | 273 | ||
274 | return 0; | 274 | return 0; |
275 | } | 275 | } |
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index a589a43112d6..3f8bbcfb1e9b 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c | |||
@@ -280,7 +280,7 @@ static u64 cpus_pstate_state[MAX_CPUS]; | |||
280 | 280 | ||
281 | static int process_comm_event(event_t *event, struct perf_session *session __used) | 281 | static int process_comm_event(event_t *event, struct perf_session *session __used) |
282 | { | 282 | { |
283 | pid_set_comm(event->comm.pid, event->comm.comm); | 283 | pid_set_comm(event->comm.tid, event->comm.comm); |
284 | return 0; | 284 | return 0; |
285 | } | 285 | } |
286 | 286 | ||
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index ddc584b64871..4b91d8cf00ec 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -705,7 +705,7 @@ static void print_mapped_keys(void) | |||
705 | fprintf(stdout, "\t[w] toggle display weighted/count[E]r. \t(%d)\n", display_weighted ? 1 : 0); | 705 | fprintf(stdout, "\t[w] toggle display weighted/count[E]r. \t(%d)\n", display_weighted ? 1 : 0); |
706 | 706 | ||
707 | fprintf(stdout, | 707 | fprintf(stdout, |
708 | "\t[K] hide kernel_symbols symbols. \t(%s)\n", | 708 | "\t[K] hide kernel_symbols symbols. \t(%s)\n", |
709 | hide_kernel_symbols ? "yes" : "no"); | 709 | hide_kernel_symbols ? "yes" : "no"); |
710 | fprintf(stdout, | 710 | fprintf(stdout, |
711 | "\t[U] hide user symbols. \t(%s)\n", | 711 | "\t[U] hide user symbols. \t(%s)\n", |
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index bb0fd6da2d56..8a9e6baa3099 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -295,10 +295,10 @@ void thread__find_addr_location(struct thread *self, | |||
295 | al->thread = self; | 295 | al->thread = self; |
296 | al->addr = addr; | 296 | al->addr = addr; |
297 | 297 | ||
298 | if (cpumode & PERF_RECORD_MISC_KERNEL) { | 298 | if (cpumode == PERF_RECORD_MISC_KERNEL) { |
299 | al->level = 'k'; | 299 | al->level = 'k'; |
300 | mg = &session->kmaps; | 300 | mg = &session->kmaps; |
301 | } else if (cpumode & PERF_RECORD_MISC_USER) | 301 | } else if (cpumode == PERF_RECORD_MISC_USER) |
302 | al->level = '.'; | 302 | al->level = '.'; |
303 | else { | 303 | else { |
304 | al->level = 'H'; | 304 | al->level = 'H'; |
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 29465d440043..fde17b090a47 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -272,6 +272,7 @@ int synthesize_perf_probe_point(struct probe_point *pp) | |||
272 | int ret; | 272 | int ret; |
273 | 273 | ||
274 | pp->probes[0] = buf = zalloc(MAX_CMDLEN); | 274 | pp->probes[0] = buf = zalloc(MAX_CMDLEN); |
275 | pp->found = 1; | ||
275 | if (!buf) | 276 | if (!buf) |
276 | die("Failed to allocate memory by zalloc."); | 277 | die("Failed to allocate memory by zalloc."); |
277 | if (pp->offset) { | 278 | if (pp->offset) { |
@@ -294,6 +295,7 @@ int synthesize_perf_probe_point(struct probe_point *pp) | |||
294 | error: | 295 | error: |
295 | free(pp->probes[0]); | 296 | free(pp->probes[0]); |
296 | pp->probes[0] = NULL; | 297 | pp->probes[0] = NULL; |
298 | pp->found = 0; | ||
297 | } | 299 | } |
298 | return ret; | 300 | return ret; |
299 | } | 301 | } |
@@ -455,6 +457,7 @@ void show_perf_probe_events(void) | |||
455 | struct strlist *rawlist; | 457 | struct strlist *rawlist; |
456 | struct str_node *ent; | 458 | struct str_node *ent; |
457 | 459 | ||
460 | memset(&pp, 0, sizeof(pp)); | ||
458 | fd = open_kprobe_events(O_RDONLY, 0); | 461 | fd = open_kprobe_events(O_RDONLY, 0); |
459 | rawlist = get_trace_kprobe_event_rawlist(fd); | 462 | rawlist = get_trace_kprobe_event_rawlist(fd); |
460 | close(fd); | 463 | close(fd); |