linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* perf buildid-cache -p <path> question
@ 2017-10-16 12:24 Thomas-Mich Richter
  2017-10-16 13:45 ` Thomas-Mich Richter
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Thomas-Mich Richter @ 2017-10-16 12:24 UTC (permalink / raw)
  To: linux-perf-use., Arnaldo Carvalho de Melo; +Cc: Hendrik Brueckner

Maybe its me misunderstanding the buildid cache completely, but I ran into the following issue:

I can add and remove files using the perf buildid-cache command. For example 
perf buildid-cache -a /usr/bin/tar adds the tar executable to the buildid-cache directory
.debug/usr/bin/tar 
and creates the <buildid> subdirectory
.debug/usr/bin/tar/e54c9946802bbbcb85760ffeb80700a5fd35ebe7/elf file.
Also a symbolic link from the directory
.debug/.buildid/e5/4c9946802bbbcb85760ffeb80700a5fd35ebe7 --> ../../usr/bin/tar/<buildid>/
is created.

Command perf buildid-cache -a /usr/bin/tar
removes these entries.

Now when I run ./perf buildid-cache -p /usr/bin
nothing happens and success is reported:
[root@s35lp76 perf]# ./perf buildid-cache -vp /usr/bin/
Removing bash /usr/bin/: Ok
Removing dbus-daemon /usr/bin/: Ok
Removing ls /usr/bin/: Ok
Removing readlink /usr/bin/: Ok
Removing sleep /usr/bin/: Ok
Removing tar /usr/bin/: Ok
Removing time /usr/bin/: Ok
Removing vim /usr/bin/: Ok
Purging /usr/bin/: Ok

I have done some more debugging and there is something wrong. 
The function
build_id_cache__purge_path() is called and 
build_id_cache__list_build_ids() creates a list of file names located in /usr/bin of the buildid-cache.
build_id_cache__remove_s() is called for each name in the list and tries to locate each file name
	in directory .buildid/YY/ZZZ..ZZZ which fails because 
build_id_cache__linkname() expects a buildid and gets a file name.
The file name bash is treated as .buildid/ba/sh which does not exist.


This seems to be a simple mistake so I wonder if I do something wrong.

Thanks
-- 
Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany
--
Vorsitzende des Aufsichtsrats: Martina Koederitz 
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-10-26 14:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-16 12:24 perf buildid-cache -p <path> question Thomas-Mich Richter
2017-10-16 13:45 ` Thomas-Mich Richter
2017-10-16 14:12 ` Arnaldo Carvalho de Melo
2017-10-20 16:12   ` Masami Hiramatsu
2017-10-20 16:20     ` Arnaldo Carvalho de Melo
2017-10-24  7:56       ` Thomas-Mich Richter
2017-10-25 17:04         ` Masami Hiramatsu
2017-10-26  7:05           ` Thomas-Mich Richter
2017-10-21 15:17 ` Masami Hiramatsu
2017-10-24  6:50   ` Thomas-Mich Richter
2017-10-25 16:57     ` Masami Hiramatsu
2017-10-26  7:07       ` Thomas-Mich Richter
2017-10-26 14:41         ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).