Message ID | 20240718010023.1495687-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 B56ECC3DA60 for <linux-arm-kernel@archiver.kernel.org>; Thu, 18 Jul 2024 01:04:16 +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=BRYCHYYbMGKjB3Qvf71te5ARgV5gIJcFTXBlC43nr00=; b=NZhsNfZ2aYCdIN3B8/WmmTxUil 3YDzv/T3LiJUTpgCeM+AkapmqLH3LP5VSZ2d5gZ/Hnj2LoLg6KZbSIbTwCdQ7cm3PSPODL6xE+FDK ujp+hHdL4oVw7vX+HGqLjvZp1Swmdz+zFWF8DNDM39H7y7x72k4+EJbNxOHkiqDYiLJNYxOVvEE3U NvhWj3RsTSogOMHJ94WgErknEZmNayYOJvkIkhJrtqiDmgv2G6SljqaHG0OXhcp0Q8ow7EivMLixV muR71n7mpjc9mP+34RpPWJNeSvbXZZrj7bmQuyZ04IaUBS/pakp+306RgOltTvO3unP7B0USNetHX 6pUFSAZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sUFYz-0000000FKut-3UTH; Thu, 18 Jul 2024 01:04:05 +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 1sUFW1-0000000FJZh-2O5q for linux-arm-kernel@lists.infradead.org; Thu, 18 Jul 2024 01:01:04 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e05a8aa4478so705886276.1 for <linux-arm-kernel@lists.infradead.org>; Wed, 17 Jul 2024 18:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1721264460; x=1721869260; 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=BRYCHYYbMGKjB3Qvf71te5ARgV5gIJcFTXBlC43nr00=; b=gr+TxFgGT2ux/pfvZiEHlHKB06ZvxlRmjecExrR0UsQcu2lwYXKaqNmTLrKGRTSLYV gxUbiwvq+a7bmCCZ39ia1eNKxYB1Ybx0zJjgRYOEIG8NxBrvA+rO0xTN00bbeBK6tYJD tNC9wxxaiTU7HQVKztEdoFFBSYsrJZwtdgvlOWG274ilKuPm89Y0D6ZJNO3S5qXBFTjZ 2S3+Ob66kdIAQAoqwNPjr1v2CyINRDBGm2Mr0q5b97C2q/0IXXejnPPoDg/G8LnMHY3K nsDRFREC/38dAvg+LbQgEZyskgX1JV9KxEzjOi60u1fteKhDah1hRl5bT43GlZfMQdyW 8scA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721264460; x=1721869260; 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=BRYCHYYbMGKjB3Qvf71te5ARgV5gIJcFTXBlC43nr00=; b=g9PLnG+Q0nTkMhb/xJ6lXVId1/6sbFE5yllyafSKRbhljAXsk/5cLX7blnsh+s3+7B qPEifTpPzHQOa+OU9mcg5/m/geFMyAoQCjUY3korB/2xlvrCHMsW1WWlJvr8gI+XpwMG Xtuyd5J6QYe2orGI5uBrb7xdhOoMD+r8L3rfDShNsKxQbRySa8M7vFJseBrIOKK5wN9z sv29crUFeQQP2HW+YMdNt8Cp0yEzw+80Fq6O4a0F7da3Rb4/IhW8tva9uh4lPaLgZFNy QsUtiidM5ZgY/eJ+lfXDiuJpsGCCUDYqwKDnuTA7QHX/CgOPsYX+aDV/ryE3F7xEpnxC CBVA== X-Forwarded-Encrypted: i=1; AJvYcCUzs56iYZY6580SwfXHVHwgWTKnbnuspaXnBPYS4aqwsKJBBtOli/9eYoVHijZsY2pu0o5OjQJ1XyGprTDo8HBFWF8TtBDE1Ge8X2LtcKS+IFxkUZQ= X-Gm-Message-State: AOJu0YwXTsM4koafRqBggt0CbHDNhepO/o9FcAMlnJ/smzmZhmn9soWO iuFTNynGI1H8ALPFvSzIViA5uQQ4eTn2L8k6ISEhl/yWURDV8ODgCOsd5NHeZ/x1/rxmV5WLCb1 2E3cPAw== X-Google-Smtp-Source: AGHT+IFYtrxkbVfYcmj/8+44DV+o0ePqkzDO07+yzQP4ulp2Q9arWW+kMFkiLAGqIisbVnxNl9FY7TnY38mC X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:940b:9044:fa83:4060]) (user=irogers job=sendgmr) by 2002:a05:6902:100b:b0:e05:a1df:5644 with SMTP id 3f1490d57ef6-e05ff4c5bedmr36307276.2.1721264460178; Wed, 17 Jul 2024 18:01:00 -0700 (PDT) Date: Wed, 17 Jul 2024 18:00:06 -0700 In-Reply-To: <20240718010023.1495687-1-irogers@google.com> Message-Id: <20240718010023.1495687-11-irogers@google.com> Mime-Version: 1.0 References: <20240718010023.1495687-1-irogers@google.com> X-Mailer: git-send-email 2.45.2.1089.g2a221341d9-goog Subject: [PATCH v6 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-20240717_180101_650208_1634B89D X-CRM114-Status: GOOD ( 14.20 ) 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);