Thread (17 messages) 17 messages, 7 authors, 2002-09-17

Re: RFC: Performance Monitor Counters device

From: Segher Boessenkool <hidden>
Date: 2002-09-14 11:36:29

Paul Mackerras wrote:
I'm curious - how are you going to cope with the fact that different
PPC implementations have different numbers of PMCs and different
sets of events (and numbering of the events) that the PMCs will count?
The kernel module doesn't care, except for not allowing illegal values;
userland doesn't care all that much either, really, as a number is just
a number :)  It's mostly the user that cares.

Ah well, an example might clarify:


ppcprofile --pmc1=6 --pmc2=6 ./hello_world

ppcprofile will look for existence of /proc/sys/debug/pmc/pmc[12], and
do some sysctls on it.  i.e., the kernel module will only make entries
for available hardware.

Note that the kernel module doesn't need to check if a certain event
number is defined; it only needs to check if it fits into the number
of bits allocated to it.


Segher


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help