From patchwork Thu Jan 11 08:19:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 187222 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1301634dyi; Thu, 11 Jan 2024 00:21:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGO/vNYD0zvOqOiLyliGQ3jSnfysvjMWoc6a8mBonWa7TyWpX7rcfCGHZTfttqbUshZspOe X-Received: by 2002:a25:8701:0:b0:dbf:c71:828 with SMTP id a1-20020a258701000000b00dbf0c710828mr693946ybl.122.1704961268460; Thu, 11 Jan 2024 00:21:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704961268; cv=none; d=google.com; s=arc-20160816; b=eqg+cOY6PHWwni7KvL6khQKtS+eyaTsa0qad+6vICtFG3C3H9d25qRKWFbmBJJ0hcm ifhk1t/zA9629VTVvGIGwgcj0SaICWfOKCepaetRskZF2aciRq+0XKW8uKA90FE2D+oO 3UXRi/EfZ0FJUZxkB752LjC7jeX+liriGSx4zkNhCm/MOQBN/XpdGiLlfaejCyoskg+C I6u8U08sTesy/gKTO88qdWbdgz6jnaJ7mfWgY6TNiry4jsV+tD3WTGW995aeWGGOoxVg 8LGlqs/M7BSuUjNg9De983sE2syejguW4EFfE8PcODMcGJNyku5iMZPVzNpzazOga+0s rU8Q== ARC-Message-Signature: i=1; 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=yybtMrJmzKMKdcfhoGOk/5bi7GMTlA4fsVv0hEfQ5RA=; fh=cd6f3jNh3j7Qvd5mXmd/oCoIQnwAYeKd0j29JiSirLE=; b=b9FUDOPAVFnZpI/WAO9yMVA7o003EpYC3Y0guYInCtPe5jPBAAJ51Q7x/RKxMxU1QH 3zLLCfLC4vUhQHM2FaDhI2TIdVx5RuV1tK3vIzuLE0aiAoWlnhiET7zHXubyVYdGvsHm oy4UdTT28DZyulvUZE6J2PTRVcF37LvzK+ye6QJvXSHJVyOl+W5FtZbOyGQpBYIwq0yt TZg6QLoA0kmPFDW7E0jvCD5aGeBHcM5+jGWmmM4fuTwQ0OSlbzdxiHnW1H5pK22STefv sEmywrY187v3SJiOWcg/W1kf4rL40cWbQt8MiJAF75tj14kLzAQZrgDSrNzfGS3aS5eC VRQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PpWx2bBV; spf=pass (google.com: domain of linux-kernel+bounces-23204-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23204-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y14-20020a05622a120e00b00429c5cf9178si358685qtx.41.2024.01.11.00.21.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 00:21:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23204-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=PpWx2bBV; spf=pass (google.com: domain of linux-kernel+bounces-23204-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23204-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 437F31C221C4 for ; Thu, 11 Jan 2024 08:21:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8C22101EE; Thu, 11 Jan 2024 08:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PpWx2bBV" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (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 DFA56FBF6; Thu, 11 Jan 2024 08:19:55 +0000 (UTC) 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=1704961195; x=1736497195; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=U0uDughyUb2zbF3KZKwRA65PNmghWD9wR89tZmHO4oc=; b=PpWx2bBVralgg53A5m9A0i9+mFKfeOFbHBNrBKRBf3OxDQAHhLZthp/6 OT3y3tDWQU7hnndoRkDl+ikdpS/cy77k2MT3PWtIum0a4v9oDEUb3H0Wt 6HZ1xiTDOF0VVEkUoZ+hamin+VkA4gSiU3qb9f6kYnXLBrJ/arGhFerzS bTSIOtFGZMpm/Qe4lYLqjYXFQp45tAKPwsi9e061Q7pn56dP+wX6CJaMz IGu50WWVxIy2nCsPzlGLcKxgbjPE2O5rZHJulymjJt58v14r5xaTsoHJi 3G/YD2qtL+H3/gCEDbL4pvDhGDPJwSGd74RCILbDwFHdIpt4tMsp3tWXn g==; X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="465166457" X-IronPort-AV: E=Sophos;i="6.04,185,1695711600"; d="scan'208";a="465166457" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 00:19:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="925923058" X-IronPort-AV: E=Sophos;i="6.04,185,1695711600"; d="scan'208";a="925923058" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.52.224]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 00:19: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 , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH V4 05/11] perf tools: Add aux_start_paused, aux_pause and aux_resume Date: Thu, 11 Jan 2024 10:19:08 +0200 Message-Id: <20240111081914.3123-6-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240111081914.3123-1-adrian.hunter@intel.com> References: <20240111081914.3123-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: 1787781466922789940 X-GMAIL-MSGID: 1787781466922789940 Add struct perf_event_attr members to support pause and resume of AUX area tracing. Signed-off-by: Adrian Hunter --- 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; }