On 2/25/16 8:47 AM, Peter Zijlstra wrote:
On Wed, Feb 17, 2016 at 07:58:57PM -0800, Alexei Starovoitov wrote:
+static inline int perf_callchain_store(struct perf_callchain_entry *entry, u64
ip)
{
+ if (entry->nr < PERF_MAX_STACK_DEPTH) {
entry->ip[entry->nr++] = ip;
+
On Thu, Feb 25, 2016 at 08:37:34AM -0800, Alexei Starovoitov wrote:
> On 2/25/16 6:18 AM, Peter Zijlstra wrote:
> >> arch/x86/include/asm/stacktrace.h | 2 +-
> >> arch/x86/kernel/cpu/perf_event.c | 4 ++--
> >> arch/x86/kernel/dumpstack.c | 6 --
> >> arch/x86/kernel/stacktrace.c
On Wed, Feb 17, 2016 at 07:58:57PM -0800, Alexei Starovoitov wrote:
> +static inline int perf_callchain_store(struct perf_callchain_entry *entry,
> u64 ip)
> {
> + if (entry->nr < PERF_MAX_STACK_DEPTH) {
> entry->ip[entry->nr++] = ip;
> + return 0;
> + } else {
>
On Thu, Feb 25, 2016 at 08:37:34AM -0800, Alexei Starovoitov wrote:
> On 2/25/16 6:18 AM, Peter Zijlstra wrote:
> >On Wed, Feb 17, 2016 at 07:58:57PM -0800, Alexei Starovoitov wrote:
> >>. avoid walking the stack when there is no room left in the buffer
> >>. generalize get_perf_callchain() to be c
On 2/25/16 6:18 AM, Peter Zijlstra wrote:
On Wed, Feb 17, 2016 at 07:58:57PM -0800, Alexei Starovoitov wrote:
. avoid walking the stack when there is no room left in the buffer
. generalize get_perf_callchain() to be called from bpf helper
If it does two things it should be two patches.
coul
On Wed, Feb 17, 2016 at 07:58:57PM -0800, Alexei Starovoitov wrote:
> . avoid walking the stack when there is no room left in the buffer
> . generalize get_perf_callchain() to be called from bpf helper
If it does two things it should be two patches.
> Signed-off-by: Alexei Starovoitov
> ---
> a