aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-script.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 662366ceb572..c286b49c81b2 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -549,14 +549,6 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
549 struct machine *machine) 549 struct machine *machine)
550{ 550{
551 struct addr_location al; 551 struct addr_location al;
552 struct thread *thread = machine__findnew_thread(machine, sample->pid,
553 sample->tid);
554
555 if (thread == NULL) {
556 pr_debug("problem processing %d event, skipping it.\n",
557 event->header.type);
558 return -1;
559 }
560 552
561 if (debug_mode) { 553 if (debug_mode) {
562 if (sample->time < last_timestamp) { 554 if (sample->time < last_timestamp) {
@@ -581,7 +573,7 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
581 if (cpu_list && !test_bit(sample->cpu, cpu_bitmap)) 573 if (cpu_list && !test_bit(sample->cpu, cpu_bitmap))
582 return 0; 574 return 0;
583 575
584 scripting_ops->process_event(event, sample, evsel, thread, &al); 576 scripting_ops->process_event(event, sample, evsel, al.thread, &al);
585 577
586 return 0; 578 return 0;
587} 579}