diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-05-12 12:06:21 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-05-16 22:11:53 -0400 |
commit | c85b03349640b34f3545503c8429fc43005e9a92 (patch) | |
tree | 4f226f1fa1c7b0399fba6986100418427e30870e /Documentation/sysctl | |
parent | 3e4de4ec4cfea40994b47a79767610153edbf45b (diff) |
perf core: Separate accounting of contexts and real addresses in a stack trace
The perf_sample->ip_callchain->nr value includes all the entries in the
ip_callchain->ip[] array, real addresses and PERF_CONTEXT_{KERNEL,USER,etc},
while what the user expects is that what is in the kernel.perf_event_max_stack
sysctl or in the upcoming per event perf_event_attr.sample_max_stack knob be
honoured in terms of IP addresses in the stack trace.
So allocate a bunch of extra entries for contexts, and do the accounting
via perf_callchain_entry_ctx struct members.
A new sysctl, kernel.perf_event_max_contexts_per_stack is also
introduced for investigating possible bugs in the callchain
implementation by some arch.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Zefan Li <lizefan@huawei.com>
Link: http://lkml.kernel.org/n/tip-3b4wnqk340c4sg4gwkfdi9yk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'Documentation/sysctl')
-rw-r--r-- | Documentation/sysctl/kernel.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index daabdd7ee543..a3683ce2a2f3 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -61,6 +61,7 @@ show up in /proc/sys/kernel: | |||
61 | - perf_cpu_time_max_percent | 61 | - perf_cpu_time_max_percent |
62 | - perf_event_paranoid | 62 | - perf_event_paranoid |
63 | - perf_event_max_stack | 63 | - perf_event_max_stack |
64 | - perf_event_max_contexts_per_stack | ||
64 | - pid_max | 65 | - pid_max |
65 | - powersave-nap [ PPC only ] | 66 | - powersave-nap [ PPC only ] |
66 | - printk | 67 | - printk |
@@ -668,6 +669,19 @@ The default value is 127. | |||
668 | 669 | ||
669 | ============================================================== | 670 | ============================================================== |
670 | 671 | ||
672 | perf_event_max_contexts_per_stack: | ||
673 | |||
674 | Controls maximum number of stack frame context entries for | ||
675 | (attr.sample_type & PERF_SAMPLE_CALLCHAIN) configured events, for | ||
676 | instance, when using 'perf record -g' or 'perf trace --call-graph fp'. | ||
677 | |||
678 | This can only be done when no events are in use that have callchains | ||
679 | enabled, otherwise writing to this file will return -EBUSY. | ||
680 | |||
681 | The default value is 8. | ||
682 | |||
683 | ============================================================== | ||
684 | |||
671 | pid_max: | 685 | pid_max: |
672 | 686 | ||
673 | PID allocation wrap value. When the kernel's next PID value | 687 | PID allocation wrap value. When the kernel's next PID value |