mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 16:44:27 +08:00
8d8c8e4cb3
Add --purge FILE to remove all caches of FILE. Since the current --remove FILE removes a cache which has same build-id of given FILE. Since the command takes a FILE path, it can confuse user who tries to remove cache about FILE path. ----- # ./perf buildid-cache -v --add ./perf Adding 133b7b5486d987a5ab5c3ebf4ea14941f45d4d4f ./perf: Ok # (update the ./perf binary) # ./perf buildid-cache -v --remove ./perf Removing 305bbd1be68f66eca7e2d78db294653031edfa79 ./perf: FAIL ./perf wasn't in the cache ----- Actually, the --remove's FAIL is not shown, it just silently fails. So, this patch adds --purge FILE action for such usecase. perf buildid-cache --purge FILE removes all caches which has same FILE path. In other words, it removes all caches including old binaries. ----- # ./perf buildid-cache -v --add ./perf Adding 133b7b5486d987a5ab5c3ebf4ea14941f45d4d4f ./perf: Ok # (update the ./perf binary) # ./perf buildid-cache -v --purge ./perf Removing 133b7b5486d987a5ab5c3ebf4ea14941f45d4d4f ./perf: Ok ----- BTW, if you want to purge all the caches, remove ~/.debug/* . Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20150227045026.1999.64084.stgit@localhost.localdomain [ s/dirname/dir_name/g to fix build on fedora14, where dirname is a global ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
64 lines
2.0 KiB
Plaintext
64 lines
2.0 KiB
Plaintext
perf-buildid-cache(1)
|
|
=====================
|
|
|
|
NAME
|
|
----
|
|
perf-buildid-cache - Manage build-id cache.
|
|
|
|
SYNOPSIS
|
|
--------
|
|
[verse]
|
|
'perf buildid-cache <options>'
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
This command manages the build-id cache. It can add, remove, update and purge
|
|
files to/from the cache. In the future it should as well set upper limits for
|
|
the space used by the cache, etc.
|
|
|
|
OPTIONS
|
|
-------
|
|
-a::
|
|
--add=::
|
|
Add specified file to the cache.
|
|
-k::
|
|
--kcore::
|
|
Add specified kcore file to the cache. For the current host that is
|
|
/proc/kcore which requires root permissions to read. Be aware that
|
|
running 'perf buildid-cache' as root may update root's build-id cache
|
|
not the user's. Use the -v option to see where the file is created.
|
|
Note that the copied file contains only code sections not the whole core
|
|
image. Note also that files "kallsyms" and "modules" must also be in the
|
|
same directory and are also copied. All 3 files are created with read
|
|
permissions for root only. kcore will not be added if there is already a
|
|
kcore in the cache (with the same build-id) that has the same modules at
|
|
the same addresses. Use the -v option to see if a copy of kcore is
|
|
actually made.
|
|
-r::
|
|
--remove=::
|
|
Remove a cached binary which has same build-id of specified file
|
|
from the cache.
|
|
-p::
|
|
--purge=::
|
|
Purge all cached binaries including older caches which have specified
|
|
path from the cache.
|
|
-M::
|
|
--missing=::
|
|
List missing build ids in the cache for the specified file.
|
|
-u::
|
|
--update=::
|
|
Update specified file of the cache. Note that this doesn't remove
|
|
older entires since those may be still needed for annotating old
|
|
(or remote) perf.data. Only if there is already a cache which has
|
|
exactly same build-id, that is replaced by new one. It can be used
|
|
to update kallsyms and kernel dso to vmlinux in order to support
|
|
annotation.
|
|
|
|
-v::
|
|
--verbose::
|
|
Be more verbose.
|
|
|
|
SEE ALSO
|
|
--------
|
|
linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-buildid-list[1]
|