• A
    perf annotate: Reset the dso find_symbol cache when removing symbols · c0b4dffb
    Arnaldo Carvalho de Melo 提交于
    The 'annotate' tool does some filtering in the entries in a DSO but
    forgot to reset the cache done in dso__find_symbol(), cauxing a SEGV:
    
      [root@zoo ~]# perf annotate netlink_poll
      perf: Segmentation fault
      -------- backtrace --------
      perf[0x526ceb]
      /lib64/libc.so.6(+0x34960)[0x7faedfbe0960]
      perf(rb_erase+0x223)[0x499d63]
      perf[0x4213e9]
      perf[0x4bc123]
      perf[0x4bc621]
      perf[0x4bf26b]
      perf[0x4bc855]
      perf(perf_session__process_events+0x340)[0x4bddc0]
      perf(cmd_annotate+0x6bb)[0x421b5b]
      perf[0x479063]
      perf(main+0x60a)[0x42098a]
      /lib64/libc.so.6(__libc_start_main+0xf0)[0x7faedfbcbfe0]
      perf[0x420aa9]
      [0x0]
      [root@zoo ~]#
    
    Fix it by reseting the find cache when removing symbols.
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Stephane Eranian <eranian@google.com>
    Fixes: b685ac22 ("perf symbols: Add front end cache for DSO symbol lookup")
    Link: http://lkml.kernel.org/n/tip-b2y9x46y0t8yem1ive41zqyp@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    c0b4dffb
builtin-annotate.c 10.3 KB