Arnaldo Carvalho de Melo
d008d5258e
perf: Fix up MMAP2 buffer space reservation
The ino_generation field was added in the PERF_RECORD_MMAP2 record in
the 13d7a24
cset but no space for it was allocated, corrupting the
PERF_FORMAT_{TIME,CPU,TID,etc} area (sample_type/sample_id_all), fix it.
Detected with one of the regression tests done by 'perf test':
[root@sandy ~]# perf test -v 7
7: Validate PERF_RECORD_* events & perf_sample fields :
--- start ---
61315294449606 0 PERF_RECORD_SAMPLE
61315294453161 0 PERF_RECORD_SAMPLE
61315294454441 0 PERF_RECORD_SAMPLE
61315294455709 0 PERF_RECORD_SAMPLE
61315295600899 0 PERF_RECORD_COMM: sleep:6500
27917287430500 342521613 PERF_RECORD_MMAP2 6500/6500: [0x400000(0x7000) @ 0 00:1d 311442 9016]: /usr/bin/sleep
MMAP2 going backwards in time, prev=61315295600899, curr=27917287430500
MMAP2 with unexpected cpu, expected 0, got 342521613
MMAP2 with unexpected pid, expected 6500, got 1701606191
MMAP2 with unexpected tid, expected 6500, got 28773
27917287430500 342561333 PERF_RECORD_MMAP2 6500/6500: [0x3b7e000000(0x223000) @ 0 00:1d 309186 9016]: /usr/lib64/ld-2.16.so
MMAP2 with unexpected cpu, expected 0, got 342561333
MMAP2 with unexpected pid, expected 6500, got 1932408369
MMAP2 with unexpected tid, expected 6500, got 111
27917287430500 342600095 PERF_RECORD_MMAP2 6500/6500: [0x7fffbd7dc000(0x1000) @ 0x7fffbd7dc000 00:00 0 0]: [vdso]
MMAP2 with unexpected cpu, expected 0, got 342600095
MMAP2 with unexpected pid, expected 6500, got 1935963739
MMAP2 with unexpected tid, expected 6500, got 23919
27917287430500 342882834 PERF_RECORD_MMAP2 6500/6500: [0x3b7e400000(0x3b8000) @ 0 00:1d 309187 9016]: /usr/lib64/libc-2.16.so
MMAP2 with unexpected cpu, expected 0, got 342882834
MMAP2 with unexpected pid, expected 6500, got 909192754
MMAP2 with unexpected tid, expected 6500, got 7303982
61316297195411 0 PERF_RECORD_EXIT(6500:6500):(6500:6500)
---- end ----
Validate PERF_RECORD_* events & perf_sample fields: FAILED!
[root@sandy ~]#
After this patch:
[root@sandy ~]# perf test 7
7: Validate PERF_RECORD_* events & perf_sample fields : Ok
[root@sandy ~]#
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Stephane Eranian <eranian@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-heeuv986b8ha7whqg4o3he7c@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-09-11 10:11:46 -03:00
..
2013-06-14 23:01:05 +02:00
2013-04-30 17:04:10 -07:00
2013-09-11 10:11:46 -03:00
2013-01-11 11:39:33 -08:00
2013-07-13 15:37:30 -07:00
2013-09-04 08:42:44 -07:00
2013-09-03 11:38:36 -07:00
2013-09-04 09:36:54 -07:00
2013-09-04 09:36:54 -07:00
2013-09-03 07:41:11 +02:00
2013-04-22 07:09:06 -07:00
2013-05-04 14:57:58 -04:00
2013-03-12 13:59:14 -07:00
2013-06-12 16:29:46 -07:00
2013-01-11 14:54:55 -08:00
2013-06-12 16:29:45 -07:00
2013-07-09 10:33:19 -07:00
2013-07-09 10:33:19 -07:00
2013-07-09 10:33:19 -07:00
2013-04-14 10:06:31 -07:00
2013-08-08 20:11:27 -04:00
2013-09-03 18:25:03 -07:00
2013-05-01 07:21:43 -07:00
2013-05-01 17:29:18 -04:00
2013-08-14 17:14:48 +02:00
2012-05-31 17:49:27 -07:00
2013-08-13 12:20:16 +02:00
2013-09-03 18:25:03 -07:00
2012-12-18 10:55:28 -08:00
2013-01-27 19:23:31 +01:00
2013-07-09 10:33:26 -07:00
2013-04-15 13:25:16 +02:00
2013-08-27 13:52:52 -04:00
2013-07-30 14:05:06 +02:00
2013-02-23 18:50:11 -08:00
2013-06-25 23:11:19 +02:00
2013-07-14 19:36:59 -04:00
2013-08-02 11:02:42 +02:00
2013-02-05 00:48:46 +01:00
2013-08-09 07:53:54 -07:00
2013-04-15 15:17:26 +09:30
2012-12-20 17:40:19 -08:00
2013-05-28 08:50:00 +02:00
2013-04-30 17:04:07 -07:00
2013-07-03 16:08:02 -07:00
2013-07-23 10:12:57 +02:00
2012-12-11 18:10:49 -08:00
2013-04-30 17:04:02 -07:00
2013-07-12 13:51:19 +02:00
2012-10-24 12:39:09 +02:00
2013-05-12 14:16:21 +02:00
2013-07-31 14:41:03 -07:00
2013-03-15 15:09:43 +10:30
2012-12-20 17:40:21 -08:00
2012-12-05 11:27:24 +10:30
2012-10-19 17:30:40 -07:00
2013-07-10 14:51:41 -07:00
2013-09-04 08:18:19 -07:00
2013-08-27 13:52:52 -04:00
2012-12-06 17:16:23 +08:00
2013-07-11 09:02:09 -07:00
2013-07-02 15:38:19 +09:30
2013-08-27 13:52:52 -04:00
2013-07-03 16:08:05 -07:00
2013-07-03 16:54:42 +02:00
2013-04-18 12:51:19 +02:00
2013-07-14 19:36:59 -04:00
2013-08-06 13:16:32 -07:00
2013-06-18 11:32:10 -05:00
2013-08-18 17:40:03 -07:00
2013-08-18 17:39:45 -07:00
2013-07-29 17:07:49 -04:00
2013-07-29 17:07:49 -04:00
2013-08-20 11:38:45 -07:00
2013-08-31 14:44:02 -07:00
2013-05-05 00:16:35 -04:00
2013-08-31 14:44:45 -07:00
2013-08-31 14:44:02 -07:00
2013-07-09 10:33:29 -07:00
2013-07-14 19:36:59 -04:00
2012-12-18 15:02:12 -08:00
2013-07-03 16:08:06 -07:00
2013-02-07 20:51:08 +01:00
2013-04-10 14:48:37 +02:00
2013-05-28 09:23:52 +02:00
2013-03-23 15:53:52 -07:00
2013-03-26 11:07:19 +11:00
2013-04-30 17:04:08 -07:00
2013-05-12 14:16:23 +02:00
2013-09-04 08:36:35 -07:00
2013-07-14 19:36:59 -04:00
2012-08-13 17:01:07 +02:00
2013-07-14 19:36:59 -04:00
2013-02-07 15:19:36 -08:00
2013-02-26 22:25:17 +01:00
2013-05-09 13:46:38 -04:00
2013-07-09 10:33:29 -07:00
2013-06-26 18:01:46 +09:00
2013-07-26 14:22:10 -07:00
2012-09-13 16:47:34 +02:00
2012-10-06 03:05:31 +09:00
2013-04-29 18:28:42 -07:00
2013-06-19 12:58:42 +02:00
2013-02-16 23:17:25 +01:00
2013-07-14 19:36:59 -04:00
2013-04-29 13:55:38 -07:00
2013-01-27 19:23:31 +01:00
2013-03-03 22:58:33 -05:00
2013-08-08 13:11:39 -07:00
2013-02-27 19:10:24 -08:00
2013-05-01 17:51:54 -07:00
2013-02-27 19:10:22 -08:00
2013-05-01 17:29:39 -04:00
2013-08-19 09:08:54 -07:00
2013-07-30 22:29:15 +02:00
2013-06-19 12:58:42 +02:00
2013-09-03 18:19:21 -07:00