All of lore.kernel.org
 help / color / mirror / Atom feed
* Perf buildid-cache gives a confusing message
@ 2015-02-04 15:22 Masami Hiramatsu
  0 siblings, 0 replies; only message in thread
From: Masami Hiramatsu @ 2015-02-04 15:22 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, namhyung, Peter Zijlstra,
	Paul Mackerras, Ingo Molnar
  Cc: linux-kernel

Hi,
(Sorry, I missed CC to LKML)

I've found a bit odd perf-buildid-cache behavior. It seems
to be as designed, but also a bit confusing.

Issue: perf-buildid-cache's --update and --remove operations
refer the current existing binary at given path. This means
if we update the old binary, it couldn't remove nor update
the buildid-cache.

Here is the example,
  ----
  [mhiramat@localhost perf]$ ./perf buildid-cache -v --add ./perf
  Adding 51d0731187917e27fd733f2f6f34777cddbaec0f ./perf: Ok  <-- (*)
  [mhiramat@localhost perf]$ rm perf
  [mhiramat@localhost perf]$ make clean
  [mhiramat@localhost perf]$ make
  [mhiramat@localhost perf]$ ./perf buildid-cache -v --update ./perf
  Updating 45a97daa65f9c58adeb34af4158a6dde747de49b ./perf: FAIL <-- (*)
  ./perf wasn't in the cache
  [mhiramat@localhost perf]$ ./perf buildid-cache -v --remove ./perf
  Removing 45a97daa65f9c58adeb34af4158a6dde747de49b ./perf: FAIL <-- (*)
  ./perf wasn't in the cache
  ----
Both --update and --remove are failed after updating local binary.
Note that (*) are verbose message, without -v we don't see that.

I know this is the designed behavior, buildid-cache manages binaries
based on its build-id, not its path. However, it seems confusing.

So, I'd like to suggest to fix --update FILE to add new binary to cache
when there is no current binary cache (this will fix the first FAIL),
and add --remove-all FILE to remove all existing buildid cache about FILE
(path-based cleanup).
What would you think about that?

Thank you,
-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-04 15:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 15:22 Perf buildid-cache gives a confusing message Masami Hiramatsu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.