This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC] perf-cache command interface design
- From: Arnaldo Carvalho de Melo <acme at redhat dot com>
- To: Hagen Paul Pfeifer <hagen at jauu dot net>
- Cc: Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>, Hemant Kumar <hemant at linux dot vnet dot ibm dot com>, Namhyung Kim <namhyung at kernel dot org>, "linux-kernel at vger dot kernel dot org" <linux-kernel at vger dot kernel dot org>, srikar at linux dot vnet dot ibm dot com, peterz at infradead dot org, oleg at redhat dot com, hegdevasant at linux dot vnet dot ibm dot com, mingo at redhat dot com, systemtap at sourceware dot org, aravinda at linux dot vnet dot ibm dot com, penberg at iki dot fi, brendan dot d dot gregg at gmail dot com, "yrl dot pp-manager dot tt at hitachi dot com" <yrl dot pp-manager dot tt at hitachi dot com>
- Date: Mon, 10 Nov 2014 10:31:31 -0200
- Subject: Re: [RFC] perf-cache command interface design
- Authentication-results: sourceware.org; auth=none
- References: <20141102105006 dot 21708 dot 28734 dot stgit at hemant-fedora> <20141102105557 dot 21708 dot 19032 dot stgit at hemant-fedora> <87lhnr5sbl dot fsf at sejong dot aot dot lge dot com> <54588905 dot 7040002 at linux dot vnet dot ibm dot com> <5458CD15 dot 4010101 at hitachi dot com> <874muew2hk dot fsf at sejong dot aot dot lge dot com> <5459E865 dot 6050207 at hitachi dot com> <545B1DDE dot 9000202 at linux dot vnet dot ibm dot com> <545C80F4 dot 4020905 at hitachi dot com> <CAPh34mfj5DJSbUBhQSZS_QpTUubV5a7UEsiyzfNSia3bjU2kww at mail dot gmail dot com>
Em Mon, Nov 10, 2014 at 01:05:45PM +0100, Hagen Paul Pfeifer escreveu:
> On 7 November 2014 09:21, Masami Hiramatsu
> <masami.hiramatsu.pt@hitachi.com> wrote:
>
> > File Format
> > ===========
> > All the cache files are placed under ~/.debug/ by default.
> > The paths of buildid cache of binary/symbols are not changed.
> >
> > The SDT/probe caches are placed under the ~/.debug/.probes/path/to/bin/bu/ildid
> > and that is linked to ~/.debug/.probes/.buildid/bu/ildid
> > # To avoid conflict with files under /probes/*, I picked up .probes/.
>
> A little bit late: but why ~/.debug? Why not $XDG_CACHE_HOME/perf/ as
Why "perf"?
> the root for all perf related files? debug is not unique nor is it sufficient
Probably should be some other name then, but ~/.debug/ is there since
the build-id cache was introduced, guess this is why it is being kept so
far in Masami's proposal.
> to meet file hierarchy: man file-hierarchy(8)
Humm,
It starts in $HOME/.debug/ because this is not supposed to be a system
wide cache, a developer can, for instance:
1. perf record myapp
2. edit myapp.c
3. rebuild it
4. perf record myapp
5. perf diff
And it will show the difference from the previous version, for which it
stored a copy of its binary on its private, keyed by build-id, cache.
So this is not merely a place where we will read stuff from.
If somebody decides to have it in a place accessible by multiple users
on the same system, then, yes, some more suitable place outside its
$HOME is needed, and then tooling should look there as well as on the
places it already looks for such files, i.e. $HOME/.debug/,
/usr/lib/debug (where foo-debuginfo packages store stuff, also keyed by
build-id), /lib/modules/$KVR/, etc.
- Arnaldo