From patchwork Mon Oct 14 10:51:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 835283 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 84CCB19CC0D; Mon, 14 Oct 2024 10:53:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728903195; cv=none; b=NhHaXKneQNSBG/PIvecoRKK24EvTnIAm57irYK/ZclQuzhHH3LVCskgy98DMy+ivrJEBEytQUEjeEab7sQpgvuvDoD5S8oi0NzfZJLJhKfZ/YtgnPMuKpcy2N/2itFhTK4H03F9vVNux4cb62CnhHCQQiknMaMheTUMOxSCMxA8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728903195; c=relaxed/simple; bh=qSLmULyuQLTlYMQgi0y7aT2AgtmJ5HDHawdb49crJfs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aZJsPKavv2VWTpmm1bBgNPQnJE+RCFNcRnbZMMC161nIZ607vVW8w9uZXKMS3p0BSTcXMr3X/9ckM2QBQTUXMa9wClJfJR0V9zeSVpXovlFJ5tORcGyHNml0XZZBqOuS3aGIQQ9PSoRPyVAHDaOAE5zWmgPFUYrzSFve2pfbgbw= 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=Ub1bwV9U; arc=none smtp.client-ip=198.175.65.13 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Ub1bwV9U" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728903193; x=1760439193; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qSLmULyuQLTlYMQgi0y7aT2AgtmJ5HDHawdb49crJfs=; b=Ub1bwV9UEVTmetGGyicnPIVF1YObPR88zA5KZB5jFtwZPrwLWNT9MyO0 9IurtAY/pVOLWe58rIHZLoHSjFVmHMyfxG0AkHaKxcUmNfIvb/DQoyS3f MrT2Q9qToIIgYtAFDbmy66PxAC80aa9Ti0A1jhEWF4SxADz6ajSAUztFc HY00oRfYtWeKO+6sTnLp2Jc9SeUCLXuQBYcHWmQxLV6BrfLaN5sGWejY2 bSLIVqIcHmGeXiRGFEus4unetF5rCqWqCNeJCgPv3JwUHE3X2x/a/or3l vEBvxeOWThVlB4P1wFsobatU2LHtx2UQD3404nj25YIQMNh8BBc+BoTC7 A==; X-CSE-ConnectionGUID: Kx5SBve2RLuy7kRWYPFlYw== X-CSE-MsgGUID: rnQ7t77oRyu4Z1goYjtNFw== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="39366274" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="39366274" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2024 03:53:12 -0700 X-CSE-ConnectionGUID: liJcI60AQ3SVOvFOa8tHrg== X-CSE-MsgGUID: ofepzCYNSkqrFtyhPzaO1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,202,1725346800"; d="scan'208";a="77727501" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.245.115.59]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2024 03:53:02 -0700 From: Adrian Hunter To: Peter Zijlstra , Sean Christopherson , Paolo Bonzini 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 , Thomas Gleixner , Borislav Petkov , Dave Hansen , x86@kernel.org, H Peter Anvin , Kan Liang , Zhenyu Wang , mizhang@google.com, kvm@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH V13 08/14] perf tools: Add aux_start_paused, aux_pause and aux_resume Date: Mon, 14 Oct 2024 13:51:18 +0300 Message-ID: <20241014105124.24473-9-adrian.hunter@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241014105124.24473-1-adrian.hunter@intel.com> References: <20241014105124.24473-1-adrian.hunter@intel.com> Precedence: bulk X-Mailing-List: linux-kselftest@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 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 4842c36fdf80..0524d541d4e3 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; }