Ian Rogers
5f8370cdc6
perf/core: fix parent pid/tid in task exit events
commit f3bed55e850926614b9898fe982f66d2541a36a5 upstream.
Current logic yields the child task as the parent.
Before:
$ perf record bash -c "perf list > /dev/null"
$ perf script -D |grep 'FORK\|EXIT'
4387036190981094 0x5a70 [0x30]: PERF_RECORD_FORK(10472:10472):(10470:10470)
4387036606207580 0xf050 [0x30]: PERF_RECORD_EXIT(10472:10472):(10472:10472)
4387036607103839 0x17150 [0x30]: PERF_RECORD_EXIT(10470:10470):(10470:10470)
^
Note the repeated values here -------------------/
After:
383281514043 0x9d8 [0x30]: PERF_RECORD_FORK(2268:2268):(2266:2266)
383442003996 0x2180 [0x30]: PERF_RECORD_EXIT(2268:2268):(2266:2266)
383451297778 0xb70 [0x30]: PERF_RECORD_EXIT(2266:2266):(2265:2265)
Fixes: 94d5d1b2d8 ("perf_counter: Report the cloning task as parent on perf_counter_fork()")
Reported-by: KP Singh <kpsingh@google.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200417182842.12522-1-irogers@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-02 17:25:53 +02:00
..
2020-05-02 17:25:53 +02:00
2020-04-02 15:28:14 +02:00
2020-01-27 14:50:48 +01:00
2020-01-04 19:12:43 +01:00
2020-05-02 17:25:53 +02:00
2020-04-29 16:31:12 +02:00
2020-04-17 10:48:41 +02:00
2019-10-07 18:57:10 +02:00
2020-04-23 10:30:23 +02:00
2020-01-09 10:18:58 +01:00
2020-02-11 04:33:51 -08:00
2020-02-11 04:33:55 -08:00
2020-04-17 10:48:40 +02:00
2020-02-11 04:34:18 -08:00
2020-04-29 16:31:17 +02:00
2019-12-13 08:51:11 +01:00
2019-12-13 08:51:02 +01:00
2020-04-29 16:31:31 +02:00
2020-03-05 16:42:17 +01:00
2019-12-01 09:17:17 +01:00
2020-01-23 08:21:29 +01:00
2020-04-17 10:48:50 +02:00
2020-01-09 10:19:00 +01:00
2019-10-11 18:21:23 +02:00
2020-01-09 10:19:02 +01:00
2020-01-27 14:50:58 +01:00
2020-03-25 08:06:14 +01:00
2019-05-31 06:46:19 -07:00
2019-06-04 08:02:34 +02:00
2019-09-21 07:17:02 +02:00
2019-11-24 08:20:29 +01:00
2020-04-17 10:48:52 +02:00
2020-03-11 14:14:47 +01:00
2019-12-01 09:17:38 +01:00
2020-01-29 16:43:27 +01:00
2020-02-24 08:34:49 +01:00
2020-03-25 08:06:13 +01:00
2020-04-13 10:45:05 +02:00
2019-12-01 09:17:10 +01:00
2019-07-26 09:14:01 +02:00
2020-01-23 08:21:29 +01:00
2019-09-16 08:22:20 +02:00
2020-01-23 08:21:29 +01:00
2020-04-17 10:48:47 +02:00
2019-06-15 11:54:01 +02:00
2020-01-04 19:13:17 +01:00
2020-01-09 10:18:59 +01:00
2020-02-24 08:34:49 +01:00
2020-03-18 07:14:20 +01:00