diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-annotate.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 1dba568e1941..343e7b14bf01 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -980,6 +980,13 @@ process_fork_event(event_t *event, unsigned long offset, unsigned long head) | |||
980 | (void *)(long)(event->header.size), | 980 | (void *)(long)(event->header.size), |
981 | event->fork.pid, event->fork.ppid); | 981 | event->fork.pid, event->fork.ppid); |
982 | 982 | ||
983 | /* | ||
984 | * A thread clone will have the same PID for both | ||
985 | * parent and child. | ||
986 | */ | ||
987 | if (thread == parent) | ||
988 | return 0; | ||
989 | |||
983 | if (!thread || !parent || thread__fork(thread, parent)) { | 990 | if (!thread || !parent || thread__fork(thread, parent)) { |
984 | dprintf("problem processing PERF_EVENT_FORK, skipping event.\n"); | 991 | dprintf("problem processing PERF_EVENT_FORK, skipping event.\n"); |
985 | return -1; | 992 | return -1; |