From patchwork Thu Feb 8 11:31:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 198323 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp100282dyd; Thu, 8 Feb 2024 03:34:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnSphFwQ0poDFFowmUjX7iyWEfhZQaHjyfJPCerbcPEYN50VW1hR7ipkZN0Op4AZTIbfLk X-Received: by 2002:a05:620a:10af:b0:783:4766:b88f with SMTP id h15-20020a05620a10af00b007834766b88fmr8024129qkk.36.1707392053248; Thu, 08 Feb 2024 03:34:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707392053; cv=pass; d=google.com; s=arc-20160816; b=cw7YDFf5XVv6jI9fAbXQt+xw4u6Xu8ho5YnUqVjKXts1wyqunvnqXw74t1G3OK5hfv GjpGlgGPmTrK18t5TO0oZYOcB7j49ey1/rcv7CkegSIK06iSTlFxGjpzN3CLDzYrwexD 3iqFRKbQaHXltqrOJQ0pH7t8fb1x7gR7+qZPZQ8Njp9qErBUJ1oBqqQGdZuStcKwfpka TMAYVTj6hcLFq6Si6MXQyZdH7y4eXD/BF1Ex9vCBDaGQ+1ksitunP8KfitX6JtMXK/sr HcOCbg3wRtC+Nsz2w9VbspH5Y/s1vFEUtPEx7pdstB3KQt8/TcuW4egFFUH0BiE/G6uz J/Ng== 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=H62+WEP6s/6ELBNQR1BnaDHxgYORYdtYVphkNEjTSHE=; fh=YbyM1T2bkVGG+cC3vouBM65v9PlrJQPHNVFBLUfD9Yg=; b=ChObDWfXyHx98+jwJ5w1EprRu0Wx0+xvOnrIlFXlcMr65lT+31/D4AwlhUoi4COOt6 VTgghGizfPpBGmaaQwuCz0aSoaB0UiLcCl8Wtt5Nf2ETB50c7ADwuUkSjUNcd16MFzc7 QsG4OF99AgQKyGSYEsbzBNjQKeJPOIt2M0k8JUVv8JPbVw8D/frogp+IWhbSolF1mur3 4IZXpTKKB45tmTzONR3ye4gZ1YKZqCt2HDEckIjnu+EiuZPs7qEVOL94XfUqAtOEsgSN Ud1q/2Jjdr5lMkE6h4sv62Dvd/n1EH1YB/oyjOB/To0NJW/pNHlaEKDIrpmt+HnHKYVI lc4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cz3s08IB; 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-57966-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57966-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCUXKTfWzU0db30MnhikPe3WOQ7xvfbvwr/zEKkqnpPd+bvk91e3m0eRHf/iHYMWpKn71Oc/OVKqwxM8ZDfi2i3f5YnhGw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f12-20020a05620a15ac00b007856110ba80si3121399qkk.426.2024.02.08.03.34.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 03:34:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57966-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cz3s08IB; 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-57966-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57966-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 04AB21C2135A for ; Thu, 8 Feb 2024 11:34:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B05D46F527; Thu, 8 Feb 2024 11:32:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cz3s08IB" 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 6C5B26F07B; Thu, 8 Feb 2024 11:32:20 +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=1707391941; cv=none; b=Oz9qBR0Jt2S9NyAtsGtb77bkF5+Mz7UgdXHrjOyghuikX6Inx4H21Pbmt1mcKwI8m4lRpH5vxFWC3MIgNgZAdoOGWxjVWMca6fCLoY45YbdzA941qr3mQgFwrHiimXHMRCU91ynsW4UgjAq5eRpOpfvS3cbOVJaZB5tkmetPHew= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707391941; c=relaxed/simple; bh=sTi/tiaFBfkZQc/Ou+a5JYj8AxQ1/vPEycCmaXjMqkA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DV2KlNB60Si+BFccSmdhkCysiL3t6g235xRUHAY3aBM7hm6TXvE5Vf8kW9Eb2rkhB1sMmXQrG9Nc0r/KdSkbv/52lcl6FFacrNo4phAjbkybp1hOb3LQkmu1FsTdnTp68mTa8T3j97arbfU3MhlKvQ9iDi03nJR+FZxzrzhXtHc= 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=cz3s08IB; 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=1707391941; x=1738927941; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sTi/tiaFBfkZQc/Ou+a5JYj8AxQ1/vPEycCmaXjMqkA=; b=cz3s08IBrsiK3vr3wJkYgxavD7R5mot7omcRz2xGXKFmyhIpTlGwksme CSI1ZTY5Jv3jLLd6BWMZ2FX+gTuORM54DVptLsSHvOqJZ2cEjBLnE+IUy 99oqw2xU3YzvgQoEkCmbfRWc6F+W8t5ZPvgNHDU0CQTKBt81Su2KpNgkf +LWjZ4e2F6lGdelL+cd9CbHMg68HRY79Ub19NmznLR+ZjiteJZKxpHzDX 2djqtSbGvpnZUCoDAa0AaydtooNPCtNboESW0jaX8V6j8GqsoqNFMCVtW orcdkjL2Gpw42G4txKCssIRhmyAK70y0NXbvMTuX17GQVqxUQNhHfjsHZ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10977"; a="1345636" X-IronPort-AV: E=Sophos;i="6.05,253,1701158400"; d="scan'208";a="1345636" 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:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,253,1701158400"; d="scan'208";a="1957585" 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:14 -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 06/12] perf tools: Add aux_start_paused, aux_pause and aux_resume Date: Thu, 8 Feb 2024 13:31:21 +0200 Message-Id: <20240208113127.22216-7-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790330329394633811 X-GMAIL-MSGID: 1790330329394633811 Add struct perf_event_attr members to support pause and resume of AUX area tracing. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers --- tools/include/uapi/linux/perf_event.h | 11 ++++++++++- tools/perf/util/perf_event_attr_fprintf.c | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index 3a64499b0f5d..0c557f0a17b3 100644 --- a/tools/include/uapi/linux/perf_event.h +++ b/tools/include/uapi/linux/perf_event.h @@ -511,7 +511,16 @@ struct perf_event_attr { __u16 sample_max_stack; __u16 __reserved_2; __u32 aux_sample_size; - __u32 __reserved_3; + + union { + __u32 aux_action; + struct { + __u32 aux_start_paused : 1, /* start AUX area tracing paused */ + aux_pause : 1, /* on overflow, pause AUX area tracing */ + aux_resume : 1, /* on overflow, resume AUX area tracing */ + __reserved_3 : 29; + }; + }; /* * User provided data if sigtrap=1, passed back to user via diff --git a/tools/perf/util/perf_event_attr_fprintf.c b/tools/perf/util/perf_event_attr_fprintf.c index 8f04d3b7f3ec..0e3cb35aab33 100644 --- a/tools/perf/util/perf_event_attr_fprintf.c +++ b/tools/perf/util/perf_event_attr_fprintf.c @@ -323,6 +323,9 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr, PRINT_ATTRf(sample_max_stack, p_unsigned); PRINT_ATTRf(aux_sample_size, p_unsigned); PRINT_ATTRf(sig_data, p_unsigned); + PRINT_ATTRf(aux_start_paused, p_unsigned); + PRINT_ATTRf(aux_pause, p_unsigned); + PRINT_ATTRf(aux_resume, p_unsigned); return ret; }