perf buildid-cache: Add --update option
Namhyung Kim
maintainerPATCH 1/2 perf buildid-cache: Add --update option
From: Namhyung Kim <[email protected]>
When adding vmlinux file to build-id cache, it'd be fail since kallsyms dso with a same build-id was already added by perf record. So one needs to remove the kallsyms first to add vmlinux into the cache. Add --update option for doing it at once.
--- tools/perf/Documentation/perf-buildid-cache.txt | 4 ++ tools/perf/builtin-buildid-cache.c | 49 ++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-)
tools/perf/Documentation/perf-buildid-cache.txt +4 -0
@@ -24,6 +24,10 @@ OPTIONS -r:: --remove=:: Remove specified file from the cache. +-u:: +--update:: + Update specified file of the cache. It can be used to update kallsyms + kernel dso to vmlinux in order to support annotation. -v:: --verbose:: Be more verbose.
tools/perf/builtin-buildid-cache.c +48 -1
71 lines not on this page · raw message
Signature · 1 line
1.7.11.7
Namhyung Kim
maintainerPATCH 2/2 perf annotate: Fix warning message on vmlinux
From: Namhyung Kim <[email protected]>
When perf report runs with perf.data which was recorded on a different kernel, it fails to run annotate browser with the kernel symbol and it recommends to run perf buildid-cache with proper vmlinux.
But running perf buildid-cache -av vmlinux as the message gives me a following error:
$ perf buildid-cache -av /home/namhyung/build/kernel/vmlinux Couldn't add v: No such file or directory
Since the -a option receives a parameter, 'v' should not be after the option.
In addition -a option is not work for this case since the build-id cache already has a kallsyms with same build-id so it'll fail with EEXIST. Use recently added -u (--update) option for it.
--- tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/annotate.c +1 -1
@@ -809,7 +809,7 @@ fallback:pr_err ("Can't annotate %s:\n\n" "No vmlinux file%s\nwas found in the path.\n\n" "Please use:\n\n" -" perf buildid-cache -av vmlinux\n\n" +" perf buildid-cache -vu vmlinux\n\n" "or:\n\n" " --vmlinux vmlinux\n" , sym->name, build_id_msg ?:"" );
Signature · 1 line
1.7.11.7