From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752767AbcELKLR (ORCPT ); Thu, 12 May 2016 06:11:17 -0400 Received: from mga04.intel.com ([192.55.52.120]:11976 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbcELKLK (ORCPT ); Thu, 12 May 2016 06:11:10 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,609,1455004800"; d="scan'208";a="978259822" Subject: Re: [PATCH v3 1/7] perf tools: Set vdso name to vdso[64,32] depending on platform To: He Kuang , peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, wangnan0@huawei.com, jpoimboe@redhat.com, ak@linux.intel.com, eranian@google.com, namhyung@kernel.org, sukadev@linux.vnet.ibm.com, masami.hiramatsu.pt@hitachi.com, tumanova@linux.vnet.ibm.com, kan.liang@intel.com, penberg@kernel.org, dsahern@gmail.com References: <1463042596-61703-1-git-send-email-hekuang@huawei.com> <1463042596-61703-2-git-send-email-hekuang@huawei.com> Cc: linux-kernel@vger.kernel.org From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <573455BA.1070707@intel.com> Date: Thu, 12 May 2016 13:06:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1463042596-61703-2-git-send-email-hekuang@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/05/16 11:43, He Kuang wrote: > This is a preparation for cross-platform vdso lookup. > > There is a naming confusion about vdso name, vdso buildid generated by > a 32-bit machine stores it with the name 'vdso', but when processing > buildid on a 64-bit machine with the same 'perf.data', perf will > search for vdso named as 'vdso32' and get failed. > > This patch uses different names when storing the buildid, i.e. vdso64 > for 64-bit machine and vdso32 for 32-bit machine, and eliminates this > naming confusion. That looks like it will break existing perf.data files because they will have a different name recorded in the buildid section. Also it doesn't look like it would work the other way around i.e. recording on a 64-bit machine and processing on a 32-bit machine. > > Signed-off-by: He Kuang > --- > tools/perf/util/vdso.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/util/vdso.h b/tools/perf/util/vdso.h > index cdc4fab..45e9ef4 100644 > --- a/tools/perf/util/vdso.h > +++ b/tools/perf/util/vdso.h > @@ -4,10 +4,15 @@ > #include > #include > #include > +#include "util.h" > > #define VDSO__MAP_NAME "[vdso]" > > -#define DSO__NAME_VDSO "[vdso]" > +#if BITS_PER_LONG == 64 > +#define DSO__NAME_VDSO "[vdso64]" > +#else > +#define DSO__NAME_VDSO "[vdso32]" > +#endif > #define DSO__NAME_VDSO32 "[vdso32]" > #define DSO__NAME_VDSOX32 "[vdsox32]" > >