Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp104569lqe; Fri, 5 Apr 2024 14:18:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUK1mISyKYbatcC1zDLHd2MsPEAzgpz3Q7V06LVrL/bYrKdMzZWxT9VRjfv7BQeK0JU2KMWB/xZL0w8SOq5PAZ+1EULQt+3EwD9sTLWgQ== X-Google-Smtp-Source: AGHT+IF/Ntozd+Ky+YrB1VLCT2WwOhoEaq1HinhyiHpHnRe3v6Pp3TdXJ0KnsqAyF1vJqxIz1HD9 X-Received: by 2002:a50:9e44:0:b0:56e:2a6a:8d3a with SMTP id z62-20020a509e44000000b0056e2a6a8d3amr2595549ede.15.1712351907283; Fri, 05 Apr 2024 14:18:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712351907; cv=pass; d=google.com; s=arc-20160816; b=sU53SgBCKnZlPh1DG7WjVAZDbYKFysLOL4MhIIbTL9fg8bzceDdf82RE5xD77xvTxh qvVWG9O9dw0ch1C9MJfQpcGs9ftHcyLSdd999IdA/Ur57WROShI3eJ1srK7/29d3BK/d XktLwRD54UUZZ2awqbSFTOAdvDxcdLMyOeAO/zU/s+JL8bXmFpUMQQvyQ/v6M1z4ufUn sHC60OFROdg1K3EX3zpNrVjYjA/A57xCJPcPINd73iorqRcbrAfisb9qt/xqNLnWDLj2 0siAWZH7v0uaV4Vn0JutiZYnUACkyNuUkDvHDoqfkXlSMAzh4JsC/rXU8GkFsWC9dCvj Eb9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=FNWzflS3ALcBVfurjrxaLexJ3aTeMrr+7BU6e/dEK9g=; fh=fHhbvXgCev/wpffLVpfaAi8pPyv7hrTyhVPgsZ7HNrs=; b=GDmlVQJT7RSA02dJCeoFih9wYedAiJHqIyItbfDW1NReM/Bdl2D1JiUdbjt1Bc8iED ZKDTEDAduE/RUfyxb4ka7ITo0qDkor1nkil8+taVg+OeZc8iA5Nh/DgvUIW3Y9+Y3yaw QK8ZJdYLxFGG3pYiuCDu/T3hGHdRxinLNWkSIJDhqIbkYQ2IcTO+nRsONT4PlxJN2+zq kfH6lbDZU7/3sZSmM/ckIM6YiSfM8/2DQ5CZJrN2CZhg/TFGCoAVPYi/0hlG9VJcmBBd aVlIX341Tn8++wZ/4H/6ORpHhXKn49BzYHsq6W/Bb99l7zAbe2wcRI8KFAOY+eGGjYkG 2bCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WalGlqB6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133586-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k11-20020a508acb000000b0056e07eae2e8si1071941edk.285.2024.04.05.14.18.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 14:18:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133586-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WalGlqB6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133586-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 08C7E1F227D0 for ; Fri, 5 Apr 2024 21:18:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60959175571; Fri, 5 Apr 2024 21:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WalGlqB6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 862AC17554B; Fri, 5 Apr 2024 21:18:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712351883; cv=none; b=hbkwJqbIDi7o7kVtj6TZ+pAFZv5JGAO9CWqcdHjsnJZUf0Jo8bqJ8SIC+PeZAYTZHsf8XGqcBK2lr9lUr2Rfcnzax2onmkdt2LpuoF0BXlaE0jaxf8V/Pm4kBscU6Ujup0xt0lSVWEtcbcXU4IJdShOp8W1wwRzWiHdNn5v/LUA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712351883; c=relaxed/simple; bh=Wot6ma/gg8ednN0U6RXz9Cy+ni+Dlc7ehc3kD04ODV8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CsNbAImwiKzZyhDH8YjCeT8euXjOpSCfKjQJHa6ehzqClo+LHhjffyI49TnBi7KKivdYOKq7uAEtgQ/VxY94q854L7eptd8ajvYmgRniZvTDdYomFGrQR8tHi4Rz8xsFITZt/SZ9lEGpoWc+PhXUJxkA0+QSAaQI4fXfx5FGj/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WalGlqB6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3A51C43390; Fri, 5 Apr 2024 21:18:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712351883; bh=Wot6ma/gg8ednN0U6RXz9Cy+ni+Dlc7ehc3kD04ODV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WalGlqB6KhBW5HQq5Gs95gX4YgYlz4gAZaqKDMKP+d016xOF0C+h0bDa27/EXQc/I arneBPLdXwQ5YYi/ks4Y/qqIlr+HQEnCpJaY4ir7KtMX/uUrp4d4jlWwLBl5JYZg6H 3YUGCxuOlEzpdXM8f9WkdQqivsyxtCFVb2W4sYi0DI3Ik9mVRa2PlMwuPmL/0ExjqG gBkehcbpcqMYML/S7nqS40DV9VPn4Y0Cy9BgqPyi+9XtdSSNRAP3HKmJplFnyqfQ5U /Gv7FChhsLR/0Pn9rVV/CY7Cu/b9YkNCg6ravtKWEzrScZu9NlIAzaE9EIpdETDeqo mGxQ/ISSaimcg== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: [PATCH 2/4] perf annotate-data: Fix global variable lookup Date: Fri, 5 Apr 2024 14:17:58 -0700 Message-ID: <20240405211800.1412920-3-namhyung@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240405211800.1412920-1-namhyung@kernel.org> References: <20240405211800.1412920-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The recent change in the global variable handling added a bug to miss setting the return value even if it found a data type. Also add the type name in the debug message. Fixes: 1ebb5e17ef21 ("perf annotate-data: Add get_global_var_type()") Signed-off-by: Namhyung Kim --- tools/perf/util/annotate-data.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/annotate-data.c b/tools/perf/util/annotate-data.c index 043d80791bd0..1047ea9d578c 100644 --- a/tools/perf/util/annotate-data.c +++ b/tools/perf/util/annotate-data.c @@ -1468,8 +1468,10 @@ static int find_data_type_die(struct data_loc_info *dloc, Dwarf_Die *type_die) &offset, type_die)) { dloc->type_offset = offset; - pr_debug_dtp("found PC-rel by addr=%#"PRIx64" offset=%#x\n", + pr_debug_dtp("found PC-rel by addr=%#"PRIx64" offset=%#x", dloc->var_addr, offset); + pr_debug_type_name(type_die, TSR_KIND_TYPE); + ret = 0; goto out; } } -- 2.44.0.478.gd926399ef9-goog