Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp565003lqs; Thu, 13 Jun 2024 20:55:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpqN3tJjT3z6yVWDWMWTgExCeA72KOmcQIPEaaeZcRjNQeoGQPpsIzCHqpGfQv/5bztIsuIuTPhJa+Roc/b50qVzauTX8WHJrAlD+D6w== X-Google-Smtp-Source: AGHT+IHlT8GHWRdcOUwPEmeeGp7L4NogwoYxzqW3upYIOFwYmgpqo3b3BD5uDy+ifGHfU7xgpmcu X-Received: by 2002:a05:6808:199f:b0:3d2:2650:cd33 with SMTP id 5614622812f47-3d24e9f6de6mr1530356b6e.58.1718337335860; Thu, 13 Jun 2024 20:55:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718337335; cv=pass; d=google.com; s=arc-20160816; b=zNrjK4uuY7mCDvKnQ1q0pljoFuxugqw6qbCpPQGD5vJbwemffz7dUZONuHUGOVi9Qi 4U0EuqyUaIbQxHzB5uppwGN4x/3XXzIf2vH3uLh4zDHmHQiOPV7pw1IRGxC3LOuOToxX n8rKxt/r2T3ZGmmMrawAKaNNesHhu+o6dsLBhjjPiC7hsz7uvE8s62zlE9TTpcoEyVfd 0G37Qpu+zCCzlK466e6xI252PqFRCY6Kj6XY8ANU51K3tYHYiDypMs1vtInkK6D295zp R6Myi2Dcv+O9bzDUqXKIhL46WCnZExxCIob2zx/ST77bYzlHUBmvq48aPb67Bx4nPJZl Ji3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-id:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=uoIcWXhZpv4G3CHtegWRh+bwh0B0va33pwg0XncsKmQ=; fh=8Ourhkr0tvK0vG9IHJ9QgfFJx8o+EsOFvYXMeRYLVuM=; b=fInSBtD/AJPDmKIgAGvWRZBJB5ZV5JHupmFsrRN3c7+TTqZxbazEvjvhAbaKpJ5PP3 MzJPT+C+JBVjRYNWTqTPvten00i2YBA0KmCoEAJxuk2Vlk/U0JI0VmJvq3A4evAkhofS +qmul27fcGv4OECxWb8SmT5JVdL47wEbs4c7T0aqADFCmPpLMrLa3Rn7koRrAC3PznVl nOW+J2qRf3tpiWurPP1te43cglU+ka+d67JNk9RKH43gc9poIt4KbhNRGACHmGa4VW5M Pbd+GUiYULUN4mOrOWV68KsHLbBcfM9bnz+HAMZnBVfTu+noGkpINR4naIAvCaZGPe9H qssQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-214325-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214325-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fedd5e8981si2632072a12.102.2024.06.13.20.55.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 20:55:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214325-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-214325-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214325-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 55192284D67 for ; Fri, 14 Jun 2024 03:55:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E3CE146D77; Fri, 14 Jun 2024 03:55:10 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F2AE146A90; Fri, 14 Jun 2024 03:55:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718337309; cv=none; b=g9SKzfpvh3rbgGbEH7bo2926GKlMWmK58uN7lrK7y2CxRse4dDY/a/E4YinYz/6rbfUFPhJTKQo0/I/W8KSen9g5MgYlpJGiAObwEd6G/vwmiLWnnjW3sVzjTOvmn3aNmq4zbJ83Uqs7USN68abVRZdBojW57W7m/lTYAmtIXzs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718337309; c=relaxed/simple; bh=DRCCeEjTSrpOxV55wmObarqnuntQRUzJ2p5ODapp/eo=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=UjukrLt2xFatNQvIP0/A6niTL1AddaGeOfckUSAAt8DY7xBAI7o9JoSg2ZWZXnXLG725hhi9oFuIhfqzIAgNavLlqC0LSiNTxBH0EDUcmAX6wKgXT7RQhYwwpPDJc5Q28DPb0GAhUkshTq4IrMZBHaJ/Y6nK0qqaQWFkKEfUyTg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4W0lgQ0DKHzwS3s; Fri, 14 Jun 2024 11:50:58 +0800 (CST) Received: from kwepemd200010.china.huawei.com (unknown [7.221.188.124]) by mail.maildlp.com (Postfix) with ESMTPS id 1E0B114059F; Fri, 14 Jun 2024 11:55:06 +0800 (CST) Received: from kwepemd100011.china.huawei.com (7.221.188.204) by kwepemd200010.china.huawei.com (7.221.188.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 14 Jun 2024 11:55:05 +0800 Received: from kwepemd100011.china.huawei.com ([7.221.188.204]) by kwepemd100011.china.huawei.com ([7.221.188.204]) with mapi id 15.02.1258.034; Fri, 14 Jun 2024 11:55:05 +0800 From: duchangbin To: Adrian Hunter CC: duchangbin , Peter Zijlstra , Ingo Molnar , "Arnaldo Carvalho de Melo" , Namhyung Kim , Nathan Chancellor , Mark Rutland , Alexander Shishkin , Jiri Olsa , "Ian Rogers" , "Liang, Kan" , "Nick Desaulniers" , Bill Wendling , Justin Stitt , "linux-perf-users@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "llvm@lists.linux.dev" Subject: Re: [PATCH 1/2] perf: support specify vdso path in cmdline Thread-Topic: [PATCH 1/2] perf: support specify vdso path in cmdline Thread-Index: AQHavVvgPApptK0OsE6+S63iYUbWKrHE1RgAgACeKQD//4I5AIABrPmA Date: Fri, 14 Jun 2024 03:55:05 +0000 Message-ID: References: <20240613063510.348692-1-changbin.du@huawei.com> <20240613063510.348692-2-changbin.du@huawei.com> <961fe800-7160-4c53-a3a0-f16700c433cd@intel.com> <1e17854b16fe46a4b384b6ddec05029a@huawei.com> In-Reply-To: Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-imapappendstamp: kwepemd100011.china.huawei.com (15.02.1258.034) x-ms-exchange-messagesentrepresentingtype: 1 Content-Type: text/plain; charset="us-ascii" Content-ID: <4469B8DA2F78264E8F076DE6BAD8C2B3@huawei.com> Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, Jun 13, 2024 at 01:19:20PM +0300, Adrian Hunter wrote: > On 13/06/24 12:49, duchangbin wrote: > > On Thu, Jun 13, 2024 at 11:23:26AM +0300, Adrian Hunter wrote: > >> On 13/06/24 09:35, Changbin Du wrote: > >>> The vdso dumped from process memory (in buildid-cache) lacks debuggin= g > >>> info. To annotate vdso symbols with source lines we need specify a > >>> debugging version. > >>> > >>> For x86, we can find them from your local build as > >>> arch/x86/entry/vdso/vdso{32,64}.so.dbg. Or they may reside in > >>> /lib/modules//vdso/vdso{32,64}.so on Ubuntu. But notice that > >>> the buildid has to match. > >>> > >>> $ sudo perf record -a > >>> $ sudo perf report --objdump=3Dllvm-objdump \ > >>> --vdso arch/x86/entry/vdso/vdso64.so.dbg,arch/x86/entry/vdso/vdso32= .so.dbg > >>> > >>> When doing cross platform analysis, we also need specify the vdso pat= h if > >>> we are interested in its symbols. > >> > >> We already have logic to find debug files, and to deal with a symbol s= ource > >> (syms_ss) and runtime symbol source (runtime_ss). > >> > >> Can't we make that work transparently for vdso so that the user does > >> not have to. > >> > > For Ubuntu, we can find the debug files of vdso in > > /lib/modules//vdso/vdso{32,64}.so. These two are debug version= . > >=20 > > For local build, seems vdso{32,64}.so.dbg are not installed in /lib/mod= ules/ nor > > other locations. >=20 > Isn't there /lib/modules//build symbolic link to follow? >=20 hm, we can try /lib/modules//build/arch/x86/entry/vdso/vdso*.so.db= g. Other arches are similar. So, we will try these pathes internally. And keep '--vdso' if someone reall= y want a special path. (just like vmlinux) --=20 Cheers, Changbin Du