public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
@ 2009-06-12 17:17 Mike Frysinger
  2009-06-12 17:17 ` Randy Dunlap
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Mike Frysinger @ 2009-06-12 17:17 UTC (permalink / raw)
  To: Peter Zijlstra, Paul Mackerras, Ingo Molnar; +Cc: linux-kernel

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

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
i imagine more details would be good, but this is a starting point and
better than nothing

 init/Kconfig          |    2 ++
 tools/perf/design.txt |   15 +++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index c649657..20f85b1 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -936,6 +936,8 @@ config AIO
 
 config HAVE_PERF_COUNTERS
 	bool
+	help
+	  See end of tools/perf/design.txt
 
 menu "Performance Counters"
 
diff --git a/tools/perf/design.txt b/tools/perf/design.txt
index 860e116..f71e0d2 100644
--- a/tools/perf/design.txt
+++ b/tools/perf/design.txt
@@ -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.
-- 
1.6.3.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-06-14  9:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-12 17:17 [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements Mike Frysinger
2009-06-12 17:17 ` Randy Dunlap
2009-06-12 17:27   ` Mike Frysinger
2009-06-14  9:41     ` Paul Mundt
2009-06-14  9:51       ` Mike Frysinger
2009-06-12 17:30 ` Ingo Molnar
2009-06-12 17:32   ` Mike Frysinger
2009-06-12 17:36     ` Ingo Molnar
2009-06-12 17:40       ` Mike Frysinger
2009-06-12 17:40         ` Randy Dunlap
2009-06-12 17:56           ` Sam Ravnborg
2009-06-12 17:53             ` Randy Dunlap
2009-06-12 17:33 ` [tip:perfcounters/core] perf_counter: Start " tip-bot for Mike Frysinger
2009-06-12 17:39 ` tip-bot for Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox