perf tools: Use machine->pid for tgid if machine is guest.