Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp204165lqb; Tue, 28 May 2024 13:00:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVz3iNPHZwixvIMrTC9qIiQ/JTZ0aPiZm/ooweK8JM++GcmAylxBJYn6QERV1HISp5pyyBvNFaay8rMs7ywvRgUpoDnyHtU26m0I7Qulg== X-Google-Smtp-Source: AGHT+IFZwNDWAkFyFzEm3osxnXnpAWlG+W7mx4l6BgSCoTA1zOBvPOG8oXbaWvlWPbkeUGeLLFpp X-Received: by 2002:a05:6a00:1d1f:b0:6ea:bdbc:614 with SMTP id d2e1a72fcca58-6f8f34bcd7fmr13601778b3a.13.1716926442633; Tue, 28 May 2024 13:00:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716926442; cv=pass; d=google.com; s=arc-20160816; b=sfjnKYmLK0VNsUoSIo7qG7hSMgjxa0P6fvOao88BJqUOP8qjTsS6ambBYUu3GN0hPc G1u72RBqJ0VgmMGGzfRMfGKUZUIguX40EKhnMxG6aLIsDOCSAZs4Rm2bNr53em+3nwt/ 9s+DYwwoV0Z1xjMP+jdaWdKSn+6IH2LZi3JDqm32XYa4Mv24jSnkngbHnZpqA+awUM7m 7BVM7uLg6IAFBB1Y19MoEhbkWB561LqtZtTK57XrTpW/CB6e2YRLvfqsR8uLS0P8MDA7 MHYaexVtI5BH+yVXjdzdVNONsdKltSYv2KkFXhMFjKi+VzJW/1vDmmVLHrtubmyt0Clg cKIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=dEtRoS1f3BiXfOOkD6/RyfWg8b94KE276J+eEUHXYvQ=; fh=SZArfi/XWkNKUM2t4Uf0cBgFzFxEmmiIF2L0LqntFyE=; b=q4u6L73IZLmofRDgUUg2lieAE3UAdq2QRENAFwK2JWtdJmM36Hy5+WKDSCCb4H4jWK 5AwvsdOUA3DyVfdX1i+Ot35jjcqQiEVCCJ4tSgl4G7nLrX5V7KDX5tUpYz56hriX6B8Z o/fh9xUgZH3pG3275gmYdrpEeJGsWZ8WNGKqtCgH075Zg1WCrIHUxRrR7t56AHkDXKC3 O+MeGVgO+9QY2AwoLVK8BDRWuYLcjB4mdkPQHHSGILmV/HS7qAubTi1+5lC/l6qIdoxN mmWfPf1L4Ou615UDGVqGVbV69lnqTdz79OzzUAojqitALz7f4Yr4ufgOuUUf4ZHjqFPR NUfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=cruORaZp; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-192991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192991-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6822ae56c27si8725006a12.804.2024.05.28.13.00.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 13:00:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=cruORaZp; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-192991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192991-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B0C73290D4F for ; Tue, 28 May 2024 20:00:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F50917838B; Tue, 28 May 2024 20:00:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="cruORaZp" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 9B35551012 for ; Tue, 28 May 2024 20:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716926433; cv=none; b=KZCb1UGn66zlv4qWZA8Ex7iM1bJmNTalGlsMU9JI1z31EyJlJGrp/eVOTNrXsPUAdSZowaBekMqLp6LoLQyP8db7uMywcppbtNOxiU9hugFpzu55ngxX94YbzV2qHvf3g9zydrRbfxb5iB/dmmucz1qv53ru5DceeYMECUU5a8A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716926433; c=relaxed/simple; bh=8YWp68qxwuKrMQMapx0pKX2xFIRrKqbrwhPkeTh8yQQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=enREGNtX851CMDfP7jDxe1w0Okz1OesMcWpgF+Hi6NUNOhbRJMTT1HzxCAqQHoXYTfr59aD16UAzXKkmZDLp0Zm9MK8JitxnCsg8h2JEKi5luNlNd3qjvFmS1+MZt7C67zCqtYIGHPlyVyOM9Z/8kj8btuWWsZAQDeDfvhjCExg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=cruORaZp; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a626776cc50so142334166b.3 for ; Tue, 28 May 2024 13:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1716926430; x=1717531230; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dEtRoS1f3BiXfOOkD6/RyfWg8b94KE276J+eEUHXYvQ=; b=cruORaZp1fEO6fHUqPBS/o+IA89Ds76muFezCuPcc1yD32X4wURefx7j2UslKpxIuM E8ZHy+eRdPb8qiPDndDVgKbBWxU/8v9yeN3ti2vUqk8XX/B3r3cyDYKePjo4m0/iGSDm 9Nn6NncLu2zlDqy6RohIo84rh/TEiD0FCvBzM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716926430; x=1717531230; h=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=dEtRoS1f3BiXfOOkD6/RyfWg8b94KE276J+eEUHXYvQ=; b=tXDs/hRszqemS73BbXRdK/Wn7nYibWQt1g+mqXsxWCyji4ZjQolF4kFptV0q8+nlle eqbQxhwpx1zRxNMJh/eI6/SwigN1QGUSmVIqg2N6U04tLGm9o81k5SxPBagCALOWJtr5 qNm4DZXuqnVs/YhgtWqUbmk6PBZ/qEFTpE0CSnHc0N+FdfXZl0FMENbVmA5LSEAOISIc R9FG+i+7QPObtuG8karQD9aL7uDC5EkdEQe1wLheEeQIKyCVeD1e6PSqw000CMJr9PZl AlI035dZVN4yic/KEtHC+P3kVWS9V3yr+HZCstIclN15lwF5rPiOMWFYKEzX9pzJKn24 hBXA== X-Forwarded-Encrypted: i=1; AJvYcCVP8BbVJpHD9KRjaxk+4knvBnp43Za9mTpXqYCaMig8iuKgr9Z32biYCT7iE+UhHku53ZcG3DDiwr82klMs5mHZhstqlh4LUlyqHota X-Gm-Message-State: AOJu0Yzojba80RvuS3eFkx3tGHz0sNwL/7ylsZNE118RF0rP2oh2l0hd byZzBCNo3VUS9B0rgPQCnuamCF/DyymHN8lkJHZpAImCPBY0xGB+FJXDA+oi3l3YA0EcX3xFFks SB5GfnA== X-Received: by 2002:a17:907:7743:b0:a59:aff8:c713 with SMTP id a640c23a62f3a-a62641a69a5mr790388766b.10.1716926429788; Tue, 28 May 2024 13:00:29 -0700 (PDT) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com. [209.85.208.48]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cc523d1sm640917666b.134.2024.05.28.13.00.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 May 2024 13:00:29 -0700 (PDT) Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5785c1e7448so1285759a12.2 for ; Tue, 28 May 2024 13:00:29 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVnAC+O9qmY4S1UalwZaKaT21ErCy+bqFFvtDJ1lkSWMVwS4HF6yrHcq/Z+RJNXY7KdU5/UvuqnZJSd1vulYro4VGox/Y54Q66vbYQ9 X-Received: by 2002:a17:906:c088:b0:a59:db0f:6bd7 with SMTP id a640c23a62f3a-a6265116365mr793210666b.71.1716926428911; Tue, 28 May 2024 13:00:28 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240525152927.665498-1-irogers@google.com> <20240527105842.GB33806@debian-dev> In-Reply-To: From: Linus Torvalds Date: Tue, 28 May 2024 13:00:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1] perf evlist: Force adding default events only to core PMUs To: Arnaldo Carvalho de Melo Cc: Ian Rogers , Leo Yan , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , James Clark , Dominique Martinet , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Tue, 28 May 2024 at 12:44, Arnaldo Carvalho de Melo wrote: > > For 'perf record' we're asking for sampling, if the event has the name > specified and can't be sampled, skip it, warn the user and even so > only if verbose mode is asked, something like: Yes. I think that's the right rule in general. However, the more I have looked at this case, the more I am also convinced that "cycles" as a name is special. It's literally documented to be an alias for cpu-cycles, both in examples and in "perf list" output, and that's what the usage is. So even if you were to have some other PMU in the system that had a "cycles" thing, if it's not a core event but some other cycles ("uncore", bus cycles, bicycles, whatever), it shouldn't be used even if it could be used for profiling. You'd have to use the full PMU name and actually list it out if you want to use a non-core counter named "cycles". And yes, we even have some documentation that says exactly that: "e.g usage:: perf stat -a -e arm_dsu_0/cycles/" So this isn't even anything new or ambiguous. This is just how things *ARE*, and absolutely have to be. Linus