• Frederic Weisbecker's avatar
    perf: Resurrect flat callchains · 97aa1052
    Frederic Weisbecker authored
    Initialize the callchain radix tree root correctly.
    
    When we walk through the parents, we must stop after the root, but
    since it wasn't well initialized, its parent pointer was random.
    
    Also the number of hits was random because uninitialized, hence it
    was part of the callchain while the root doesn't contain anything.
    
    This fixes segfaults and percentages followed by empty callchains
    while running:
    
    	perf report -g flat
    Reported-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: 2.6.31.x-2.6.34.x <stable@kernel.org>
    97aa1052
callchain.h 1.45 KB