|
@@ -106,8 +106,12 @@ static pid_t perf_event__synthesize_comm(struct perf_tool *tool,
|
|
|
|
|
|
memset(&event->comm, 0, sizeof(event->comm));
|
|
|
|
|
|
- tgid = perf_event__get_comm_tgid(pid, event->comm.comm,
|
|
|
- sizeof(event->comm.comm));
|
|
|
+ if (machine__is_host(machine))
|
|
|
+ tgid = perf_event__get_comm_tgid(pid, event->comm.comm,
|
|
|
+ sizeof(event->comm.comm));
|
|
|
+ else
|
|
|
+ tgid = machine->pid;
|
|
|
+
|
|
|
if (tgid < 0)
|
|
|
goto out;
|
|
|
|