Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1783378rdb; Wed, 31 Jan 2024 08:57:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEerYOHEozRseiF596Xa16EXBVaphbhFLXUwjvgw5hQM7ugpU4PGJUJarItAbXgtAH/uNQh X-Received: by 2002:a25:b53:0:b0:dbd:c2cb:1d00 with SMTP id 80-20020a250b53000000b00dbdc2cb1d00mr2386212ybl.6.1706720238727; Wed, 31 Jan 2024 08:57:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706720238; cv=pass; d=google.com; s=arc-20160816; b=XdE3UGnTZ0gviE5v7jOy/vjci70IT6KqH6zSi0uWS2Isir4slRG52b8+gob6uWDKqy vM01Eu40HDE4xd1P7hGP7EL8AdO/CQ76tEEbVAD463oGN+Mdl73R8t7b65fqYhRVlCI4 XnisWXrwshQI6KhQXRkQLVL2NDPW4pN9xwSRJ2AVV66n5VnJp2YvjIoObZ/p7KEI4z99 8cgEtvZCCF0gOXl/MwRA296E3vZ0sa+GRjT4a8bRITBwBVLRCQnnen4APvp4hn1IzgKJ CwHcKE8Gt4MTlxnRjKPoO4PmHYxcFDnotnInN3qKAcAvETabovWIzaRPE+fN1K6hcL8l TVnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=EvpSV43rWUbyYM7/B2V4hGiTICXwiFlKZ/puS1sh6dc=; fh=wAZCj88cFU3poGCBMx0EP8IkmSnDHpFOi9jzfHVjqDI=; b=GA+QgzVhIJrSkRl9R7G8blC6cOjqfxd8TElJunrXbtNUOV3hidFWmqrdH5JHFDwbmN sjXd7avtbAfLj9azO9ZHC6XC0FphvjrpDi/qxfky/Y7FgdEFtYlxQOputOGhzatDrenh eYKD6HmqdpB7rDyPPkGfXaeNzHb5NLHss7QrbAYKX2qP1L/SX8yaQdeEGDNUOo+qrEAZ KOBd5Tubjkw07gJlaGf/C09C/HcybGZUvrKCPQp//5NRRXKlfnZ2Xw5K/ur9NMmKUeWB MI/iG4G2xwkSEigJ1eABjZm8c3blFjcYEXLowAxpScYmcB0aHqau/HHRX3+pAneGzL1G hPZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=YJDU9pwu; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-46843-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=1; AJvYcCUI9HGM9ctIVUtpLTCzQUiHwLrKPAYXhgtMLcokA8be5zUYeSJayblAHAUvs/nl3uzrT0bPw1TxyTtYPWxHEgJ8DRiLnIuS+S0+K8DwHA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o10-20020ad45c8a000000b0068c67a0fc45si2476450qvh.572.2024.01.31.08.57.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 08:57:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46843-linux.lists.archive=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=@google.com header.s=20230601 header.b=YJDU9pwu; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-46843-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 47CCE1C22044 for ; Wed, 31 Jan 2024 16:56:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90A7B12FF6F; Wed, 31 Jan 2024 16:53:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="YJDU9pwu" Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33C7412CD8E for ; Wed, 31 Jan 2024 16:53:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706720000; cv=none; b=NznYkAQsXN1MpSlgNNd8DTUhycDnXtLuYjmyn2nHhjAn2Z/Eazplx8nlTL5TrAYhBUz/pAJAFnTV3cyby/UhvGV+wi+2V2VbVFMt1zRLKG5OPyFD7e1onfzzfSFYP//nwuph2T3f0fnh3HXGVj7s10VSQHZ27Jit81mqKxJv/oY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706720000; c=relaxed/simple; bh=5ywzRswissfPoaz3gVx2xuLLVjU6sVIFulHNw/8BM30=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=pbsIqqmeX3+5kSr4H9n6geshhLwZckMUFiaWfdZlR4NTvrknUWvVjOhQ2SffnlBsEGvMQU7H29TTC6Ulfkvjhg18QzmG4Nn5BgmNO4Rmb9CdzyvtLW3x5CQ7MNYqC0tXNCg+HtUboZ2KWdW8G19dVP/dSYtErbPiafeGv3VA+qw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=YJDU9pwu; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1d89f0ab02bso118495ad.1 for ; Wed, 31 Jan 2024 08:53:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706719998; x=1707324798; 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=EvpSV43rWUbyYM7/B2V4hGiTICXwiFlKZ/puS1sh6dc=; b=YJDU9pwuhBv9fzzd6/ZXDVfVEOccQ3NwQKPoCvM+Fie7C8U62APFXMK0qhSTZ0kbE4 Hqh2ZRK70ZAbqKembA9bWZuVyoeuZ1wghMAoZVV3LbHQPdNCH2q/ik7VT+DiMjHFqv8D xYgt7P1buGOVFRGG9GUQ6+kVx4k4canRCoVq5mu72LVbK4w+1Jjxnno5PDU7aRFm6itG FPJYhJ63JZ/dGh4DMWadivwU/5YKQy2996yo8QeFb7nmKeEjDBC63AGveQ6+DsZ72XjK vYJmrX2sRV2wGuathPpzWwxFyZk58TdIFJASUccPkKqjfUedevMF2bynHdOEVSUMTwMq gwfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706719998; x=1707324798; 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=EvpSV43rWUbyYM7/B2V4hGiTICXwiFlKZ/puS1sh6dc=; b=MAObkFVtZvQGR5f6wZdMrtTFE8tbLiMaXAlf6AEx9Gszcnyl7wf1YtkktxNgNjR4eG gzsEEtBcR7qSXMMFY+kffkVF1nyzoxC66t1K1fDZbeZHxmsbN8EwXaeYW+hTfno7DTmh 6EWLbaXgdew58PFlmYcDh4IqVabuS5G5iMK8xMf/nfc798gXw+dLVMyRuwPjbsQRGyzd lsTapi7CwZPyfINlwodbo8fwStAy+q9X/e7fvwk13dftFAJdQ9uNOzrkeNdTmRWaCCki //FcmtgjYq+Di9cYmcSAWp+DewxxUxMg38phMP6ZbfxNEMxiTgdBGOfcR2skmCP7hzLT S3gQ== X-Gm-Message-State: AOJu0YzoF9jWxgjLkHbFmhgZTIR3QUNWiSsgXwN2K3uFZRMKFgylQgsN Kc7zx1Mh1l9Zby/SJp6qWuht/5HzKonqJ7VoOOzHLI27rUoxbiinsaUIZ90D59W8H56sHqxt2JO lBZ1eHcSbCUP3yHHMiLSKY9yMWiYpPUhzOEt5 X-Received: by 2002:a17:902:f54a:b0:1d4:ca8c:aa6d with SMTP id h10-20020a170902f54a00b001d4ca8caa6dmr584364plf.0.1706719998205; Wed, 31 Jan 2024 08:53:18 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240111081914.3123-1-adrian.hunter@intel.com> <31bae596-ecb1-4b9c-9f1c-aaec4bcefd38@intel.com> In-Reply-To: <31bae596-ecb1-4b9c-9f1c-aaec4bcefd38@intel.com> From: Ian Rogers Date: Wed, 31 Jan 2024 08:53:06 -0800 Message-ID: Subject: Re: [PATCH V4 00/11] 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 On Mon, Jan 29, 2024 at 4:49=E2=80=AFAM Adrian Hunter wrote: > > On 11/01/24 10:19, 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 circumstan= ces > > 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 now (since V4) fleshed out. > > > > > > Changes in V4: > > > > perf/core: Add aux_pause, aux_resume, aux_start_paused > > Rename aux_output_cfg -> aux_action > > Reorder aux_action bits from: > > aux_pause, aux_resume, aux_start_paused > > to: > > aux_start_paused, aux_pause, aux_resume > > Fix aux_action bits __u64 -> __u32 > > > > coresight: Have a stab at support for pause / resume > > Dropped > > > > perf tools > > All new patches > > > > Changes in RFC V3: > > > > coresight: Have a stab at support for pause / resume > > 'mode' -> 'flags' so it at least compiles > > > > Changes in RFC V2: > > > > Use ->stop() / ->start() instead of ->pause_resume() > > Move aux_start_paused bit into aux_output_cfg > > Tighten up when Intel PT pause / resume is allowed > > Add an example of how it might work for CoreSight > > Any more comments? I think the tools side looks good. The parsing changes match the existing style. I wonder if it wouldn't be better to handle the valid strings (pause, resume, etc.) in the lexer rather than a separate parse function, but the pattern used matches the existing one. You can have my Acked-by on the tools changes, although the subtleties of ARM PMUs makes me somewhat nervous in this regard. Thanks, Ian