Ian Rogers
f24768983d
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: 94d5d1b2d891 ("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:24:42 +02:00
..
2020-04-02 16:34:37 +02:00
2020-04-02 16:34:27 +02:00
2017-08-22 18:43:23 -07:00
2020-01-27 14:46:34 +01:00
2020-05-02 17:24:42 +02:00
2020-05-02 17:24:14 +02:00
2020-04-24 08:00:28 +02:00
2019-10-07 18:55:09 +02:00
2020-04-24 08:01:23 +02:00
2020-01-09 10:17:53 +01:00
2019-12-01 09:13:17 +01:00
2019-05-31 06:47:33 -07:00
2020-04-24 08:00:26 +02:00
2020-02-14 16:32:20 -05:00
2020-04-24 08:00:56 +02:00
2018-01-10 09:31:17 +01:00
2018-02-16 20:23:05 +01:00
2017-11-02 11:10:55 +01:00
2019-12-17 20:37:27 +01:00
2020-05-02 17:24:31 +02:00
2017-09-03 20:21:24 -04:00
2020-03-11 18:02:48 +01:00
2019-12-01 09:14:03 +01:00
2018-11-13 11:15:08 -08:00
2017-11-02 11:10:55 +01:00
2018-05-16 10:10:26 +02:00
2017-07-31 13:09:49 +02:00
2020-04-24 08:00:41 +02:00
2018-01-17 09:45:27 +01:00
2020-01-09 10:17:54 +01:00
2018-08-03 07:50:38 +02:00
2017-11-02 11:10:55 +01:00
2019-10-11 18:18:42 +02:00
2017-11-02 11:10:55 +01:00
2020-01-09 10:17:56 +01:00
2017-09-23 16:50:20 -04:00
2019-12-05 15:38:26 +01:00
2020-04-02 16:34:21 +02:00
2017-12-20 10:10:18 +01:00
2019-04-20 09:15:05 +02:00
2018-12-05 19:41:17 +01:00
2019-09-21 07:15:38 +02:00
2017-11-02 11:10:55 +01:00
2018-08-03 07:50:22 +02:00
2019-11-24 08:23:15 +01:00
2017-11-02 11:10:55 +01:00
2020-04-24 08:00:44 +02:00
2020-03-11 18:02:57 +01:00
2018-08-03 07:50:21 +02:00
2019-12-05 15:38:22 +01:00
2019-01-13 10:01:02 +01:00
2020-02-14 16:32:06 -05:00
2020-04-02 16:34:20 +02:00
2020-04-13 10:34:27 +02:00
2019-10-17 13:43:19 -07:00
2017-10-03 17:54:26 -07:00
2019-07-31 07:28:21 +02:00
2017-08-21 12:47:31 -07:00
2020-01-23 08:20:32 +01:00
2017-11-02 11:10:55 +01:00
2019-03-13 14:03:20 -07:00
2018-04-24 09:36:22 +02:00
2018-05-22 18:54:04 +02:00
2020-04-24 08:00:38 +02:00
2019-02-12 19:46:13 +01:00
2017-10-04 10:53:54 +02:00
2017-11-02 11:10:55 +01:00
2018-08-15 18:12:47 +02:00
2018-09-05 09:26:36 +02:00
2017-11-02 11:10:55 +01:00
2019-06-15 11:54:52 +02:00
2017-11-02 11:10:55 +01:00
2020-01-04 13:59:57 +01:00
2017-12-25 14:26:21 +01:00
2020-01-09 10:17:53 +01:00
2017-07-25 13:04:45 -07:00
2018-05-09 09:51:50 +02:00
2017-12-20 10:10:18 +01:00
2017-09-08 18:26:50 -07:00
2017-08-29 15:14:38 +02:00
2018-09-09 19:56:00 +02:00
2018-09-09 19:56:00 +02:00
2018-09-05 09:26:42 +02:00
2020-02-28 16:36:05 +01:00
2017-11-06 12:26:49 -08:00
2020-03-20 10:54:16 +01:00