Re: [PATCH perf/core v5 02/15] perf-buildid-cache: Use path/to/bin/buildid/elf instead of path/to/bin/buildid
From: Masami Hiramatsu
Date: Wed Apr 27 2016 - 21:52:02 EST
On Wed, 27 Apr 2016 18:23:50 -0300
Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> Em Thu, Apr 28, 2016 at 03:37:23AM +0900, Masami Hiramatsu escreveu:
> > From: Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx>
> >
> > Use path/to/bin/buildid/elf instead of path/to/bin/buildid
> > to store corresponding elf binary.
> > This also stores vdso in buildid/vdso, kallsyms in buildid/kallsyms.
> >
> > Note that the existing caches are not updated until user adds
> > or updates the cache. Anyway, if there is the old style build-id
> > cache it falls back to use it. (IOW, it is backward compatible)
> >
> > Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx>
> > Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
> > ---
> > Changes in v5:
> > - Support old style buildid caches.
>
> > + /* Remove old style build-id cache */
> > + if (__is_regular_file(dir_name))
> > + if (unlink(dir_name))
> > + goto out_free;
>
> Shouldn't this just fail and require the user to use --force/-f or purge
> first?
No, I don't think so, because the old style build-id is useless for
probe-cache in anyway, and after applying this patch, perf can use
new one seemlessly. So let just renew it :)
Thank you,
--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>