From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27812 invoked by alias); 10 Nov 2014 12:31:54 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 27801 invoked by uid 89); 10 Nov 2014 12:31:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 10 Nov 2014 12:31:52 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sAACVXqe020601 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Nov 2014 07:31:33 -0500 Received: from sandy.ghostprotocols.net (ovpn-113-123.phx2.redhat.com [10.3.113.123]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sAACVWWu008194 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Nov 2014 07:31:33 -0500 Received: by sandy.ghostprotocols.net (Postfix, from userid 1000) id 6F0E196E3; Mon, 10 Nov 2014 10:31:31 -0200 (BRST) Date: Mon, 10 Nov 2014 12:31:00 -0000 From: Arnaldo Carvalho de Melo To: Hagen Paul Pfeifer Cc: Masami Hiramatsu , Hemant Kumar , Namhyung Kim , "linux-kernel@vger.kernel.org" , srikar@linux.vnet.ibm.com, peterz@infradead.org, oleg@redhat.com, hegdevasant@linux.vnet.ibm.com, mingo@redhat.com, systemtap@sourceware.org, aravinda@linux.vnet.ibm.com, penberg@iki.fi, brendan.d.gregg@gmail.com, "yrl.pp-manager.tt@hitachi.com" Subject: Re: [RFC] perf-cache command interface design Message-ID: <20141110123131.GD4468@redhat.com> References: <20141102105006.21708.28734.stgit@hemant-fedora> <20141102105557.21708.19032.stgit@hemant-fedora> <87lhnr5sbl.fsf@sejong.aot.lge.com> <54588905.7040002@linux.vnet.ibm.com> <5458CD15.4010101@hitachi.com> <874muew2hk.fsf@sejong.aot.lge.com> <5459E865.6050207@hitachi.com> <545B1DDE.9000202@linux.vnet.ibm.com> <545C80F4.4020905@hitachi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes X-SW-Source: 2014-q4/txt/msg00134.txt.bz2 Em Mon, Nov 10, 2014 at 01:05:45PM +0100, Hagen Paul Pfeifer escreveu: > On 7 November 2014 09:21, Masami Hiramatsu > 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