From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752757AbcERCxt (ORCPT ); Tue, 17 May 2016 22:53:49 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:37587 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752366AbcERCxs (ORCPT ); Tue, 17 May 2016 22:53:48 -0400 Subject: Re: [PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs To: David Ahern , , , , , , , , , , , , , , , , References: <20160513180104.GL11346@kernel.org> <1463213965-35230-1-git-send-email-hekuang@huawei.com> <4572f136-796d-059f-6b81-613e8f63be24@gmail.com> <573922AE.5030002@huawei.com> <573BC99E.4020004@huawei.com> <1193b9ba-7037-22c6-a54a-6992e155be46@gmail.com> CC: From: Hekuang Message-ID: <573BD810.8030104@huawei.com> Date: Wed, 18 May 2016 10:48:48 +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: <1193b9ba-7037-22c6-a54a-6992e155be46@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.0A090201.573BD820.00BF,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: 69704a89e0d6791ba62d399b858f6d39 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2016/5/18 9:51, David Ahern 写道: > On 5/17/16 7:47 PM, Hekuang wrote: >> >> >> 在 2016/5/16 10:50, David Ahern 写道: >>> On 5/15/16 7:30 PM, Hekuang wrote: >>>> In previous patch, I use 'perf buildid-cache -a' to add vdso >>>> binary into the HOST buildid dir. >>> >>> So 'perf buildid-cache' needs the symfs option? >>> >>> >> With this patch 'PATCH v3 3/7 UPDATE', the tree of symfs dir is >> like this: >> >> ├── debug($(dso-prefix)) >> │ ├── .build-id >> │ │ ├── 3a >> │ │ │ └── e5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd -> >> ../../[kernel.kallsyms]/3ae5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd >> │ │ └── 84 >> │ │ └── dbd75729adba57cc42f5544b25de571c0c8731 -> >> ../../[vdso32]/84dbd75729adba57cc42f5544b25de571c0c8731 >> │ ├── [kernel.kallsyms] >> │ │ └── 3ae5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd >> │ ├── [vdso] >> │ │ └── 84dbd75729adba57cc42f5544b25de571c0c8731 >> │ └── [vdso32] >> │ └── 84dbd75729adba57cc42f5544b25de571c0c8731 >> ├── lib >> │ ├── ld-2.22.so >> │ └── libc-2.22.so >> ├── tmp >> │ └── hello >> └── xxx >> >> So all binaries we need are included in the symfs dir. I think >> this is consistent with your idea explained in previous mails. >> >> With this symfs, we do not need buildid dir anymore and what's >> your idea on 'perf buildid-cache' needs symfs option? after all, >> that only effects on buildid dir. > > I don't understand why dso-prefix option is needed? Why make me type > yet more options to the analysis command? Why can't the directory be > located under the symfs tree in a known location and populated the > same way it is without symfs? > > Because the default buidid folder path is $HOME/.debug/.buildid, and this $HOME is on the target machine, not the same as $HOME on the host. Without that option, we need to copy $HOME/.debug/.buildid to the 'known location in symfs', that's also an extra work.