Message ID | 20240111171305.0bb529f0@gandalf.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | 7f078cfd20721234c7f2543ef235b79bf7e2e894 |
Headers | show |
Series | libtracecmd: Break function graph line if exit is on another CPU | expand |
diff --git a/lib/trace-cmd/trace-ftrace.c b/lib/trace-cmd/trace-ftrace.c index f74f7c2e8b96..89e46c3d1cb4 100644 --- a/lib/trace-cmd/trace-ftrace.c +++ b/lib/trace-cmd/trace-ftrace.c @@ -283,6 +283,14 @@ fgraph_ent_handler(struct trace_seq *s, struct tep_record *record, return trace_seq_putc(s, '!'); rec = tracecmd_peek_next_data(tracecmd_curr_thread_handle, &cpu); + + /* + * If the next event is on another CPU, show it. + * Even if the next event is the return of this function. + */ + if (cpu != record->cpu) + rec = NULL; + if (rec) rec = get_return_for_leaf(s, cpu, pid, val, rec, finfo);