Message ID | 20240812204720.631678-11-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 7FA0CC3DA7F for <linux-arm-kernel@archiver.kernel.org>; Mon, 12 Aug 2024 20:53:41 +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=3DV11m8aSPlwhVbL5UDuJIqeFel/OEDD4+3PWN8l4CY=; b=PLrN91bIvNjTNUbgGHQSxgsb6u TkY470FjA7757Df/U6/Hyu077p889rdc3wuTzOeNOPZj/PnITGG1w81X+SngYoEcGHPBo88RL7lDb nYOKa1QzhnPJiMYfCij2IBS+Q9YqjGdFI/4abt+QPwxrnGOvdW4Fs917Pgg8Ig87h3+a7e+YZ1+1/ nMVg9WjvZ+3ciIGD3HrY3zCog4XyY0O8mYYEdlHPMIHCWblOXt9dWfVXpW/7j+MjraSi+1vZsqQWL /2naIZVWx9O7eIa77Iq3G+DcSHzhiWZGwQw3mtxjK1krO2ez2DWmJV5ISBmJb/4ASdTYDF5dcpIop QEAXIhdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdc2m-00000001WR2-0p5W; Mon, 12 Aug 2024 20:53:32 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdbxF-00000001UZ9-0Nmw for linux-arm-kernel@lists.infradead.org; Mon, 12 Aug 2024 20:47:50 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-6886cd07673so111800937b3.3 for <linux-arm-kernel@lists.infradead.org>; Mon, 12 Aug 2024 13:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1723495668; x=1724100468; 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=3DV11m8aSPlwhVbL5UDuJIqeFel/OEDD4+3PWN8l4CY=; b=4awzg/Ka60Nhq/LF9zs+i4gMlnX+s6F0MvRw5tgXFNnkfLufFTcHrU75RCtAYeLY5r lPvzet2yA2plegO/qQrxLoEHo1wJlG2WNwsHoGdxtwzZcFgDdVDBcK9YzJXNI2r6IpWR +iDfO1J0WAMX7YhFk19MgVJQsGtDpxdXgAYpc1fCqS9LxEbeoKMkEtsRm3mQA095fvoE IdqrW5+YaOmy+jfxT0mQFJ5+vLmO+tlL/BYzLQYTPbCgaEj/xVHf9tmWY0Ogyr9ZbPqj 65g0lO9g2Hww7BugPXmC437q1hu3NBx4APRtrdrjVsbj9j90p729s5M1KjnKIp6Lptm+ +2gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723495668; x=1724100468; 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=3DV11m8aSPlwhVbL5UDuJIqeFel/OEDD4+3PWN8l4CY=; b=pGXvf/ccE59zLm/T/84btFisWyhEreCtILVRiFdX32Yx0o7qSGVn3ZjPkobT3gRbU5 ovBO232BQYdIMuCWk+3OiUg+QnknoPsqLjAtH4Pev017ZO0PHoPUJ2kQRTwbhz3oTWOS ulWPQ5mUuBdDpFGNJ+We+j/kYET7TlZ/ykZDpF+90Mbow04aP6v5TS3JQ6BZbOt7wJwo ftn6DUdMQxgbGV7BjSwGObIargYGsiTIn7w42Xn1oanGY8Rd8iUK6KntCFeDwer9cru8 dCIbJ9GXApAuhe0q9yYN9l00dHZLrzy3E5ZcCjdS3qlDmQrhGWtvhYb3S5FMNDdKwwLi HKiQ== X-Forwarded-Encrypted: i=1; AJvYcCWlNeCJjGF8ZrF5CVSnqktudif3edx7cF6JEhyhb7TaMwO0zKcqE9I7Sl5zo2zX//lMBsiuB6mhqfqzXAWxH15AsVHga9TJ06IYuIrRc4X+LoWtyxs= X-Gm-Message-State: AOJu0YwRmS/YMmiv27uG2mHt7U5GL6SQ4woW7EF6hvBOTDDzG8CKFYOF xYQoFGdLZ6AtAGvvnLj7xn6CifGA927ZlscZTU3SOZqoq9EpMlQrEMJtiHZENm2YpDpN2NY1PfZ ToOm+eg== X-Google-Smtp-Source: AGHT+IFcMvZcg5ZEAFVSHmNQ3m5FSJyneWq44MKK+WXcjN+tqvmi661PGCnO5YGW6UXfSarvChqY24R3j8Qy X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:e7f1:b90:720c:35bf]) (user=irogers job=sendgmr) by 2002:a81:be08:0:b0:62d:a29:53a0 with SMTP id 00721157ae682-6a975f92448mr366107b3.7.1723495667983; Mon, 12 Aug 2024 13:47:47 -0700 (PDT) Date: Mon, 12 Aug 2024 13:47:02 -0700 In-Reply-To: <20240812204720.631678-1-irogers@google.com> Message-Id: <20240812204720.631678-11-irogers@google.com> Mime-Version: 1.0 References: <20240812204720.631678-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.76.ge559c4bf1a-goog Subject: [PATCH v7 10/27] 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-20240812_134749_164306_F22FB284 X-CRM114-Status: GOOD ( 15.57 ) 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(-)