From nobody Sun Feb 8 18:49:39 2026 Received: from mail-dy1-f202.google.com (mail-dy1-f202.google.com [74.125.82.202]) (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 A1B612E7631 for ; Sat, 10 Jan 2026 08:27:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768033638; cv=none; b=l9zE+5nl0Y0vcJWl9R+64iuqAYMKP0WZbHKoGn8nWJTJNkFeGc1AfBao4xAojyYs+KVxrO1yb1OlzNg1wmu6Nh4d4RDjkUyFxIvGrTnk2TU08CdfxMvaHYElIvuyg49/fT+vfM6QEXJ7S9rwu+T037BlNhe/JlmA0JlCqiS5VLU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768033638; c=relaxed/simple; bh=p9yZjdPOVlIsrzsRvdNrHY7nRPFeaZefQijhYmOqz0Q=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=ZZb+9SbfHPI5l8cOoUrOlXacgAsP6C2udX6BXrAV66dmywFT2pnCgS2N23Uamoouy0MVt6hZkxW+TUjJL/EXYnF6Ea2E/3mZWfjAEwkVU4au2dstTj4OsyympxJJ/GIrRRx4/9aKVcw+BnO6lmUg0nDZN+D2p+EJqUvXQmexYrI= 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=G2F1m2gQ; arc=none smtp.client-ip=74.125.82.202 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="G2F1m2gQ" Received: by mail-dy1-f202.google.com with SMTP id 5a478bee46e88-2ae29a21e7eso2625841eec.0 for ; Sat, 10 Jan 2026 00:27:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768033634; x=1768638434; 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=G2F1m2gQ5llrW6r8Ck9XryuzdA9HXVhxJovvxbXwkTN5EMct+l8C82baYDB30YiBku mmv69tSJfTf0gonbWAD+nyBMAbykNOD7SdE/yUJe7ko4pP2gXYtE+X3xnUkd5bXUqjhA d0K+oAS4rL7UQ/gj8Elj5MK2b01VOdPN9/9fH6xKh6I3kYjPI0yken8pNbzFiam8OtK0 dqHCnh3uIwbgz47CCzBYT8EOu24uNEGqHCEapAIdFD6gNoz4JNTDqwujlojqUuPAlmCp 9Wm90NluZ+mnQX15WjIiI/0aW8HTTm2H+87tGP45z8Cf19xUTyYOMKV2DsElqGM/gyoY FNbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768033634; x=1768638434; 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=CuBMW0cotXPNUa8sVpIPIZ2CDveuICVdvCSN02xiav3J1ylVNjHWTwZmOeoyU6rI2F mV+fTrirrQVV4gsoV4pv2n+ukkEkx7OCxoUZUbt9Tq0+CkGrUqXS7x+Ik5QCVAJ3hO+L AlO8FmL/0+ezMCWpCiukHDfI8FQfk8FuOC/NekIcJAEbDFB8u0/dDtNCB92ESf6qnUZq aXi9Oc6UEyzK5CHqJLBwUzCAyAmo3QpOjdYduacWC00zqgigwWeVLsYlJWV0NUi9yh1g voZsNyTDceplOlHLz988wAe7uiRNBUQkzkZtEYZJ74XWXx/Uo5UXuKr5sS5rS5EjONJQ rB2Q== X-Forwarded-Encrypted: i=1; AJvYcCVZm+2FletRJVNwacy7ysLrFKig5ewBd17VZ8U7uO/AyyGWDaqKiW8UJglbQJeJGSvRt6K2vumZFWUaDac=@vger.kernel.org X-Gm-Message-State: AOJu0YzLMyzuy4+K3eCJ3JtzI9kOaj4RUGXwjwv6AxqETvoWxeKpk/kP Xj/cxahzLZZvd1yrx5igumT51wYE7Nzwenq/WlRDVvQCABV4FgrR01BDmPGkbvrfu6F1bHdZP08 CfDYX8z9l8g== X-Google-Smtp-Source: AGHT+IEQpnrv5YMXhTRF34W6qbcoh5juNyS5pLjmdu4Lo09vc0suzL8frFCFCE9E1+rfz8s+Egg3NdjQpUBL X-Received: from dlii15.prod.google.com ([2002:a05:7022:418f:b0:11b:a892:80ac]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:11c:b0:11d:fcc9:f225 with SMTP id a92af1059eb24-121f8653d54mr12079194c88.14.1768033633833; Sat, 10 Jan 2026 00:27:13 -0800 (PST) Date: Sat, 10 Jan 2026 00:26:47 -0800 In-Reply-To: <20260110082647.1487574-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: <20260110082647.1487574-1-irogers@google.com> X-Mailer: git-send-email 2.52.0.457.g6b5491de43-goog Message-ID: <20260110082647.1487574-7-irogers@google.com> Subject: [PATCH v2 6/6] 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