xref: /OK3568_Linux_fs/kernel/tools/perf/Documentation/perf-buildid-cache.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunperf-buildid-cache(1)
2*4882a593Smuzhiyun=====================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunNAME
5*4882a593Smuzhiyun----
6*4882a593Smuzhiyunperf-buildid-cache - Manage build-id cache.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunSYNOPSIS
9*4882a593Smuzhiyun--------
10*4882a593Smuzhiyun[verse]
11*4882a593Smuzhiyun'perf buildid-cache <options>'
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunDESCRIPTION
14*4882a593Smuzhiyun-----------
15*4882a593SmuzhiyunThis command manages the build-id cache. It can add, remove, update and purge
16*4882a593Smuzhiyunfiles to/from the cache. In the future it should as well set upper limits for
17*4882a593Smuzhiyunthe space used by the cache, etc.
18*4882a593SmuzhiyunThis also scans the target binary for SDT (Statically Defined Tracing) and
19*4882a593Smuzhiyunrecord it along with the buildid-cache, which will be used by perf-probe.
20*4882a593SmuzhiyunFor more details, see linkperf:perf-probe[1].
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunOPTIONS
23*4882a593Smuzhiyun-------
24*4882a593Smuzhiyun-a::
25*4882a593Smuzhiyun--add=::
26*4882a593Smuzhiyun        Add specified file to the cache.
27*4882a593Smuzhiyun-f::
28*4882a593Smuzhiyun--force::
29*4882a593Smuzhiyun	Don't complain, do it.
30*4882a593Smuzhiyun-k::
31*4882a593Smuzhiyun--kcore::
32*4882a593Smuzhiyun        Add specified kcore file to the cache. For the current host that is
33*4882a593Smuzhiyun        /proc/kcore which requires root permissions to read. Be aware that
34*4882a593Smuzhiyun        running 'perf buildid-cache' as root may update root's build-id cache
35*4882a593Smuzhiyun        not the user's. Use the -v option to see where the file is created.
36*4882a593Smuzhiyun        Note that the copied file contains only code sections not the whole core
37*4882a593Smuzhiyun        image. Note also that files "kallsyms" and "modules" must also be in the
38*4882a593Smuzhiyun        same directory and are also copied.  All 3 files are created with read
39*4882a593Smuzhiyun        permissions for root only. kcore will not be added if there is already a
40*4882a593Smuzhiyun        kcore in the cache (with the same build-id) that has the same modules at
41*4882a593Smuzhiyun        the same addresses. Use the -v option to see if a copy of kcore is
42*4882a593Smuzhiyun        actually made.
43*4882a593Smuzhiyun-r::
44*4882a593Smuzhiyun--remove=::
45*4882a593Smuzhiyun        Remove a cached binary which has same build-id of specified file
46*4882a593Smuzhiyun        from the cache.
47*4882a593Smuzhiyun-p::
48*4882a593Smuzhiyun--purge=::
49*4882a593Smuzhiyun        Purge all cached binaries including older caches which have specified
50*4882a593Smuzhiyun	path from the cache.
51*4882a593Smuzhiyun-P::
52*4882a593Smuzhiyun--purge-all::
53*4882a593Smuzhiyun	Purge all cached binaries. This will flush out entire cache.
54*4882a593Smuzhiyun-M::
55*4882a593Smuzhiyun--missing=::
56*4882a593Smuzhiyun	List missing build ids in the cache for the specified file.
57*4882a593Smuzhiyun-u::
58*4882a593Smuzhiyun--update=::
59*4882a593Smuzhiyun	Update specified file of the cache. Note that this doesn't remove
60*4882a593Smuzhiyun	older entires since those may be still needed for annotating old
61*4882a593Smuzhiyun	(or remote) perf.data. Only if there is already a cache which has
62*4882a593Smuzhiyun	exactly same build-id, that is replaced by new one. It can be used
63*4882a593Smuzhiyun	to update kallsyms and kernel dso to vmlinux in order to support
64*4882a593Smuzhiyun	annotation.
65*4882a593Smuzhiyun-l::
66*4882a593Smuzhiyun--list::
67*4882a593Smuzhiyun	List all valid binaries from cache.
68*4882a593Smuzhiyun-v::
69*4882a593Smuzhiyun--verbose::
70*4882a593Smuzhiyun	Be more verbose.
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun--target-ns=PID:
73*4882a593Smuzhiyun	Obtain mount namespace information from the target pid.  This is
74*4882a593Smuzhiyun	used when creating a uprobe for a process that resides in a
75*4882a593Smuzhiyun	different mount namespace from the perf(1) utility.
76*4882a593Smuzhiyun
77*4882a593SmuzhiyunSEE ALSO
78*4882a593Smuzhiyun--------
79*4882a593Smuzhiyunlinkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-buildid-list[1]
80