Paul Mackerras
37d8182838
perf_counter: add an mmap method to allow userspace to read hardware counters
...
Impact: new feature giving performance improvement
This adds the ability for userspace to do an mmap on a hardware counter
fd and get access to a read-only page that contains the information
needed to translate a hardware counter value to the full 64-bit
counter value that would be returned by a read on the fd. This is
useful on architectures that allow user programs to read the hardware
counters, such as PowerPC.
The mmap will only succeed if the counter is a hardware counter
monitoring the current process.
On my quad 2.5GHz PowerPC 970MP machine, userspace can read a counter
and translate it to the full 64-bit value in about 30ns using the
mmapped page, compared to about 830ns for the read syscall on the
counter, so this does give a significant performance improvement.
Signed-off-by: Paul Mackerras <paulus@samba.org >
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl >
Orig-LKML-Reference: <20090323172417.297057964@chello.nl >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-04-06 09:30:26 +02:00
..
2009-04-02 00:49:02 +02:00
2009-04-03 15:24:35 -07:00
2009-03-26 16:05:42 -07:00
2009-04-05 11:04:19 -07:00
2009-01-14 14:15:19 +01:00
2009-03-28 13:05:30 -07:00
2009-04-05 13:48:26 -04:00
2009-04-05 13:49:04 -04:00
2009-01-04 15:14:41 -05:00
2009-04-05 13:40:33 -04:00
2009-04-05 13:49:04 -04:00
2009-01-14 14:15:19 +01:00
2009-04-02 19:04:54 -07:00
2008-11-12 17:17:16 -08:00
2009-04-02 19:04:55 -07:00
2009-01-06 15:59:13 -08:00
2009-03-30 22:05:12 +10:30
2009-04-02 19:04:57 -07:00
2008-11-14 10:39:23 +11:00
2009-01-09 13:59:25 -08:00
2008-12-18 13:54:01 +01:00
2009-01-21 18:51:53 +09:00
2009-03-31 23:00:27 -04:00
2009-04-06 09:02:57 +02:00
2009-04-05 11:04:19 -07:00
2009-04-06 09:02:57 +02:00
2008-10-30 11:38:45 -07:00
2008-11-14 10:39:19 +11:00
2009-03-13 10:32:07 +01:00
2009-01-30 22:35:34 +01:00
2009-02-05 13:04:33 +01:00
2009-03-31 13:05:32 +10:30
2008-12-25 09:31:28 +01:00
2009-04-02 19:05:04 -07:00
2009-03-31 13:05:35 +10:30
2009-03-18 12:51:16 +01:00
2009-01-06 10:44:31 -08:00
2009-03-30 22:05:11 +10:30
2009-02-11 10:18:04 +01:00
2009-02-14 23:28:22 +01:00
2009-02-14 23:28:28 +01:00
2009-02-14 23:27:59 +01:00
2009-04-02 00:49:02 +02:00
2009-04-06 09:02:57 +02:00
2008-11-16 09:52:03 +01:00
2009-04-05 11:04:19 -07:00
2009-01-14 18:09:02 +01:00
2009-01-14 18:09:02 +01:00
2009-01-14 19:03:54 +01:00
2009-01-14 18:09:02 +01:00
2008-11-26 08:22:50 +01:00
2009-04-02 19:04:53 -07:00
2008-11-24 18:57:41 -05:00
2009-03-13 11:25:53 +01:00
2009-03-31 13:05:30 +10:30
2009-04-06 09:30:26 +02:00
2009-04-02 19:04:58 -07:00
2009-04-02 19:05:02 -07:00
2009-03-23 20:43:35 +01:00
2009-01-14 14:15:20 +01:00
2009-04-05 10:23:25 -07:00
2009-02-10 00:50:37 +01:00
2009-04-03 17:35:06 -07:00
2009-02-26 04:08:14 +01:00
2009-03-31 00:09:37 +02:00
2008-12-18 21:56:04 +01:00
2009-02-26 04:08:14 +01:00
2009-03-30 22:05:16 +10:30
2008-12-18 21:56:04 +01:00
2009-02-26 04:08:14 +01:00
2009-04-05 11:04:19 -07:00
2009-01-08 08:31:05 -08:00
2009-01-15 16:39:38 -08:00
2009-04-02 00:49:02 +02:00
2009-01-06 11:07:15 +01:00
2009-03-30 22:05:17 +10:30
2009-03-24 23:16:51 +01:00
2009-02-15 21:15:16 +01:00
2009-03-30 17:17:35 -07:00
2009-03-27 17:28:43 +01:00
2009-03-24 23:16:51 +01:00
2009-04-06 09:30:15 +02:00
2009-03-02 15:41:30 -08:00
2009-04-02 19:04:58 -07:00
2009-04-03 16:42:35 +01:00
2009-03-13 10:47:34 +01:00
2009-04-05 11:04:19 -07:00
2009-01-14 11:48:07 +01:00
2009-04-02 19:05:11 -07:00
2008-12-25 11:44:43 +01:00
2009-03-30 22:05:17 +10:30
2009-01-21 16:37:27 +01:00
2009-04-06 09:02:57 +02:00
2009-02-01 01:04:33 -08:00
2009-04-03 16:42:35 +01:00
2009-01-01 10:12:28 +10:30
2009-01-06 15:59:20 -08:00
2009-01-14 14:15:18 +01:00
2009-03-30 17:17:35 -07:00
2009-03-18 19:55:00 +01:00
2009-03-09 08:13:35 -07:00
2009-01-14 14:15:26 +01:00
2009-01-12 16:04:37 +01:00
2009-02-27 16:26:21 -08:00
2009-03-24 10:52:46 +11:00
2009-04-02 19:05:01 -07:00
2009-02-05 12:56:48 -08:00
2009-04-05 11:04:19 -07:00