* Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
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-12 17:30 ` Ingo Molnar
` (2 subsequent siblings)
3 siblings, 1 reply; 14+ messages in thread
From: Randy Dunlap @ 2009-06-12 17:17 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, linux-kernel
Mike Frysinger wrote:
> 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
How about
See "Arch requirements" in tools/perf/design.txt
since it doesn't need to be at the end of the file forever.
>
> 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.
--
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
2009-06-12 17:17 ` Randy Dunlap
@ 2009-06-12 17:27 ` Mike Frysinger
2009-06-14 9:41 ` Paul Mundt
0 siblings, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2009-06-12 17:27 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>
---
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..ee2e3c2 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -936,6 +936,8 @@ config AIO
config HAVE_PERF_COUNTERS
bool
+ help
+ See "Arch requirements" in 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
* Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
2009-06-12 17:27 ` Mike Frysinger
@ 2009-06-14 9:41 ` Paul Mundt
2009-06-14 9:51 ` Mike Frysinger
0 siblings, 1 reply; 14+ messages in thread
From: Paul Mundt @ 2009-06-14 9:41 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, linux-kernel
On Fri, Jun 12, 2009 at 01:27:12PM -0400, Mike Frysinger wrote:
> 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.
It would be nice to see this in arch/Kconfig instead, as that tends to
provide a centralized checklist for new features, especially when they
are non-trivial. At least I found the arch/Kconfig bits very helpful for
things like tracehook support, without having to grovel around
Documentation for verbose design documents that I otherwise couldn't care
less about.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
2009-06-14 9:41 ` Paul Mundt
@ 2009-06-14 9:51 ` Mike Frysinger
0 siblings, 0 replies; 14+ messages in thread
From: Mike Frysinger @ 2009-06-14 9:51 UTC (permalink / raw)
To: Paul Mundt, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
linux-kernel
On Sun, Jun 14, 2009 at 05:41, Paul Mundt wrote:
> On Fri, Jun 12, 2009 at 01:27:12PM -0400, Mike Frysinger wrote:
>> 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.
>
> It would be nice to see this in arch/Kconfig instead, as that tends to
> provide a centralized checklist for new features, especially when they
> are non-trivial. At least I found the arch/Kconfig bits very helpful for
> things like tracehook support, without having to grovel around
> Documentation for verbose design documents that I otherwise couldn't care
> less about.
i wouldnt mind moving all of the hidden HAVE_XXX stubs moved to
arch/Kconfig, but documentation doesnt really belong there.
especially in the case of ftrace where the document specifically for
arch porters is pages long (233 lines atm and it doesnt even cover the
really hard stuff). the Kconfig help tip pointing to the right
document should be fine though of course.
config HAVE_XXXX
bool
help
See some/place/where/the/arch/info/is/at/foo.txt
then there is no need to wade through irrelevant crap -- the Kconfig
pointed you to the right place
-mike
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
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:30 ` Ingo Molnar
2009-06-12 17:32 ` Mike Frysinger
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
3 siblings, 1 reply; 14+ messages in thread
From: Ingo Molnar @ 2009-06-12 17:30 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Peter Zijlstra, Paul Mackerras, linux-kernel
* Mike Frysinger <vapier@gentoo.org> wrote:
> 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"
Applied, thanks Mike! I have made a small change: i changed it from
help text into a regular comment. We usually use help texts for
interactive Kconfig options - but this is not one.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
2009-06-12 17:30 ` Ingo Molnar
@ 2009-06-12 17:32 ` Mike Frysinger
2009-06-12 17:36 ` Ingo Molnar
0 siblings, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2009-06-12 17:32 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Peter Zijlstra, Paul Mackerras, linux-kernel
On Fri, Jun 12, 2009 at 13:30, Ingo Molnar wrote:
> * Mike Frysinger <vapier@gentoo.org> wrote:
>> 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"
>
> Applied, thanks Mike! I have made a small change: i changed it from
> help text into a regular comment. We usually use help texts for
> interactive Kconfig options - but this is not one.
yes, but i like the help text because when i use the kconfig search
option, it shows up. otherwise doing a search for HAVE_PERF_COUNTERS
shows nothing useful.
-mike
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
2009-06-12 17:32 ` Mike Frysinger
@ 2009-06-12 17:36 ` Ingo Molnar
2009-06-12 17:40 ` Mike Frysinger
0 siblings, 1 reply; 14+ messages in thread
From: Ingo Molnar @ 2009-06-12 17:36 UTC (permalink / raw)
To: Mike Frysinger; +Cc: Peter Zijlstra, Paul Mackerras, linux-kernel
* Mike Frysinger <vapier.adi@gmail.com> wrote:
> On Fri, Jun 12, 2009 at 13:30, Ingo Molnar wrote:
> > * Mike Frysinger <vapier@gentoo.org> wrote:
> >> 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"
> >
> > Applied, thanks Mike! I have made a small change: i changed it from
> > help text into a regular comment. We usually use help texts for
> > interactive Kconfig options - but this is not one.
>
> yes, but i like the help text because when i use the kconfig
> search option, it shows up. otherwise doing a search for
> HAVE_PERF_COUNTERS shows nothing useful.
When i did this modification i tried that in 'make menuconfig' and
the help didnt show up. Is it only available in certain kconfig
methods?
Ingo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
2009-06-12 17:36 ` Ingo Molnar
@ 2009-06-12 17:40 ` Mike Frysinger
2009-06-12 17:40 ` Randy Dunlap
0 siblings, 1 reply; 14+ messages in thread
From: Mike Frysinger @ 2009-06-12 17:40 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Peter Zijlstra, Paul Mackerras, linux-kernel
On Fri, Jun 12, 2009 at 13:36, Ingo Molnar wrote:
> * Mike Frysinger <vapier.adi@gmail.com> wrote:
>> On Fri, Jun 12, 2009 at 13:30, Ingo Molnar wrote:
>> > * Mike Frysinger <vapier@gentoo.org> wrote:
>> >> 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"
>> >
>> > Applied, thanks Mike! I have made a small change: i changed it from
>> > help text into a regular comment. We usually use help texts for
>> > interactive Kconfig options - but this is not one.
>>
>> yes, but i like the help text because when i use the kconfig
>> search option, it shows up. otherwise doing a search for
>> HAVE_PERF_COUNTERS shows nothing useful.
>
> When i did this modification i tried that in 'make menuconfig' and
> the help didnt show up. Is it only available in certain kconfig
> methods?
hrm, you're right. not sure what i was thinking of. sounds like an
enhancement request though for kconfig.
-mike
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
2009-06-12 17:40 ` Mike Frysinger
@ 2009-06-12 17:40 ` Randy Dunlap
2009-06-12 17:56 ` Sam Ravnborg
0 siblings, 1 reply; 14+ messages in thread
From: Randy Dunlap @ 2009-06-12 17:40 UTC (permalink / raw)
To: Mike Frysinger
Cc: Ingo Molnar, Peter Zijlstra, Paul Mackerras, linux-kernel, samr
Mike Frysinger wrote:
> On Fri, Jun 12, 2009 at 13:36, Ingo Molnar wrote:
>> * Mike Frysinger <vapier.adi@gmail.com> wrote:
>>> On Fri, Jun 12, 2009 at 13:30, Ingo Molnar wrote:
>>>> * Mike Frysinger <vapier@gentoo.org> wrote:
>>>>> 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"
>>>> Applied, thanks Mike! I have made a small change: i changed it from
>>>> help text into a regular comment. We usually use help texts for
>>>> interactive Kconfig options - but this is not one.
>>> yes, but i like the help text because when i use the kconfig
>>> search option, it shows up. otherwise doing a search for
>>> HAVE_PERF_COUNTERS shows nothing useful.
>> When i did this modification i tried that in 'make menuconfig' and
>> the help didnt show up. Is it only available in certain kconfig
>> methods?
There is no prompt string for it, so it's invisible in menuconfig.
xconfig has View options that can show it.
> hrm, you're right. not sure what i was thinking of. sounds like an
> enhancement request though for kconfig.
Could be. Cc: Sam added.
--
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
2009-06-12 17:40 ` Randy Dunlap
@ 2009-06-12 17:56 ` Sam Ravnborg
2009-06-12 17:53 ` Randy Dunlap
0 siblings, 1 reply; 14+ messages in thread
From: Sam Ravnborg @ 2009-06-12 17:56 UTC (permalink / raw)
To: Randy Dunlap
Cc: Mike Frysinger, Ingo Molnar, Peter Zijlstra, Paul Mackerras,
linux-kernel
On Fri, Jun 12, 2009 at 10:40:50AM -0700, Randy Dunlap wrote:
> Mike Frysinger wrote:
> > On Fri, Jun 12, 2009 at 13:36, Ingo Molnar wrote:
> >> * Mike Frysinger <vapier.adi@gmail.com> wrote:
> >>> On Fri, Jun 12, 2009 at 13:30, Ingo Molnar wrote:
> >>>> * Mike Frysinger <vapier@gentoo.org> wrote:
> >>>>> 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"
> >>>> Applied, thanks Mike! I have made a small change: i changed it from
> >>>> help text into a regular comment. We usually use help texts for
> >>>> interactive Kconfig options - but this is not one.
> >>> yes, but i like the help text because when i use the kconfig
> >>> search option, it shows up. otherwise doing a search for
> >>> HAVE_PERF_COUNTERS shows nothing useful.
> >> When i did this modification i tried that in 'make menuconfig' and
> >> the help didnt show up. Is it only available in certain kconfig
> >> methods?
>
> There is no prompt string for it, so it's invisible in menuconfig.
> xconfig has View options that can show it.
>
> > hrm, you're right. not sure what i was thinking of. sounds like an
> > enhancement request though for kconfig.
>
> Could be. Cc: Sam added.
We do not want to show the invisible symbols.
But the added help text is still fine as it is there when you
grep the Kconfig file.
Sam
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements
2009-06-12 17:56 ` Sam Ravnborg
@ 2009-06-12 17:53 ` Randy Dunlap
0 siblings, 0 replies; 14+ messages in thread
From: Randy Dunlap @ 2009-06-12 17:53 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Randy Dunlap, Mike Frysinger, Ingo Molnar, Peter Zijlstra,
Paul Mackerras, linux-kernel
Sam Ravnborg wrote:
> On Fri, Jun 12, 2009 at 10:40:50AM -0700, Randy Dunlap wrote:
>> Mike Frysinger wrote:
>>> On Fri, Jun 12, 2009 at 13:36, Ingo Molnar wrote:
>>>> * Mike Frysinger <vapier.adi@gmail.com> wrote:
>>>>> On Fri, Jun 12, 2009 at 13:30, Ingo Molnar wrote:
>>>>>> * Mike Frysinger <vapier@gentoo.org> wrote:
>>>>>>> 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"
>>>>>> Applied, thanks Mike! I have made a small change: i changed it from
>>>>>> help text into a regular comment. We usually use help texts for
>>>>>> interactive Kconfig options - but this is not one.
>>>>> yes, but i like the help text because when i use the kconfig
>>>>> search option, it shows up. otherwise doing a search for
>>>>> HAVE_PERF_COUNTERS shows nothing useful.
>>>> When i did this modification i tried that in 'make menuconfig' and
>>>> the help didnt show up. Is it only available in certain kconfig
>>>> methods?
>> There is no prompt string for it, so it's invisible in menuconfig.
>> xconfig has View options that can show it.
>>
>>> hrm, you're right. not sure what i was thinking of. sounds like an
>>> enhancement request though for kconfig.
>> Could be. Cc: Sam added.
>
> We do not want to show the invisible symbols.
usually, yes. But it can be very helpful to developers.
I use xconfig showing all symbols All Of The Time
(when not using menuconfig, that is).
> But the added help text is still fine as it is there when you
> grep the Kconfig file.
--
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
^ permalink raw reply [flat|nested] 14+ messages in thread
* [tip:perfcounters/core] perf_counter: Start documenting HAVE_PERF_COUNTERS requirements
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:30 ` Ingo Molnar
@ 2009-06-12 17:33 ` tip-bot for Mike Frysinger
2009-06-12 17:39 ` tip-bot for Mike Frysinger
3 siblings, 0 replies; 14+ messages in thread
From: tip-bot for Mike Frysinger @ 2009-06-12 17:33 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, paulus, hpa, mingo, a.p.zijlstra, vapier, tglx,
mingo
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.
^ permalink raw reply related [flat|nested] 14+ messages in thread* [tip:perfcounters/core] perf_counter: Start documenting HAVE_PERF_COUNTERS requirements
2009-06-12 17:17 [PATCH] perf_counters: start documenting HAVE_PERF_COUNTERS requirements Mike Frysinger
` (2 preceding siblings ...)
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
3 siblings, 0 replies; 14+ messages in thread
From: tip-bot for Mike Frysinger @ 2009-06-12 17:39 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, paulus, hpa, mingo, a.p.zijlstra, vapier, tglx,
mingo
Commit-ID: 018df72dd01576ab199c6129233cdeaf1409958b
Gitweb: http://git.kernel.org/tip/018df72dd01576ab199c6129233cdeaf1409958b
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:37:30 +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 | 2 ++
tools/perf/design.txt | 15 +++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index c649657..d3a5096 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -936,6 +936,8 @@ config AIO
config HAVE_PERF_COUNTERS
bool
+ help
+ See tools/perf/design.txt for details.
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.
^ permalink raw reply related [flat|nested] 14+ messages in thread