public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Mike Frysinger <vapier@gentoo.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, hpa@zytor.com,
	mingo@redhat.com, a.p.zijlstra@chello.nl, vapier@gentoo.org,
	tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perfcounters/core] perf_counter: Start documenting HAVE_PERF_COUNTERS requirements
Date: Fri, 12 Jun 2009 17:33:46 GMT	[thread overview]
Message-ID: <tip-3c1f287bf974b05ad75df3c462fccace10035fbd@git.kernel.org> (raw)
In-Reply-To: <1244827063-24046-1-git-send-email-vapier@gentoo.org>

Commit-ID:  3c1f287bf974b05ad75df3c462fccace10035fbd
Gitweb:     http://git.kernel.org/tip/3c1f287bf974b05ad75df3c462fccace10035fbd
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Fri, 12 Jun 2009 13:17:43 -0400
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 12 Jun 2009 19:29:44 +0200

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>


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

diff --git a/init/Kconfig b/init/Kconfig
index c649657..e03959d 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -934,6 +934,9 @@ config AIO
           by some high performance threaded applications. Disabling
           this option saves about 7k.
 
+#
+# See tools/perf/design.txt about details:
+#
 config HAVE_PERF_COUNTERS
 	bool
 
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.

  parent reply	other threads:[~2009-06-12 17:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for Mike Frysinger [this message]
2009-06-12 17:39 ` [tip:perfcounters/core] perf_counter: Start " tip-bot for Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-3c1f287bf974b05ad75df3c462fccace10035fbd@git.kernel.org \
    --to=vapier@gentoo.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox