|
@@ -2049,6 +2049,7 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
|
|
union perf_event *event __maybe_unused,
|
|
union perf_event *event __maybe_unused,
|
|
struct perf_sample *sample)
|
|
struct perf_sample *sample)
|
|
{
|
|
{
|
|
|
|
+ struct thread *thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
|
|
int callchain_ret = 0;
|
|
int callchain_ret = 0;
|
|
|
|
|
|
if (sample->callchain) {
|
|
if (sample->callchain) {
|
|
@@ -2066,21 +2067,18 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
|
|
if (trace->trace_syscalls)
|
|
if (trace->trace_syscalls)
|
|
fprintf(trace->output, "( ): ");
|
|
fprintf(trace->output, "( ): ");
|
|
|
|
|
|
|
|
+ if (thread)
|
|
|
|
+ trace__fprintf_comm_tid(trace, thread, trace->output);
|
|
|
|
+
|
|
if (evsel == trace->syscalls.events.augmented) {
|
|
if (evsel == trace->syscalls.events.augmented) {
|
|
int id = perf_evsel__sc_tp_uint(evsel, id, sample);
|
|
int id = perf_evsel__sc_tp_uint(evsel, id, sample);
|
|
struct syscall *sc = trace__syscall_info(trace, evsel, id);
|
|
struct syscall *sc = trace__syscall_info(trace, evsel, id);
|
|
|
|
|
|
if (sc) {
|
|
if (sc) {
|
|
- struct thread *thread = machine__findnew_thread(trace->host, sample->pid, sample->tid);
|
|
|
|
-
|
|
|
|
- if (thread) {
|
|
|
|
- trace__fprintf_comm_tid(trace, thread, trace->output);
|
|
|
|
- fprintf(trace->output, "%s(", sc->name);
|
|
|
|
- trace__fprintf_sys_enter(trace, evsel, sample);
|
|
|
|
- fputc(')', trace->output);
|
|
|
|
- thread__put(thread);
|
|
|
|
- goto newline;
|
|
|
|
- }
|
|
|
|
|
|
+ fprintf(trace->output, "%s(", sc->name);
|
|
|
|
+ trace__fprintf_sys_enter(trace, evsel, sample);
|
|
|
|
+ fputc(')', trace->output);
|
|
|
|
+ goto newline;
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -2110,6 +2108,7 @@ newline:
|
|
trace__fprintf_callchain(trace, sample);
|
|
trace__fprintf_callchain(trace, sample);
|
|
else if (callchain_ret < 0)
|
|
else if (callchain_ret < 0)
|
|
pr_err("Problem processing %s callchain, skipping...\n", perf_evsel__name(evsel));
|
|
pr_err("Problem processing %s callchain, skipping...\n", perf_evsel__name(evsel));
|
|
|
|
+ thread__put(thread);
|
|
out:
|
|
out:
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|