From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751648AbcEMHVR (ORCPT ); Fri, 13 May 2016 03:21:17 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:8233 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184AbcEMHVQ (ORCPT ); Fri, 13 May 2016 03:21:16 -0400 Subject: Re: [PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given To: David Ahern , Arnaldo Carvalho de Melo References: <1463042596-61703-1-git-send-email-hekuang@huawei.com> <1463042596-61703-4-git-send-email-hekuang@huawei.com> <20160512130925.GG20258@kernel.org> <5734E649.80505@gmail.com> CC: , , , , , , , , , , , , , , , From: Hekuang Message-ID: <57358003.3020203@huawei.com> Date: Fri, 13 May 2016 15:19:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <5734E649.80505@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.110.55.166] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090203.57358014.0083,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: dd3885b7c19e0152501a73cf529431d6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi 在 2016/5/13 4:23, David Ahern 写道: > On 5/12/16 7:09 AM, Arnaldo Carvalho de Melo wrote: >> Em Thu, May 12, 2016 at 08:43:12AM +0000, He Kuang escreveu: >>> Symfs dir and buildid dir are two places that perf looks into for >>> symbols, currently, if symfs dir is given, buildid-cache is skipped. >>> >>> In the cross-platform perf record/script scenario, we need vdsos in >>> buildid-cache dir and other libs in symfs dir at the same time. And >>> consider that the binaries indexed by buildid do not cause ambiguity, >>> this patch simply removes that logical. >> >> Makes perfect sense, David, do you have any concern? Can I have your >> Acked-by? > > seems odd to me you want to look in the buildid-cache when a symfs is > given. The point of symfs was "go look for everything under here." > > I believe dso__load is going to hit DSO_BINARY_TYPE__BUILD_ID_CACHE > before any of the others and there are probably cases where a stale > cache entry would be hit before a build tree entry (e.g., symfs). Build id entries recorded in perf.data reflect the current dso, so if buildid is matched , how can it be a stale one? > > 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. Thanks.