mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
974802eaa1
commit
018df72dd0
2 changed files with 17 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue