xref: /openbmc/linux/tools/perf/Documentation/perf-buildid-cache.txt (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
1ef12a141SArnaldo Carvalho de Meloperf-buildid-cache(1)
2ef12a141SArnaldo Carvalho de Melo=====================
3ef12a141SArnaldo Carvalho de Melo
4ef12a141SArnaldo Carvalho de MeloNAME
5ef12a141SArnaldo Carvalho de Melo----
6ef12a141SArnaldo Carvalho de Meloperf-buildid-cache - Manage build-id cache.
7ef12a141SArnaldo Carvalho de Melo
8ef12a141SArnaldo Carvalho de MeloSYNOPSIS
9ef12a141SArnaldo Carvalho de Melo--------
10ef12a141SArnaldo Carvalho de Melo[verse]
1111d232ecSArnaldo Carvalho de Melo'perf buildid-cache <options>'
12ef12a141SArnaldo Carvalho de Melo
13ef12a141SArnaldo Carvalho de MeloDESCRIPTION
14ef12a141SArnaldo Carvalho de Melo-----------
158d8c8e4cSMasami HiramatsuThis command manages the build-id cache. It can add, remove, update and purge
168d8c8e4cSMasami Hiramatsufiles to/from the cache. In the future it should as well set upper limits for
178d8c8e4cSMasami Hiramatsuthe space used by the cache, etc.
186430a94eSMasami HiramatsuThis also scans the target binary for SDT (Statically Defined Tracing) and
196430a94eSMasami Hiramatsurecord it along with the buildid-cache, which will be used by perf-probe.
206430a94eSMasami HiramatsuFor more details, see linkperf:perf-probe[1].
21ef12a141SArnaldo Carvalho de Melo
22ef12a141SArnaldo Carvalho de MeloOPTIONS
23ef12a141SArnaldo Carvalho de Melo-------
24ef12a141SArnaldo Carvalho de Melo-a::
25ef12a141SArnaldo Carvalho de Melo--add=::
26ef12a141SArnaldo Carvalho de Melo        Add specified file to the cache.
275a79eef4SSihyeon Jang-f::
285a79eef4SSihyeon Jang--force::
295a79eef4SSihyeon Jang	Don't complain, do it.
30fc1b691dSAdrian Hunter-k::
31fc1b691dSAdrian Hunter--kcore::
32fc1b691dSAdrian Hunter        Add specified kcore file to the cache. For the current host that is
33fc1b691dSAdrian Hunter        /proc/kcore which requires root permissions to read. Be aware that
34fc1b691dSAdrian Hunter        running 'perf buildid-cache' as root may update root's build-id cache
35fc1b691dSAdrian Hunter        not the user's. Use the -v option to see where the file is created.
36fc1b691dSAdrian Hunter        Note that the copied file contains only code sections not the whole core
37fc1b691dSAdrian Hunter        image. Note also that files "kallsyms" and "modules" must also be in the
38fc1b691dSAdrian Hunter        same directory and are also copied.  All 3 files are created with read
39fc1b691dSAdrian Hunter        permissions for root only. kcore will not be added if there is already a
40fc1b691dSAdrian Hunter        kcore in the cache (with the same build-id) that has the same modules at
41fc1b691dSAdrian Hunter        the same addresses. Use the -v option to see if a copy of kcore is
42fc1b691dSAdrian Hunter        actually made.
43ef12a141SArnaldo Carvalho de Melo-r::
44ef12a141SArnaldo Carvalho de Melo--remove=::
458d8c8e4cSMasami Hiramatsu        Remove a cached binary which has same build-id of specified file
468d8c8e4cSMasami Hiramatsu        from the cache.
478d8c8e4cSMasami Hiramatsu-p::
488d8c8e4cSMasami Hiramatsu--purge=::
498d8c8e4cSMasami Hiramatsu        Purge all cached binaries including older caches which have specified
508d8c8e4cSMasami Hiramatsu	path from the cache.
519a73c308SRavi Bangoria-P::
529a73c308SRavi Bangoria--purge-all::
539a73c308SRavi Bangoria	Purge all cached binaries. This will flush out entire cache.
54fbb6976cSArnaldo Carvalho de Melo-M::
55fbb6976cSArnaldo Carvalho de Melo--missing=::
56fbb6976cSArnaldo Carvalho de Melo	List missing build ids in the cache for the specified file.
57eeb49845SNamhyung Kim-u::
58a50d11a1SMasami Hiramatsu--update=::
59a50d11a1SMasami Hiramatsu	Update specified file of the cache. Note that this doesn't remove
604d39c89fSIngo Molnar	older entries since those may be still needed for annotating old
61a50d11a1SMasami Hiramatsu	(or remote) perf.data. Only if there is already a cache which has
62a50d11a1SMasami Hiramatsu	exactly same build-id, that is replaced by new one. It can be used
63a50d11a1SMasami Hiramatsu	to update kallsyms and kernel dso to vmlinux in order to support
64a50d11a1SMasami Hiramatsu	annotation.
658e1e0d74SRavi Bangoria-l::
668e1e0d74SRavi Bangoria--list::
678e1e0d74SRavi Bangoria	List all valid binaries from cache.
68ef12a141SArnaldo Carvalho de Melo-v::
69ef12a141SArnaldo Carvalho de Melo--verbose::
70ef12a141SArnaldo Carvalho de Melo	Be more verbose.
71ef12a141SArnaldo Carvalho de Melo
72f045b8c4SKrister Johansen--target-ns=PID:
73f045b8c4SKrister Johansen	Obtain mount namespace information from the target pid.  This is
74f045b8c4SKrister Johansen	used when creating a uprobe for a process that resides in a
75f045b8c4SKrister Johansen	different mount namespace from the perf(1) utility.
76f045b8c4SKrister Johansen
77*9bce13eaSJiri Olsa--debuginfod[=URLs]::
78e8a2061fSJiri Olsa	Specify debuginfod URL to be used when retrieving perf.data binaries,
79e8a2061fSJiri Olsa	it follows the same syntax as the DEBUGINFOD_URLS variable, like:
80e8a2061fSJiri Olsa
81e8a2061fSJiri Olsa	  buildid-cache.debuginfod=http://192.168.122.174:8002
82e8a2061fSJiri Olsa
83*9bce13eaSJiri Olsa	If the URLs is not specified, the value of DEBUGINFOD_URLS
84*9bce13eaSJiri Olsa	system environment variable is used.
85*9bce13eaSJiri Olsa
86ef12a141SArnaldo Carvalho de MeloSEE ALSO
87ef12a141SArnaldo Carvalho de Melo--------
8811d232ecSArnaldo Carvalho de Melolinkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-buildid-list[1]
89