perf counters: restructure the API
authorIngo Molnar <mingo@elte.hu>
Wed, 10 Dec 2008 11:33:23 +0000 (12:33 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 11 Dec 2008 14:45:48 +0000 (15:45 +0100)
commit9f66a3810fe0d4100972db84290f3ae4a4d77025
tree2101d0d14aecf9d3e406544711e7336e3ea6b3af
parentdfa7c899b401d7dc5d85aca416aee64ac82812f2
perf counters: restructure the API

Impact: clean up new API

Thorough cleanup of the new perf counters API, we now get clean separation
of the various concepts:

 - introduce perf_counter_hw_event to separate out the event source details

 - move special type flags into separate attributes: PERF_COUNT_NMI,
   PERF_COUNT_RAW

 - extend the type to u64 and reserve it fully to the architecture in the
   raw type case.

And make use of all these changes in the core and x86 perfcounters code.

Also change the syscall signature to:

  asmlinkage int sys_perf_counter_open(

struct perf_counter_hw_event *hw_event_uptr __user,
pid_t pid,
int cpu,
int group_fd);

( Note that group_fd is unused for now - it's reserved for the counter
  groups abstraction. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/perf_counter.c
include/linux/perf_counter.h
include/linux/syscalls.h
kernel/perf_counter.c