summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index b72afc7..88387c5 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -521,7 +521,8 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,
if (sc->filtered)
return 0;
- thread = machine__findnew_thread(&trace->host, sample->tid);
+ thread = machine__findnew_thread(&trace->host, sample->pid,
+ sample->tid);
ttrace = thread__trace(thread, trace->output);
if (ttrace == NULL)
return -1;
@@ -572,7 +573,8 @@ static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel,
if (sc->filtered)
return 0;
- thread = machine__findnew_thread(&trace->host, sample->tid);
+ thread = machine__findnew_thread(&trace->host, sample->pid,
+ sample->tid);
ttrace = thread__trace(thread, trace->output);
if (ttrace == NULL)
return -1;
@@ -628,7 +630,9 @@ static int trace__sched_stat_runtime(struct trace *trace, struct perf_evsel *evs
{
u64 runtime = perf_evsel__intval(evsel, sample, "runtime");
double runtime_ms = (double)runtime / NSEC_PER_MSEC;
- struct thread *thread = machine__findnew_thread(&trace->host, sample->tid);
+ struct thread *thread = machine__findnew_thread(&trace->host,
+ sample->pid,
+ sample->tid);
struct thread_trace *ttrace = thread__trace(thread, trace->output);
if (ttrace == NULL)