aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/event.c4
-rw-r--r--tools/perf/util/probe-event.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 9eb7005bc6d6..705ec63548b4 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -442,10 +442,10 @@ void thread__find_addr_map(struct thread *self,
442 al->thread = self; 442 al->thread = self;
443 al->addr = addr; 443 al->addr = addr;
444 444
445 if (cpumode & PERF_RECORD_MISC_KERNEL) { 445 if (cpumode == PERF_RECORD_MISC_KERNEL) {
446 al->level = 'k'; 446 al->level = 'k';
447 mg = &session->kmaps; 447 mg = &session->kmaps;
448 } else if (cpumode & PERF_RECORD_MISC_USER) 448 } else if (cpumode == PERF_RECORD_MISC_USER)
449 al->level = '.'; 449 al->level = '.';
450 else { 450 else {
451 al->level = 'H'; 451 al->level = 'H';
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 71b0dd590a37..8f0568849691 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -310,6 +310,7 @@ int synthesize_perf_probe_point(struct probe_point *pp)
310 int ret; 310 int ret;
311 311
312 pp->probes[0] = buf = zalloc(MAX_CMDLEN); 312 pp->probes[0] = buf = zalloc(MAX_CMDLEN);
313 pp->found = 1;
313 if (!buf) 314 if (!buf)
314 die("Failed to allocate memory by zalloc."); 315 die("Failed to allocate memory by zalloc.");
315 if (pp->offset) { 316 if (pp->offset) {
@@ -332,6 +333,7 @@ int synthesize_perf_probe_point(struct probe_point *pp)
332error: 333error:
333 free(pp->probes[0]); 334 free(pp->probes[0]);
334 pp->probes[0] = NULL; 335 pp->probes[0] = NULL;
336 pp->found = 0;
335 } 337 }
336 return ret; 338 return ret;
337} 339}
@@ -495,6 +497,7 @@ void show_perf_probe_events(void)
495 497
496 setup_pager(); 498 setup_pager();
497 499
500 memset(&pp, 0, sizeof(pp));
498 fd = open_kprobe_events(O_RDONLY, 0); 501 fd = open_kprobe_events(O_RDONLY, 0);
499 rawlist = get_trace_kprobe_event_rawlist(fd); 502 rawlist = get_trace_kprobe_event_rawlist(fd);
500 close(fd); 503 close(fd);