Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4102551rdh; Tue, 28 Nov 2023 11:53:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKxE/TsY6SmlxcPqsWDFErs0kqohJi+iFVWwcQ40Jkjj86v/Lng5SPSwwEFgaD1DMkhXCt X-Received: by 2002:a17:903:492:b0:1cf:a2af:ee0e with SMTP id jj18-20020a170903049200b001cfa2afee0emr12919501plb.27.1701201193193; Tue, 28 Nov 2023 11:53:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701201193; cv=none; d=google.com; s=arc-20160816; b=wyMb4z+W3kja1nC4GasLhnk73BhpVuNG1EtYGZH22KHW5AIrfePUOOyDESu1hr8ou5 G5A9USpLop1pbE5RLAHfggl2SzBcZ5n8JPbT/HEpRFaBxBIFfEaAAnZNmYF/UgG+His0 aj8mVtq87IzPhfJVVWDpNyC1VH3ygVMxvfCi9VvFG8ZKnNJvzjv7SeoZcAk9JVcgPqxj uIh4FPAx2/+3yGpIb3wzmo59XnmfxHUHidYURmniSNr46iyiUF+VoEnafCHHfkhr393w DTXPPPPo36pQ3ru5uYJVH25aqSc9sNT2lUi8hqjiewE9AvJtWqW3rhZDnaYVCKm11/jI ZyLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=FJlmh/i6qVPUaDygU94gf+uv5HBKAGsVKHkcxOTWzPw=; fh=wbl9BHc+jvDLFe3m75ZdSde0TL6tY8njycujSoxVy70=; b=GmTPcuddsl4QDDDf7sXgfSYkKGWapYE7q6LW9JRWh9ykteqZl0HRq1ADRFSo9T6jbR JtxXERZA/izJlB2AaAt2eTszI2jDNKXdhVYYtFGVAeCyz4WJv0o9nI/Im7P9/BotqWxe nqXi90TfY8tVH7Ho73nIGcK3jvTbfrabodEws0+GfgEbng2ow4C2XtJ2juExJsUkA4SZ S3SfkhwUOzdMH93VV2NtPKLBIKMnOy6ZC+hoKxox4rrYUzY8pwHgmGvWdKXE00+YJqwz 3CXjwipsm3c5d+ylNWhMAsTgytXhkmdyz8TNIWIXLY6lykFjQ5PIFzK5y7BDehdz3ucY d+Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=D6WVDhZd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id u11-20020a170902e5cb00b001d0029879d0si1454215plf.407.2023.11.28.11.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 11:53:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=D6WVDhZd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 1235C807CB7F; Tue, 28 Nov 2023 11:53:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234756AbjK1Tw4 (ORCPT + 99 others); Tue, 28 Nov 2023 14:52:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbjK1Twz (ORCPT ); Tue, 28 Nov 2023 14:52:55 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 252CA10F0 for ; Tue, 28 Nov 2023 11:53:02 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40b35199f94so14685e9.0 for ; Tue, 28 Nov 2023 11:53:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701201180; x=1701805980; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FJlmh/i6qVPUaDygU94gf+uv5HBKAGsVKHkcxOTWzPw=; b=D6WVDhZdyFuWFsItxe+rLnU+/h7OL9ScLjV3QoLEJS2zl/W4YKUN6vNSxM48Obl032 BRpaGex874kNPRpSa7gLSOZ/xADTmAhyX/xkl9EXj94EKU3Hf7C81kMLl0P1ZKARfN3G OIfxN+NVNoApTKf5MZ7OOWewIuvc7TYlqQYVJs/0eCxmxVf3Tx9Qt5chvcEs2UlIFg0/ ugqQ9kvHVDy5RBFr1K8BPoE5pQsdSQTlZoRGDQj+qiCb7QDLC6AhVDNWh4sywh3Mjs+v NOFCMElwm8+cd8OB302ThXEOSE1+Q3JPYfhKkjM/Dp2ZvS212qpHxQuoXkpeCqnpzTAb FG0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701201180; x=1701805980; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FJlmh/i6qVPUaDygU94gf+uv5HBKAGsVKHkcxOTWzPw=; b=bsMGYo3NhNtOI/aq1PzeolW70WbjWAKgnppmtM8l42M9BHYtbPhoLqdqMZLK5DMDC6 qSCO58MmRwxlIvKmqeFzdbktuh91utizBQ+LAsE2PEkYb2WkbGY4S+yT3rgtawJGLb+u ilwSMJ2fl0epoIYsxCSLx6BGsaI9dMWVXGjADAvqmgDT499b41MAa533DKL6xjXxp86D LA5BfCPY1VzD6fKIwOg+tBdMj7IZFcH27/hVEPY+b48lTL27N4xUzvInyRr5wrPMr3IM vxvSM2xZWJafGjV7DinOgaVTy9IhnIMDMVchfMEA689exihzoRxfPEo65uxS7u0TfMbA ZFEQ== X-Gm-Message-State: AOJu0YxvHVb7FSHSOeCthIc1jS95fkI306v6ZQBXkV9J34roMKqUrXff dLaxHSjeRkdet19A0G3QBPq0+WzfXcxYaCzKkxnr7w== X-Received: by 2002:a05:600c:45cc:b0:40b:3d89:ba70 with SMTP id s12-20020a05600c45cc00b0040b3d89ba70mr504824wmo.7.1701201180449; Tue, 28 Nov 2023 11:53:00 -0800 (PST) MIME-Version: 1.0 References: <20231123121851.10826-1-adrian.hunter@intel.com> In-Reply-To: <20231123121851.10826-1-adrian.hunter@intel.com> From: Ian Rogers Date: Tue, 28 Nov 2023 11:52:49 -0800 Message-ID: Subject: Re: [PATCH RFC 0/3] perf/core: Add ability for an event to "pause" or "resume" AUX area tracing To: Adrian Hunter Cc: Peter Zijlstra , 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 , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 28 Nov 2023 11:53:11 -0800 (PST) On Thu, Nov 23, 2023 at 4:19=E2=80=AFAM Adrian Hunter wrote: > > Hi > > Hardware traces, such as instruction traces, can produce a vast amount of > trace data, so being able to reduce tracing to more specific circumstance= s > can be useful. > > The ability to pause or resume tracing when another event happens, can do > that. > > These patches add such a facilty and show how it would work for Intel > Processor Trace. > > Maintainers of other AUX area tracing implementations are requested to > consider if this is something they might employ and then whether or not > the ABI would work for them. > > Changes to perf tools are not fleshed out yet. This looks good to me but the perf tools parsing changes I'm not sure on. It would be nice to have a test case, likely a shell test or change to the intel-pt shell test, to show how they work. Thanks, Ian > Adrian Hunter (3): > perf/core: Add aux_pause, aux_resume, aux_start_paused > perf/x86/intel/pt: Add support for pause_resume() > perf tools: Add support for AUX area pause_resume() > > arch/x86/events/intel/pt.c | 12 ++++++ > include/linux/perf_event.h | 9 +++++ > include/uapi/linux/perf_event.h | 13 ++++++- > kernel/events/core.c | 65 +++++++++++++++++++++++++= ++++-- > kernel/events/internal.h | 1 + > tools/include/uapi/linux/perf_event.h | 13 ++++++- > tools/perf/util/auxtrace.c | 4 ++ > tools/perf/util/evsel.c | 9 +++++ > tools/perf/util/evsel_config.h | 6 +++ > tools/perf/util/parse-events.c | 33 ++++++++++++++++ > tools/perf/util/parse-events.h | 3 ++ > tools/perf/util/parse-events.l | 3 ++ > tools/perf/util/perf_event_attr_fprintf.c | 3 ++ > 13 files changed, 167 insertions(+), 7 deletions(-) > > > Regards > Adrian