Message ID | 20240711180008.188906-12-irogers@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 27754C3DA45 for <linux-arm-kernel@archiver.kernel.org>; Thu, 11 Jul 2024 18:03:55 +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-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=h8vxN+BliJztZySzkr/g5CS+2PgB0g7RSTmLzIMrgEM=; b=S4NiwY1KqeOgNezojYiQRBBHM8 +mF3gVhT4Gd6dXrfXNG2JhB0wm+tkm9DUN6cwCKv0f0e2m9R7iEoYrTUOW29qdwJ6y0r02yZqwIda QWXJG/5CPjZxQOyWwOJyi3ez+SzJcu3MI8vgseB70B2dtWFm7Un823J+Z5GrQYSzjwxNL7PXqtSZU lll2vUObp0Petn7iEMYpNzhSXyWcx7BLaP61gTbxJA4yX/COfW4hiwUQVDVjvLFuLuukJAWA0K9sw ISatuqR8I6Viv718eHYDvgMSgW8mBf/RuhNumRrZgVkIdE9AovzqWYXAjUn3K4sK1MXZSMOEZ/VXb uknVuyFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRy8r-0000000ExfM-03Il; Thu, 11 Jul 2024 18:03:41 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRy5u-0000000EwES-2k0G for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2024 18:00:39 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e056166e0a6so1757964276.2 for <linux-arm-kernel@lists.infradead.org>; Thu, 11 Jul 2024 11:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1720720837; x=1721325637; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=h8vxN+BliJztZySzkr/g5CS+2PgB0g7RSTmLzIMrgEM=; b=wR54QtpssHt5eK6ldLWeo6JWctJIhVixV/Eq1gwK0BYpVD8hO+7ucCOmrfPkJtDoZv Hwcg8QDrRB4J/TPeEbswuGBXHVAyk0pS7NXdT3lnQwMfrwc3WdzQRokIluaBOBOJvtdV VyEN+NyjYeS2rJspfI/YybUGpjcc+rxUNW4DRPJ4LnBs4vHOYTNk1zZASSMzQAD3sItZ Fd9jxQS4IHnrCrwNClB7HLfg8n69NpyKAOhOzYbbkDoYk+Ub51ifP0VFP/bb14dakcad EBIlZT/24Rxr7NT2jPCys7K1WetvcB0hLWoaMacPeWpNiQg2B33h/tiYV5XsrOXkOJXW r0dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720720837; x=1721325637; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=h8vxN+BliJztZySzkr/g5CS+2PgB0g7RSTmLzIMrgEM=; b=duPiEua+oehhlHU+9rEF6iFwaAMSIw7qVIG9ItiDlc2q8YtEkyYFdRNyuMIUS7Tqf8 HbPF9s9/9p7jIW37AX1zx1tKST2+HXT9RYs7EL+gcZLZ/FetNP64/FJVqWCW1QDRisBj Ux7jCutku/qhQVyuWX2flvfwTIH0LlvVsLDeWqtUvGXHrUGdk41PbVE4pwhjnlwqIZEb Hv8XegG+IYPUkAD0JjRPOJBuzzGr5029OswPNFHyqCuN+r/y/TGBR8kqBQlgHh6hEUTA 0PkpXOf1BAxPWyjMLQBRReHUv35sQqUTI6llZkCvfHQ1IVKGu4GbZcU3qXT/hDDofvEZ JVZw== X-Forwarded-Encrypted: i=1; AJvYcCUK+LXKvkDgSw0WhTl5cDKQF8uTaqwFJcltFFa0pqe6C0jWL1Uh7CC8HSTM3NYtPkdrR37j5rYbZ12uSISP707+e+ugw4/6TVKxe99bSDTMpqW0Hjs= X-Gm-Message-State: AOJu0Yx3ljLFCepDTy875pJgwOrZF2Yi62uzCWVv5Th/CksubtHjxvDa e7eTGfk5ORJEa3sMFPWKBZ6XkZ/UMfdxZxmuNb0Vszksk5RTsg7HgwVh2YkVXz+Mwa5BA2SB2pZ aTMuUHQ== X-Google-Smtp-Source: AGHT+IHI3dipL7Tp3GQH7MxH3mucgQeoKyx/ymoTPxvLOSdOaV57AwCmKrqrRNCKs1TjxRfG+nIlfE0jSUsa X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:bd08:a1e0:c497:32db]) (user=irogers job=sendgmr) by 2002:a05:6902:2089:b0:e03:2bfe:40c9 with SMTP id 3f1490d57ef6-e041b032f48mr17980276.3.1720720837264; Thu, 11 Jul 2024 11:00:37 -0700 (PDT) Date: Thu, 11 Jul 2024 10:59:51 -0700 In-Reply-To: <20240711180008.188906-1-irogers@google.com> Message-Id: <20240711180008.188906-12-irogers@google.com> Mime-Version: 1.0 References: <20240711180008.188906-1-irogers@google.com> X-Mailer: git-send-email 2.45.2.993.g49e7a77208-goog Subject: [PATCH v4 11/28] perf evlist: Use perf_tool__init From: Ian Rogers <irogers@google.com> To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>, Adrian Hunter <adrian.hunter@intel.com>, Kan Liang <kan.liang@linux.intel.com>, John Garry <john.g.garry@oracle.com>, Will Deacon <will@kernel.org>, James Clark <james.clark@arm.com>, Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linux.dev>, Suzuki K Poulose <suzuki.poulose@arm.com>, Yicong Yang <yangyicong@hisilicon.com>, Jonathan Cameron <jonathan.cameron@huawei.com>, Nick Terrell <terrelln@fb.com>, Nick Desaulniers <ndesaulniers@google.com>, Oliver Upton <oliver.upton@linux.dev>, Anshuman Khandual <anshuman.khandual@arm.com>, Song Liu <song@kernel.org>, Ilkka Koskinen <ilkka@os.amperecomputing.com>, Athira Rajeev <atrajeev@linux.vnet.ibm.com>, Huacai Chen <chenhuacai@kernel.org>, Yanteng Si <siyanteng@loongson.cn>, Sun Haiyong <sunhaiyong@loongson.cn>, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240711_110038_721995_575B95A1 X-CRM114-Status: GOOD ( 14.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Constify tool pointers
|
expand
|
diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c index 7117656939e7..818ab21c3f73 100644 --- a/tools/perf/builtin-evlist.c +++ b/tools/perf/builtin-evlist.c @@ -35,13 +35,13 @@ static int __cmd_evlist(const char *file_name, struct perf_attr_details *details .mode = PERF_DATA_MODE_READ, .force = details->force, }; - struct perf_tool tool = { - /* only needed for pipe mode */ - .attr = perf_event__process_attr, - .feature = process_header_feature, - }; + struct perf_tool tool; bool has_tracepoint = false; + perf_tool__init(&tool, /*ordered_events=*/false); + /* only needed for pipe mode */ + tool.attr = perf_event__process_attr; + tool.feature = process_header_feature; session = perf_session__new(&data, &tool); if (IS_ERR(session)) return PTR_ERR(session);
Use perf_tool__init so that more uses of struct perf_tool can be const and not relying on perf_tool__fill_defaults. Signed-off-by: Ian Rogers <irogers@google.com> --- tools/perf/builtin-evlist.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)