Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp926341lqm; Wed, 1 May 2024 23:00:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXFOPSDHL2kGTWBthjDXV/iuylr8vP1RwZB/nSZKauYjjtyLDb/hp81x+mOmjZIDGWfBOQ0qd0ZMOzgyloSMPkfmQ6iN9bir+mz+gT2Kw== X-Google-Smtp-Source: AGHT+IECI/tuQyt2FWZpGRPR1gvbxKXDBcFHFpiNqCkrJdwEY4MMVBNJPb0Q4uhYrbTackT3f6fA X-Received: by 2002:a17:906:849:b0:a55:be99:60d5 with SMTP id f9-20020a170906084900b00a55be9960d5mr660374ejd.23.1714629624989; Wed, 01 May 2024 23:00:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714629624; cv=pass; d=google.com; s=arc-20160816; b=hfi5o/ICfRhnJuNTC66Z0E41VmA2MYTwmunyw0lbWMCG7UgiV4VFsL3ZLkOYIz6FNJ WuhzaLerkpMP3kdfKaREgCuk3xPAVAFDaPpwegOChaBcS68FXOL/g0c5eDITUveKgeu7 GsI3+YJVX3BcUUU6iuj9cE7TtYcMV0ENVj2cCn8aNBHIoDmZJsSVV3trokE1thW/3pXj 4k0hW8cyz0j1PBlCghZ92G3U3JYXLUNxPAgZQgNszpJPk2Fp+xFa7MgPDT+xPxay0TbJ 2KhDPskPhzhJbehGP8jUM8t4xg2kXsG3U/JijF77JeCkz5RaKkXHPZAp6wJc7+75IREl wzOw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=yIxdfRkQcP39jWIPUBr+CwQWm7kkChf64+AmwF52sz8=; fh=fHhbvXgCev/wpffLVpfaAi8pPyv7hrTyhVPgsZ7HNrs=; b=vVfwA8952cJIMw6YNOO7uwYAAQRl4lSi9Xq+Vn8VSbSAkoi7YSffEnxRB3/mOf8Cdb wp7WIkb0pbFnCm5r4aIuQDAY92Fct+MFxAC9ifnOCVkSbpWoh0WkAgk7R5x7DZBvhxgJ oRnMbRLgi15atuh7DrKTsl78+3FLnnG53zGEiNANjCeGjiZhjgyV91r6ezq7brzN4uRQ KAFEv6hjW75jljiGKPEQaZhc/QB0VXbuteaeMMh9OgUFul3d4l9H+qaUFAH6PJSYZbpP h62OH8Lc/ZiJT+SVZ5CU+EFo+G5kB5ziocvF87YCyu/qyDNAlgm0WYeHA10SXjcA4QaD lyiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TaTWrmYa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-165993-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165993-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 c26-20020a170906341a00b00a58e8d1f9d7si148332ejb.648.2024.05.01.23.00.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 23:00:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165993-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=TaTWrmYa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-165993-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165993-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 B57841F2262A for ; Thu, 2 May 2024 06:00:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B65721A0B; Thu, 2 May 2024 06:00:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TaTWrmYa" 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 513D81CAB3; Thu, 2 May 2024 06:00:12 +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=1714629613; cv=none; b=WE2d3xtcrFENtHV2IyHjNxRhemmTAL+6vkA3S0GeStzRYV3Zq825Kk5H4kaSTju3Eqa9Ej/m9/+6pyxkdcxIECQ9Z7IDY1UivAm6wPb6mU1zNtW7kw/FJqkKGjlN95YpX9w1WWedjGrSfkzDfyz3X3fCl0KgcqS3Pe/pPlD/+wY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714629613; c=relaxed/simple; bh=IXs2m0Z9B4ZLED76OzsFAyfEm21c5zbXn+r+RNAH7p4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UWWAEu99dpStoNu1lLo89CkgWUBs9NxmlKHK6A0UI7xMe0E0NCrkRWnmWn2lLzUgbv23XXys88qddbghmn363eZSMJUDEE8+rubGynziUauJe++IYMqaEFgLqg86jCq6G6q+7ESFRyoi7Uht0CS7vm39ZyG4EZYGzr5SUl/jdUg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TaTWrmYa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C5A5C116B1; Thu, 2 May 2024 06:00:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714629612; bh=IXs2m0Z9B4ZLED76OzsFAyfEm21c5zbXn+r+RNAH7p4=; h=From:To:Cc:Subject:Date:From; b=TaTWrmYaGxWmMYuQ/o0Shf3my25Y+Z57Km/NCDRy+40y/5aJ2As53BrzFid09gzcA G+Jy715v6Kj8vQwsCOPZwmagEwKbDwKO6Thg+Sop8nVlAgqaCPZ4RY4Q5aagncOGVk jegOwfbqVh0Vo/BuR5uM30prW3PKLy5PmlEZKQN6Hf56Hh3hRVBwXyia/wJJNA8Wwm WZNVdz+2D12a/hbTlgeHB7GKAK07R9gTxJNBojfmTSZ1VvB5niizSMeb4sUYYy0MNq PQEAGga5HZOjJ1as5V7Evz+qSRMirY91McjDNQrNoX/KBW5LHCsVfO3vR8owUGBdam 8jHEscuHKzE8Q== 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: [PATCHSET 0/6] perf annotate-data: Small updates in the data type profiling (v1) Date: Wed, 1 May 2024 23:00:05 -0700 Message-ID: <20240502060011.1838090-1-namhyung@kernel.org> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello, This is a mix of bug fixes and optimization in the data type profiling. Firstly it now caches global variables and looks them up by address later. This will be good for performance as well as improves the success rates because some variables are defined in a separate file (compile unit) and has no info in the call site for some reason. Also it properly checks instructions that use more than one register for a memory access like x86 SIB addressing. And check the type of stack variables correctly and discard constant values (without type info). Thanks, Namhyung Namhyung Kim (6): perf dwarf-aux: Add die_collect_global_vars() perf annotate-data: Collect global variables in advance perf annotate-data: Handle direct global variable access perf annotate-data: Check memory access with two registers perf annotate-data: Handle multi regs in find_data_type_block() perf annotate-data: Check kind of stack variables tools/perf/util/annotate-data.c | 157 ++++++++++++++++++++++++++------ tools/perf/util/dwarf-aux.c | 62 +++++++++++++ tools/perf/util/dwarf-aux.h | 8 ++ 3 files changed, 197 insertions(+), 30 deletions(-) -- 2.45.0.rc1.225.g2a3ae87e7f-goog