Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf_counter: Start documenting HAVE_PERF_COUNTERS requirements

Help out arch porters who want to support perf counters by listing some
basic requirements.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1244827063-24046-1-git-send-email-vapier@gentoo.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Mike Frysinger and committed by
Ingo Molnar
018df72d 974802ea

+17
+2
init/Kconfig
··· 936 936 937 937 config HAVE_PERF_COUNTERS 938 938 bool 939 + help 940 + See tools/perf/design.txt for details. 939 941 940 942 menu "Performance Counters" 941 943
+15
tools/perf/design.txt
··· 440 440 this process has created on other processes. It only enables or 441 441 disables the group leaders, not any other members in the groups. 442 442 443 + 444 + Arch requirements 445 + ----------------- 446 + 447 + If your architecture does not have hardware performance metrics, you can 448 + still use the generic software counters based on hrtimers for sampling. 449 + 450 + So to start with, in order to add HAVE_PERF_COUNTERS to your Kconfig, you 451 + will need at least this: 452 + - asm/perf_counter.h - a basic stub will suffice at first 453 + - support for atomic64 types (and associated helper functions) 454 + - set_perf_counter_pending() implemented 455 + 456 + If your architecture does have hardware capabilities, you can override the 457 + weak stub hw_perf_counter_init() to register hardware counters.