Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given

From: Arnaldo Carvalho de Melo
Date: Fri May 13 2016 - 14:01:13 EST


Em Fri, May 13, 2016 at 08:27:29AM -0600, David Ahern escreveu:
> On 5/13/16 1:19 AM, Hekuang wrote:
> > > What about putting the build id cache under the symfs? so instead of
> > > dropping the symfs check and it to the path for the build id cache.

> > I think your intention is to reference symbol files in one place
> > instead of two. So there're two possible approaches, one is all
> > in buildid-cache, but in practice, I found lots of binaries in
> > symfs even not contains valid buildid, so this way is not work.

> > The other one is all in symfs. It seems ok, but one problem I
> > should point out, with my test environment as an example, the
> > symfsdir is $(TARGET_ROOTFS),and by default buildid_dir is
> > $(TARGET_ROOTFS)/$(HOME)/.debug/, host perf does not know
> > $(HOME) folder in target and we should copy the debug folder
> > to $(TARGET_ROOTFS), which is readonly in the target. For me, it's
> > easier to use 'buildid-cache -a vdso-xxxx' to add that into host
> > buildid-cache than copy debug folder from $(HOME) to readonly
> > $(TARGET_ROOTFS).

> > Without the stale concern, I prefer the two places(buildid-dir in
> > host and target symfs) way.
>
> The intention of symfs is every single file opened by perf is relative to
> that directory. As I recall when I added that option in early 2011 I made
> sure that statement is true. I think it is best to maintain that design.

Ok, so we can introduce --dso-prefix for Hekuang's use case, i.e. be able
to lookup by build-id, fallbacking to a (possibly read-only) directory.

This way the existing --symfs semantic remains written in stone.

- Arnaldo