From patchwork Tue Aug 13 13:23:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 13762041 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F293C52D7C for ; Tue, 13 Aug 2024 13:26:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5mUMDC/pIRcRlMc7URQ4bqWH4ou9rkjeyAIxTsLOjwA=; b=jtWo1EnSc0KIm60+DDsv9kWpdJ u1WFOZH6UAFJeW5vXU+YZYULj28Gw9FpPNRvqvkA+7q/YXxSHg+lLgSJVBFaNbDifzxrZa++ebndM apUznifgYlGdGUNNRDQRoWlbfSJ6hhW9vFJNToFMCn3MFka2cDVzxSPMt4yQaXDGLF5FJnQdCFvcq rU6OHTbdOfJUx/Gsk3i3A/Zd7GtV1v9yXkcrIKCQVYQCnNJ84C7hLtWg8Wly4W8Uf5YAZ6PwLbQ7N DK5Ah/K2/KffHYg9qmx+gZUzapiZZhdLDzJH17xAYRT5a6DolkbCOFycfcL8mw4hk/9hYfqKH/QsU eFMwuX+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdrXt-00000003ri9-06xJ; Tue, 13 Aug 2024 13:26:41 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdrWO-00000003rEV-3q9x for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Aug 2024 13:25:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=5mUMDC/pIRcRlMc7URQ4bqWH4ou9rkjeyAIxTsLOjwA=; b=qRqVwRWUa76Uh7I/ntoK7MKj0e 6MY1xp8lGrQoCHOCi+mnSuV0DJPG7zRNTDXU9mdsst+/uabS+mU2wmLNQdw4x19zEOXGRc+EkPT15 XYm34ykaFltpMw7fPDYBoFa1i7qODl6BOwKCHHKRR/GJlsgZQLtBR93xzzhASMe7Jxb9lZlzx9nyO Exdvaa0eqdPWUq6LIYcp2ld6/O8lRqnbQNNMOuUaM628qLMSbOzInDafCNeUZBo7mioOqzuHnCcOi vteTaRywVet5xD8Ia6iy3OMVckw0cLKfXBw8tkD0hfJu+btbA7W/grktKR7RicnqrSOODJDJL1Vvk eVMS9bCg==; Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdrWL-00000007nPz-3bsB for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2024 13:25:07 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-428e3129851so40531635e9.3 for ; Tue, 13 Aug 2024 06:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723555503; x=1724160303; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5mUMDC/pIRcRlMc7URQ4bqWH4ou9rkjeyAIxTsLOjwA=; b=rC2e2pI+45Nh88M/UcmzB+MUIWvNBZqh8RIFQyuROmuPWQB5lpD3UMnJgh43LC1q8T qBE2kJLSmL1L40DIb0p6EwalIzePdNF7dsXX73TySnbc8XFQTIJJ3b9bV+jDjt5Y5s5v bCRuIfzKHdolbVcL5vgg1dwXEUlblrZOF5ggj2bI2Y9lkILBIXeI4gL5DIL5OouZipXU 1X8DLZrAAgm/peUtNd1YxVU0ASX7KYcldItwNylcOJkHuDBHV/fJMSZsxvztXqEI7nxa rhech5aFN3Lu5j4pRZGv9Oxum5BV0dGg9COnmxfXdcHKMpSRrkDQl+9Ba0klCrc4VAal eMUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723555503; x=1724160303; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5mUMDC/pIRcRlMc7URQ4bqWH4ou9rkjeyAIxTsLOjwA=; b=Khbt1ZmMWp/Y3A2kHmIgabPUrqA4lyMVJpyAZExsb05aFxdRVwYTqMJT3s5nhAdLUe OjYLk1rKQpjA//ltl2a0tjbkocJY/XSDFfHdvOlOq2ZYbS6BetXu3IV6x7sQDrzFMtaH dHZENhQ3EZhLoeci5ji1fP1rQfoslo5bp/m3iXymJcn9WiUhouADemWFOVgKoxEvK3Va bNG9hIG0BiKz+yqPuNTjxQgFRkndFcPv+KhYvu6iQt1G5PK5ZW+fV0BawUZ6c1ijaH+d rCnPdrJYklsrX2XhcW2o1vu8b74KQRB4m0DFd6HCgOKbzV0W38TOCPETvA7duhywqknV 8sZQ== X-Forwarded-Encrypted: i=1; AJvYcCV+mzboGb2FWtyBJpA6zD4dOWTqJ+3kBUUQKkOzXfS3xksCQVKVWKU/Fg3nwZ3oAgeeLOJGG22V9Fpb5Q+SKjs5tf55Zoy1r2uYy/0Wr3FMYTy+8fM= X-Gm-Message-State: AOJu0YyXmCGeh+8EhaMms5YcM2z6gckUiaxWmGBfimX9pAfweS4jrNDE b7QW9PHtn9kWD81EJ9HplfJ0XjGmheXhEEaS/jz7WKjia4ntin0Q6Jd20oJyeM4= X-Google-Smtp-Source: AGHT+IGw1QWxHLTWtfvThNKdG+ceHa5O84W33fyasp2TM4dbvhwsCi+UKFDYqmXqt/QG5hQn4Fsr4g== X-Received: by 2002:a05:600c:1d2a:b0:426:6388:d59f with SMTP id 5b1f17b1804b1-429d47f4ac1mr26464035e9.1.1723555503354; Tue, 13 Aug 2024 06:25:03 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c738d21sm223186625e9.12.2024.08.13.06.25.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 06:25:02 -0700 (PDT) From: James Clark To: irogers@google.com, linux-perf-users@vger.kernel.org Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , Yang Jihong , Ze Gao , Dominique Martinet , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/7] perf stat: Remove unused default_null_attrs Date: Tue, 13 Aug 2024 14:23:10 +0100 Message-Id: <20240813132323.98728-3-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813132323.98728-1-james.clark@linaro.org> References: <20240813132323.98728-1-james.clark@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240813_142506_084187_2CA34EE8 X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org All current implementations of arch_evlist__add_default_attrs() do nothing if nr_attrs is 0. To avoid confusion that it's used, remove it. It appears that it used to be used as a mechanism to add topdown events, but this is now done separately. Signed-off-by: James Clark --- tools/perf/builtin-stat.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index a65f58f8783f..cf6a1923811b 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1930,7 +1930,6 @@ static int add_default_attributes(void) (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) }, }; - struct perf_event_attr default_null_attrs[] = {}; const char *pmu = parse_events_option_args.pmu_filter ?: "all"; /* Set attrs if no event is selected and !null_run: */ @@ -2072,10 +2071,6 @@ static int add_default_attributes(void) evlist__splice_list_tail(evsel_list, &metric_evlist->core.entries); evlist__delete(metric_evlist); } - - /* Platform specific attrs */ - if (evlist__add_default_attrs(evsel_list, default_null_attrs) < 0) - return -1; } /* Detailed events get appended to the event list: */