]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
perf_counter: Start documenting HAVE_PERF_COUNTERS requirements
authorMike Frysinger <vapier@gentoo.org>
Fri, 12 Jun 2009 17:17:43 +0000 (13:17 -0400)
committerIngo Molnar <mingo@elte.hu>
Fri, 12 Jun 2009 17:37:30 +0000 (19:37 +0200)
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>
init/Kconfig
tools/perf/design.txt

index c649657e22590e74610f05d5eb904d9534d4fd2f..d3a50967c337a95622b52478f6e6382405dd6fc2 100644 (file)
@@ -936,6 +936,8 @@ config AIO
 
 config HAVE_PERF_COUNTERS
        bool
+       help
+         See tools/perf/design.txt for details.
 
 menu "Performance Counters"
 
index 860e116d979c834e0bdd68825a4cb83b8adf25da..f71e0d245cbada875af754e3cbae74a418fabbce 100644 (file)
@@ -440,3 +440,18 @@ by this process or by another, and doesn't affect any counters that
 this process has created on other processes.  It only enables or
 disables the group leaders, not any other members in the groups.
 
+
+Arch requirements
+-----------------
+
+If your architecture does not have hardware performance metrics, you can
+still use the generic software counters based on hrtimers for sampling.
+
+So to start with, in order to add HAVE_PERF_COUNTERS to your Kconfig, you
+will need at least this:
+       - asm/perf_counter.h - a basic stub will suffice at first
+       - support for atomic64 types (and associated helper functions)
+       - set_perf_counter_pending() implemented
+
+If your architecture does have hardware capabilities, you can override the
+weak stub hw_perf_counter_init() to register hardware counters.