From patchwork Fri May 31 05:57:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13681155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71490C27C44 for ; Fri, 31 May 2024 05:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=igxkH215Fol2Qj+JrN4d8bUJ+U1OA56qc5/wJNo1V2A=; b=RWrLY3+OdY5hMc gM52hmbw3zEjwcnrlIWQfCeST+868fZgvV2kvrVJBaYh+KfY3lZrbWxQbqfpbMmD4/4G5A9Ob4drf KMLLT415yC5yAElvg2Q75TCcx7+3tp0zFBk8IfTh7P24RCy1Rg9s9/kvOYlzj4hnDYA+4BH1Q62zQ BHEUhTbGlAwzNyzqOf3CRjJsKkJuL7IbWeqz77yWQpxYMHIb5HYCt5nK7yJ988zpetUCnLQ2tYuzX +jo6UfIRZZtojtjhto0NqEplNoo2BU71F4HjSyW+e9pEpyyXzuS09/0ZaSI7PYPJO1PQk82nZyNmC q0f0c83ef72XY54VWipw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCvHo-00000009K6U-3xVV; Fri, 31 May 2024 05:58:44 +0000 Received: from mgamail.intel.com ([192.198.163.10]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCvHX-00000009Js5-16Bz for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2024 05:58:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717135107; x=1748671107; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vc4onBiyA081mqZ+u8spT9LVIyOZyH6KyTqbDavfdDU=; b=IHJBf1Xp27CeShrhUOkv2py3SE3qiUAkGFDSa04ZEgcZHjnXXvKvaD4a O006wM1y3PCHxzrjkRv0XtJg3thDzP3kHu8Bdd0HnjjtvwplmU3UqpxYF E+tME2eoNPc4HN8tgE/BVsEX2nC0iwo7rmDJIgSopDDfrauslVDdzJQKq kMhwt8+DTPCq5joW7C0qPHmE8HrJV2R9UI2SOqpYT+iWOfUA+Jq+xeZwf ncK8O6iQ9ZV0HJV+5kWBBRbx+6TJPdqh5fvMTnSf7W7NoBi49leF0hO2A 86Wysn++o4nwAKJpNjflZiGzHz6czKqrYGq48qJlACwPGrdT1cscMjecl w==; X-CSE-ConnectionGUID: nlHbfafBQLC00WkoA1dYWw== X-CSE-MsgGUID: 6BEeW1EcTWmSM3b44Ts17g== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="25068235" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="25068235" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 22:58:23 -0700 X-CSE-ConnectionGUID: 4Lo1yoUgQ76+2TZnAwteTw== X-CSE-MsgGUID: ZyuBHiWTQoaHUOL4nyDgUA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="40510928" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.246.41.28]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 22:58:19 -0700 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 V7 06/12] perf tools: Add aux_start_paused, aux_pause and aux_resume Date: Fri, 31 May 2024 08:57:25 +0300 Message-Id: <20240531055731.12541-7-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531055731.12541-1-adrian.hunter@intel.com> References: <20240531055731.12541-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240530_225827_672008_2285C79A X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add struct perf_event_attr members to support pause and resume of AUX area tracing. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Reviewed-by: Andi Kleen --- 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 59fbbba79697..29db0aef9a74 100644 --- a/tools/perf/util/perf_event_attr_fprintf.c +++ b/tools/perf/util/perf_event_attr_fprintf.c @@ -335,6 +335,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; }