perf synthetic-events: Ignore dead threads during event synthesis
Changes
1 files changed · +3 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| tools/perf/util/synthetic-events.c | modified | +3 | −2 | View file |
tools/perf/util/synthetic-events.c
View filediff --git a/tools/perf/util/synthetic-events.c b/tools/perf/util/synthetic-events.c
index a068f42..84d17bd 100644
--- a/tools/perf/util/synthetic-events.c
+++ b/tools/perf/util/synthetic-events.c
@@ -767,11 +767,12 @@ static int __event__synthesize_thread(union perf_event *comm_event,
if (*end)
continue;
- rc = -1;
+ /* some threads may exit just after scan, ignore it */
if (perf_event__prepare_comm(comm_event, pid, _pid, machine,
&tgid, &ppid, &kernel_thread) != 0)
- break;
+ continue;
+ rc = -1;
if (perf_event__synthesize_fork(tool, fork_event, _pid, tgid,
ppid, process, machine) < 0)
break;