diff options
Diffstat (limited to 'tools/perf/builtin-kmem.c')
-rw-r--r-- | tools/perf/builtin-kmem.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index 0259502638b4..9b5f077fee5b 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
@@ -101,7 +101,7 @@ static int setup_cpunode_map(void) | |||
101 | 101 | ||
102 | dir1 = opendir(PATH_SYS_NODE); | 102 | dir1 = opendir(PATH_SYS_NODE); |
103 | if (!dir1) | 103 | if (!dir1) |
104 | return -1; | 104 | return 0; |
105 | 105 | ||
106 | while ((dent1 = readdir(dir1)) != NULL) { | 106 | while ((dent1 = readdir(dir1)) != NULL) { |
107 | if (dent1->d_type != DT_DIR || | 107 | if (dent1->d_type != DT_DIR || |
@@ -305,7 +305,8 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused, | |||
305 | struct perf_evsel *evsel, | 305 | struct perf_evsel *evsel, |
306 | struct machine *machine) | 306 | struct machine *machine) |
307 | { | 307 | { |
308 | struct thread *thread = machine__findnew_thread(machine, event->ip.pid); | 308 | struct thread *thread = machine__findnew_thread(machine, sample->pid, |
309 | sample->pid); | ||
309 | 310 | ||
310 | if (thread == NULL) { | 311 | if (thread == NULL) { |
311 | pr_debug("problem processing %d event, skipping it.\n", | 312 | pr_debug("problem processing %d event, skipping it.\n", |
@@ -313,7 +314,7 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused, | |||
313 | return -1; | 314 | return -1; |
314 | } | 315 | } |
315 | 316 | ||
316 | dump_printf(" ... thread: %s:%d\n", thread->comm, thread->pid); | 317 | dump_printf(" ... thread: %s:%d\n", thread->comm, thread->tid); |
317 | 318 | ||
318 | if (evsel->handler.func != NULL) { | 319 | if (evsel->handler.func != NULL) { |
319 | tracepoint_handler f = evsel->handler.func; | 320 | tracepoint_handler f = evsel->handler.func; |