• Arnaldo Carvalho de Melo's avatar
    perf top: Fix annotate segv · cc841580
    Arnaldo Carvalho de Melo authored
    Before we had sym_counter, it was initialized to zero and we used that
    as an index in the global attrs variable, now we have a list of evsel
    entries, and sym_counter became sym_evsel, that remained initialized to
    zero (NULL): b00m.
    
    Fix it by initializing it to the first entry in the evsel list.
    
    Bug-introduced: 69aad6f1Reported-by: default avatarKirill Smelkov <kirr@mns.spb.ru>
    Tested-by: default avatarKirill Smelkov <kirr@mns.spb.ru>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Kirill Smelkov <kirr@mns.spb.ru>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Tom Zanussi <tzanussi@gmail.com>
    LKML-Reference: <new-submission>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    cc841580
builtin-top.c 35.8 KB