From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752903AbcEPBcW (ORCPT ); Sun, 15 May 2016 21:32:22 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:34956 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752537AbcEPBcU (ORCPT ); Sun, 15 May 2016 21:32:20 -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> CC: From: Hekuang Message-ID: <573922AE.5030002@huawei.com> Date: Mon, 16 May 2016 09:30:22 +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: <4572f136-796d-059f-6b81-613e8f63be24@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.0A020205.573922BA.00AB,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: a197f4b40b8de8aadb89df8578ef2718 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2016/5/14 22:43, David Ahern 写道: > On 5/14/16 2:19 AM, He Kuang wrote: >> 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. For >> the reason that to have every single file opened by perf is relative >> to symfs dirctory, perf skips the buildid dir if symfs is given. >> >> This patch references the buildid dir under symfs if '--symfs' is >> used, and adds new option '--dso-prefix' to specify the subdir path in >> symfs which contains the buildid dsos. > > In the previous version of this patch you just wanted to drop the > symfs check. That means there is a path that perf searches for buildid > files and reading it worked for you. Why is adding symsfs to that path > not enough? ie., Why do you need to specify a different location under > the symfs? > In previous patch, I use 'perf buildid-cache -a' to add vdso binary into the HOST buildid dir. Currently, $(BUILDID_ROOT)/.debug/.buildid has a directory structure organized by the buildid value, like this: .build-id - 3a | e5ba6d4e532ad529e43ccf1ce1ddf8a64a4fdd - 84 dbd75729adba57cc42f5544b25de571c0c8731 perf searchs for buildid binaries by the buildid value. And symfs is a normal file tree and perf searchs for binaryies by the file name. lib - libc.so - ld.so Tt's inappropriate to add symfs to .build-id dir becuase they have different dirctory structure and perf searchs for them by differnt ways. So in this patch I add .buildid to symfs and got dirctory tree like this: symfs - $(DSO_PREFIX) - .build-id - 3a - 84 - libc.so - ld.so Thanks