From nobody Sun Feb 8 18:49:32 2026 Received: from mail-dl1-f73.google.com (mail-dl1-f73.google.com [74.125.82.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87C8122068A for ; Sun, 11 Jan 2026 04:13:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768104842; cv=none; b=reD44XPV8bKVuHOqbvagpORZ02uPY8tssbpVfXYZ5XrQbCU4kFK0HwxWs7J+jArlvCdC9k4zo/ieWZjzmei5jiLnRpNZw51zeqkCvu9n5qf8uJSnzLzYF2IZ4rPxGFuEkniYohz1pFL/LBBLWvmZHST11QjxMxPJUUx2vvwxBp0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768104842; c=relaxed/simple; bh=p9yZjdPOVlIsrzsRvdNrHY7nRPFeaZefQijhYmOqz0Q=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=eSR8BEYdEY3z4UWdgYMH3z79hXXdjAPkY2Z48kQwCc6VYFzZpvNeoHFhGH/NLE3VSURXI8rACrtN3C/E69yM8Ody1ElhgVR6eVZvfmFTSL+4AIz9rr+uJkI1u+UoEQpxp0gp/NErmQ/2BVRMgsvWDbrk8BfWqT6TItbfsAlZ3V8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=UdATJq/m; arc=none smtp.client-ip=74.125.82.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="UdATJq/m" Received: by mail-dl1-f73.google.com with SMTP id a92af1059eb24-11f3b54cfdeso3726495c88.1 for ; Sat, 10 Jan 2026 20:13:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768104837; x=1768709637; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=Y1L+OOdkfbYNneXDpVeIu9zEur50u8G+yPfcpgNFE0M=; b=UdATJq/mfhkTPY2vUbXCll4Y8SaP/zd75+og9dM3mLie9urL58/PMh6L8VlCWFZutD awe20MMQg85FFXaYSidki8cNuxuV1zuVtyLCplGBwiPArtoHV7Afl11OMbmVedrYJidX ZI+bPX4oYaEoSz/c+gBL4KuVFdg0J/ml1gJ/FEO3vcneuCerLpf00ikL01wBpG+0EY/7 gGMYxEhHDyqi8fiSqauKqWzCIdVX+oCts6pUT/jnECPOLKgoNDyVyc/bUBxw6Mu59MOr 3VUidQNW7vUdBH2vH5RP+DAVIu1xt4glFwfyFRfxCloEGCoAVNl3FMQV56/iGQlaMrt2 2+3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768104837; x=1768709637; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Y1L+OOdkfbYNneXDpVeIu9zEur50u8G+yPfcpgNFE0M=; b=XPuRifUvfpQ6wtl3vXfF74zTEJZy9Yb5s3E/ohr0WszWv5MWankq98Y+vDVLUaAUdO MCFu39ps2Kv+M/eP9Twx1CTfKvsd26CFlgIFokSZnablsLGyTscrG6VDuK+iK+liiLpb oB87FMaaXPnbVjIf8f9Da9Vxq2frSmrcdHBixbMC5Khk04kO6fqPcpqsnArTouzrSuVe BXTRoJ90xbSv+U4ferLlM1rmj9AjyQBxk32sizNo3NgXAKVErvcfKcNJQOv1Tq2ilCGN FTEPij0kGzjGVae9IgPxWIuspUZMuUtB+dzogFqPoYfZUuhwiRjNReT76pYFg3GqfPH6 xE6Q== X-Forwarded-Encrypted: i=1; AJvYcCUit3YpmchTTyw8/JJRMLdjjzh/o1Foh0VsP4Dp2RgnCSRBAMwBtgB91H+X+E1SShF0oJZyjE7ds/3cIIg=@vger.kernel.org X-Gm-Message-State: AOJu0YzntiR/OCTrRa45HsWE9SnwPjpWR79ycnxh9xC11UK4QnolxwJ3 sTjCjPRVNAY+VV+6ty86Yl2AMeYBb/AEeBMPx7ooxhPacN1KkVGWVWqt6Ntw73Px/hCaPq1Fb0d kHXEZUxPAiw== X-Google-Smtp-Source: AGHT+IG7oQJLlfvzPaq+7w4x6ycZ6l1X9tfmyrFcP81QUSW0dg2K1VCSEQsQrQ67Jgi2uDMIkWxDY+5WgVEl X-Received: from dyhb22.prod.google.com ([2002:a05:7300:1496:b0:2ac:2c66:7180]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:160a:b0:11b:9386:8273 with SMTP id a92af1059eb24-121f8b9aa3amr13458538c88.48.1768104836720; Sat, 10 Jan 2026 20:13:56 -0800 (PST) Date: Sat, 10 Jan 2026 20:13:38 -0800 In-Reply-To: <20260111041338.1817056-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260111041338.1817056-1-irogers@google.com> X-Mailer: git-send-email 2.52.0.457.g6b5491de43-goog Message-ID: <20260111041338.1817056-8-irogers@google.com> Subject: [PATCH v3 7/7] perf test: Test addr2line unwinding works with inline functions From: Ian Rogers To: Tony Jones , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark , Howard Chu , Stephen Brennan , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add a test that seeks to see inline functions correctly displayed in perf script from the inlineloop workload. Signed-off-by: Ian Rogers --- tools/perf/tests/shell/addr2line_inlines.sh | 47 +++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 tools/perf/tests/shell/addr2line_inlines.sh diff --git a/tools/perf/tests/shell/addr2line_inlines.sh b/tools/perf/tests= /shell/addr2line_inlines.sh new file mode 100755 index 000000000000..4a5b6f5be23d --- /dev/null +++ b/tools/perf/tests/shell/addr2line_inlines.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# test addr2line inline unwinding +# SPDX-License-Identifier: GPL-2.0 + +set -e + +err=3D0 +test_dir=3D$(mktemp -d /tmp/perf-test-inline-addr2line.XXXXXXXXXX) +perf_data=3D"${test_dir}/perf.data" +perf_script_txt=3D"${test_dir}/perf_script.txt" + +cleanup() { + rm -rf "${test_dir}" + trap - EXIT TERM INT +} + +trap_cleanup() { + echo "Unexpected signal in ${FUNCNAME[1]}" + cleanup + exit 1 +} +trap trap_cleanup EXIT TERM INT + +test_inlinedloop() { + echo "Inline unwinding verification test" + # Record data. Currently only dwarf callchains support inlined functio= ns. + perf record --call-graph dwarf -e task-clock:u -o "${perf_data}" -- pe= rf test -w inlineloop 1 + + # Check output with inline (default) and srcline + perf script -i "${perf_data}" --fields +srcline > "${perf_script_txt}" + + # Expect the leaf and middle functions to occur on lines in the 20s, w= ith + # the non-inlined parent function on a line in the 30s. + if grep -q "inlineloop.c:2. (inlined)" "${perf_script_txt}" && + grep -q "inlineloop.c:3.$" "${perf_script_txt}" + then + echo "Inline unwinding verification test [Success]" + else + echo "Inline unwinding verification test [Failed missing inlined f= unctions]" + err=3D1 + fi +} + +test_inlinedloop + +cleanup +exit $err --=20 2.52.0.457.g6b5491de43-goog