Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp201097rdb; Thu, 8 Feb 2024 03:36:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXfeLyzZ24mFoDSZ5h+vT7+goceYCgcFBOIkzOQ3ctvlNta3wkzchNwH242NVKQjTXNKXMZCpIwQd6pr5F+wU7hoVrp7zfOqt0QPUF01g== X-Google-Smtp-Source: AGHT+IEEIDtDwQuvKilrnmWB0H/HOUd+4yscPdV6WNK+5UjKWX8QYMmf4FXEy8F7pFdi27m5e74c X-Received: by 2002:a9d:4811:0:b0:6e0:fa5e:5a74 with SMTP id c17-20020a9d4811000000b006e0fa5e5a74mr9750154otf.28.1707392216944; Thu, 08 Feb 2024 03:36:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707392216; cv=pass; d=google.com; s=arc-20160816; b=uA1vSjSkqbXU5Z554Sq8d9NSwBYm3gTawvZvNbxMkJKVL7PJOcq8/FKqXAXGZ+4p9v HP9ajkNPouD2AqxqxnK9anYBdCvjqcg1Fn3raWHMat0D9hg5fCkVqTlyc/SJpZQB2s9G 3n8YD+24SqFYns6dOJE1V0Jm1lZyq4wvOX2WTH7gqj93eKQ/IwZW0IJ7gwwWzwrFcEJT rYOihoDRU0JZGp6az5EGPYrKL6giokFxh1U/GjZ666zejYaO9hg1LgFWEHlRaEwWDaNZ wrilZCycJuH7+ybMA/uDkpTgKSI1cc73dlCRMEbz4NVT999P3bnWKR9/LYj7iJT1uBuI pdCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=2sCpe1zfJJLCKweo+jv3p3iPTwl1AjjLkgZPtGcwXHQ=; fh=lQKvcqDgjjnc2PWvNFGkK1Ivk0wSL+J0sbIsmqtyL6k=; b=snGoKamBC61imEgxFVdAxIXsuawkSPYWAaGemBlpv+JvvMCQHVq11O3qsYLNCSouNx v7yda1YU8r7lF41Nm27Iwtec3TjwE44u9vbpE74mMtK6JMTuW4dNrKVEKKKwdBOXQTDf NXLi6JEKVGLrnY4r9fvS4gHQgIZfF9jtM7W+0g5Mkuvlu2dOz0NIwRm1QbxWO9YtMuzK C9TKH/dqsZujYugxu3JAhVVSgGS8XH7SPLVL8iYDG0NpB2LsHt8g7GJ6nrCmL3vrpY33 lDFmaCuljvMqRso6G1EW7tMZ/Ej5B7DFWJ5xmcAK23qKvfGqhcsyYflxDx/R+gmbUCW5 OnoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EkO1fpun; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-57972-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57972-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCWzr8CgMw3GW1raMM1T62XlKfhKU6/WdVFgzUfTjJVGT87A5zCt27sP6S9kDIlc3QdysLBjuHK43oUPgYDkbXlePfNwXBJDuxG//ZxtkQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bz8-20020a056a02060800b005ce0b70d2b0si4198225pgb.102.2024.02.08.03.36.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 03:36:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57972-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; dkim=pass header.i=@intel.com header.s=Intel header.b=EkO1fpun; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-57972-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57972-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 B68C128256B for ; Thu, 8 Feb 2024 11:35:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69A6F78B47; Thu, 8 Feb 2024 11:32:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EkO1fpun" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 1FD6178B49; Thu, 8 Feb 2024 11:32:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707391977; cv=none; b=bWM/vVSMPtbYWZosnVOHohrwnTOPly8BUwIoGisCE8QuLJhq5KLieMHXDQXFS6MRfpMoMTDLUg7rGEH1Kd1IlP9IGt20FJMA+XH0kbrlW5S0fvzKLdgHIz/PdrvcpLvHvkL0/cMlCdinsp4rfZkJzIL4D7HrsIC7FyHsIUt9UzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707391977; c=relaxed/simple; bh=z/v40T43ha2hX1e8ZimPBiWM40ccC7SzSxwOXcvZwoA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sG1P5PrHXXTW5UMt0/gcLF9jtYmdrEttCx0BeKNef24hVoE3LO8XzYUgM0jar/6zUusRKA47coqPTnyV3tOkvw+GWtTyfFCVZASczlZUg2tUx0dYWtqwJQ2q969PsHC+WOqNjNQN/pdtvqiLZhi9pV7de5gN0+UmJECSmPXcRAY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=EkO1fpun; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707391976; x=1738927976; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z/v40T43ha2hX1e8ZimPBiWM40ccC7SzSxwOXcvZwoA=; b=EkO1fpunqnrk9NBrQ1Tw5QA47SX4ICesqZYz2m5pSZtzPWaW6ppjw9pn XzzDXHhRZwxLu05c/SQCngpyQ7bswb8q6FkgJint9lguBuL4vOlwUtatX m3I/YG68DIyN2z7Nf5lxqp3cnj5CPhIY1j0wHoV5x/3R4iWIT/n7VDClv Z6kihpieUEQmjMXynEMBBif2xMQX+67fl7DJD565+69eCvrCfJhkxO6Jr j+5Fyzr+f5XaOCiXM6miB3VRFXEFpM6Hoh3B8VoILYN/VXzpN7LhgnTq2 kpRx3McM5l4lmUBp6w9CCBoHrirqvZ2OiMcfalsNS9uhqTmWiHzWQvFOT Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10977"; a="1345804" X-IronPort-AV: E=Sophos;i="6.05,253,1701158400"; d="scan'208";a="1345804" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 03:32:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,253,1701158400"; d="scan'208";a="1957927" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.251.219.88]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 03:32:50 -0800 From: Adrian Hunter To: Peter Zijlstra Cc: Ingo Molnar , Mark Rutland , Alexander Shishkin , Heiko Carstens , Thomas Richter , Hendrik Brueckner , Suzuki K Poulose , Mike Leach , James Clark , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Yicong Yang , Jonathan Cameron , Will Deacon , Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim , Ian Rogers , Andi Kleen , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH V5 12/12] perf intel-pt: Add a test for pause / resume Date: Thu, 8 Feb 2024 13:31:27 +0200 Message-Id: <20240208113127.22216-13-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240208113127.22216-1-adrian.hunter@intel.com> References: <20240208113127.22216-1-adrian.hunter@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Content-Transfer-Encoding: 8bit Add a simple sub-test to the "Miscellaneous Intel PT testing" test to check pause / resume. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers --- tools/perf/tests/shell/test_intel_pt.sh | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/shell/test_intel_pt.sh index 723ec501f99a..e359db0d0ff2 100755 --- a/tools/perf/tests/shell/test_intel_pt.sh +++ b/tools/perf/tests/shell/test_intel_pt.sh @@ -644,6 +644,33 @@ test_pipe() return 0 } +test_pause_resume() +{ + echo "--- Test with pause / resume ---" + if ! perf_record_no_decode -o "${perfdatafile}" -e intel_pt/aux-action=start-paused/u uname ; then + echo "SKIP: pause / resume is not supported" + return 2 + fi + if ! perf_record_no_bpf -o "${perfdatafile}" \ + -e intel_pt/aux-action=start-paused/u \ + -e instructions/period=50000,aux-action=resume,name=Resume/u \ + -e instructions/period=100000,aux-action=pause,name=Pause/u uname ; then + echo "perf record with pause / resume failed" + return 1 + fi + if ! perf script -i "${perfdatafile}" --itrace=b -Fperiod,event | \ + awk 'BEGIN {paused=1;branches=0} + /Resume/ {paused=0} + /branches/ {if (paused) exit 1;branches=1} + /Pause/ {paused=1} + END {if (!branches) exit 1}' ; then + echo "perf record with pause / resume failed" + return 1 + fi + echo OK + return 0 +} + count_result() { if [ "$1" -eq 2 ] ; then @@ -672,6 +699,7 @@ test_power_event || ret=$? ; count_result $ret ; ret=0 test_no_tnt || ret=$? ; count_result $ret ; ret=0 test_event_trace || ret=$? ; count_result $ret ; ret=0 test_pipe || ret=$? ; count_result $ret ; ret=0 +test_pause_resume || ret=$? ; count_result $ret ; ret=0 cleanup -- 2.34.1