Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp392033lqt; Thu, 6 Jun 2024 06:52:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXrWejt8kTdIHF2OWeI3bnN8ISe5pZOPIDV+8Ur21n93lH59sPEfw0SUejeZCPvBIKgT6iNuKPV9Xjct4LX//T/mZMSAJi4KSLSXE29Vw== X-Google-Smtp-Source: AGHT+IFtVYNJf02RV8XaTX4sbEsSJUvfLhgcdP3zR2Iyt4Qz4AiFXlfNEhlB/LrBrcwBiJFPSOeS X-Received: by 2002:a05:6a00:1a93:b0:702:593a:89 with SMTP id d2e1a72fcca58-703e5a25399mr6120627b3a.34.1717681950383; Thu, 06 Jun 2024 06:52:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717681950; cv=pass; d=google.com; s=arc-20160816; b=BbovIEXX7isERnBn4AZqTY7Jd55PT89Od4aEtCOFwmu42iQZNQBm9NQ8I44dzfPZz9 U6yO3i6S+4pkz1ZgmgnIYm6nmZ7wseJbzgPgiAxluRdSUL/svKPEfIagqk7t4nWOYpKR G9cn2Jz2mSHL7m9ctCKFUx3AZwupld1QFsFNcpy1gNCbknWLYIjfSwSV1i0IizGCSUAr 7sXD2TFEsdaYHqRnto+MDws9t9COdnP5EHKFVJZ3PQsNn88EksrhCxRNkF5OPwee8wu3 D/Nr3HqMsZOqpQ85YZlqVe4HFp8DdUdNsSyBrMTIC8Ui/ug/boUFHld7n7kgsSz5IAm5 S1SQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=avVoXNo1se5UTER5uF2sXzW+ETCdh0/0tV+niZYNhJQ=; fh=UxFUyb6zTe9aesdy3mtpndMT9p0WYqA+FQgVlc0OslU=; b=lKRnpXppqnp0vMEfWZOqtCi/KnHuIqTgKpyYQYhQRw2f5qSoMV+lKfd5fyGJGxutcV 3tjukGm9eg7OGXWJv60vtLuoYl0M/IWOCbENdk1v1KuJBZFFg4JqPS0T9iehiwqQ6jMO lCDV5Fz4temFFS10GVf8nyc2l1/Gl4VBefJGR4aZnrcVR3lVHUu5mY1KClK8Lm89LdE2 Yuif34T6lc6F2hvRwem7/HVVecKo/k1Hls/WAWkVscl9WQj4/977u9VoR2sGCzikWxhk XkKlGhxA+oGtHfEA19CS2AEGDw5/1dDTvSRdF6vEiAXhYi9abt9Q7Th5HT9kmoie9p4M CZzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d1AU+LTI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204396-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204396-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 d2e1a72fcca58-703fd508671si1153338b3a.231.2024.06.06.06.52.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:52:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204396-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=@kernel.org header.s=k20201202 header.b=d1AU+LTI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204396-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204396-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 5A4E92839E7 for ; Thu, 6 Jun 2024 13:51:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE7CB196446; Thu, 6 Jun 2024 13:51:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d1AU+LTI" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 01E5E195F10; Thu, 6 Jun 2024 13:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717681887; cv=none; b=GuG6zmAjCaG4Ns2uiFdiVyxzEl0XfRhwiirrHI6ndkPlzgzjkOOO+5krkGBK/6tfHGcZKC94r2oC7Qqm6Q7v6/biLAxJd2pvD+aesbZWWmpMQokPqitB61+Gw05r3SNYv5ZTW5m6dGejIk3xS7blYYw/lqaCO0wK6QrIPnpmuWU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717681887; c=relaxed/simple; bh=gNK3dp5fn/H795o5UEgHg6VeYr3fgd5BNg14ucmQgQE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LzLP1GK8weH6+g28rhi9FrCJ5iAlZ3VmqchO6ZDliwTvxIBw4o8SoP41eR0oEOexot4SLvO3SSIqsfn/n8HBK/ucHFLIB4y4rsx9OwjOEMCFtpTsN19ZHGt6g8sw7HuDY2p/OAfIZ67w8pq+6y5+S9e3QpUimZ/FShRPY5H+yEM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d1AU+LTI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03FCFC2BD10; Thu, 6 Jun 2024 13:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717681886; bh=gNK3dp5fn/H795o5UEgHg6VeYr3fgd5BNg14ucmQgQE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d1AU+LTIBH/0dAG7ND7cckGhpsoCV34pPi3eW6gnxERxWaCKYcGH6rWkgPDgUeHgA pkRxHLfKUin8/eVQWLWcsMixNuhT3RaZ7L8I395lHN+AcWQSH2hZKIcEqAHnbo9K3T kqpNgN4lKlCv/VEwxTcckkOEYZCMq6TLWccgFAiQUA16bLW00g24j9rWoCA3Tc2hlm gFeQGEV9CxHRvKDSNTU8o/RNXtaBgAUyuKWbWyI6KjpXz4UX7KCwASwqsBHpPYrcrO MY7PwGJJAn8FvyUjm+lc+cUes6XoAfeTJY68tK84R75EytaflgrtZGJ9mUz0cZiWsO QhzeR3uYiwX5g== Date: Thu, 6 Jun 2024 10:51:23 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: Namhyung Kim , Ian Rogers , Leo Yan , Linus Torvalds , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , Dominique Martinet , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] perf evlist: Force adding default events only to core PMUs Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Jun 06, 2024 at 10:42:33AM +0100, James Clark wrote: > On 06/06/2024 08:09, Namhyung Kim wrote: > > On Wed, Jun 5, 2024 at 4:02 PM Ian Rogers wrote: > >> 2) Ignore failures, possibly hiding user errors. > >> I would prefer for (2) the errors were pr_err rather than pr_debug, > >> something the user can clean up by getting rid of warned about PMUs. > >> This will avoid hiding the error, but then on Neoverse cycles will > >> warn about the arm_dsu PMU's cycles event for exactly Linus' test > >> case. My understanding is that this is deemed a regression, hence > >> Arnaldo proposing pr_debug to hide it. > > Right, if we use pr_err() then users will complain. If we use > > pr_debug() then errors will be hidden silently. > I'm not sure if anyone would really complain about warnings for > attempting to open but not succeeding, as long as the event that they > really wanted is there. I'm imagining output like this: > $ perf record -e cycles -- ls > Warning: skipped arm_dsu/cycles/ event(s), recording on > armv8_pmuv3_0/cycles/, armv8_pmuv3_1/cycles/ > [ perf record: Woken up 1 times to write data ] > [ perf record: Captured and wrote 0.008 MB perf.data (30 samples) ] > You only really need to worry when no events can be opened, but > presumably that was a warning anyway. Agreed, while we don't find a way, old or new to autoritatively skip the event, when that pr_warning() gets turned into a pr_debug() so that people expecting that those skipped events were included get a message telling why they were not. > And in stat mode I wouldn't expect any warnings. Right. - Arnaldo