From: Leo Yan <leo.yan@arm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@linaro.org>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, "Liang,
Kan" <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@arm.com>
Subject: [PATCH v1 7/9] perf intel-bts: Remove the 'pmu_type' field
Date: Tue, 6 Aug 2024 21:41:28 +0100 [thread overview]
Message-ID: <20240806204130.720977-8-leo.yan@arm.com> (raw)
In-Reply-To: <20240806204130.720977-1-leo.yan@arm.com>
Use the evsel__is_aux_event() function to detect the enabled AUX events.
The 'pmu_type' field is not used, remove it.
Signed-off-by: Leo Yan <leo.yan@arm.com>
---
tools/perf/util/intel-bts.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c
index 2b571e56f9c9..93f3452f8220 100644
--- a/tools/perf/util/intel-bts.c
+++ b/tools/perf/util/intel-bts.c
@@ -51,7 +51,6 @@ struct intel_bts {
bool sampling_mode;
bool snapshot_mode;
bool data_queued;
- u32 pmu_type;
struct perf_tsc_conversion tc;
bool cap_user_time_zero;
struct itrace_synth_opts synth_opts;
@@ -768,7 +767,7 @@ static int intel_bts_synth_events(struct intel_bts *bts,
int err;
evlist__for_each_entry(evlist, evsel) {
- if (evsel->core.attr.type == bts->pmu_type && evsel->core.ids) {
+ if (evsel__is_aux_event(evsel) && evsel->core.ids) {
found = true;
break;
}
@@ -868,7 +867,6 @@ int intel_bts_process_auxtrace_info(union perf_event *event,
bts->session = session;
bts->machine = &session->machines.host; /* No kvm support */
bts->auxtrace_type = auxtrace_info->type;
- bts->pmu_type = auxtrace_info->priv[INTEL_BTS_PMU_TYPE];
bts->tc.time_shift = auxtrace_info->priv[INTEL_BTS_TIME_SHIFT];
bts->tc.time_mult = auxtrace_info->priv[INTEL_BTS_TIME_MULT];
bts->tc.time_zero = auxtrace_info->priv[INTEL_BTS_TIME_ZERO];
--
2.34.1
next prev parent reply other threads:[~2024-08-06 20:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 20:41 [PATCH v1 0/9] perf auxtrace: Refactor with evsel__is_aux_event() Leo Yan
2024-08-06 20:41 ` [PATCH v1 1/9] perf auxtrace: Use evsel__is_aux_event() for checking AUX event Leo Yan
2024-08-09 7:55 ` Adrian Hunter
2024-08-06 20:41 ` [PATCH v1 2/9] perf auxtrace: Remove unused 'pmu' pointer from struct auxtrace_record Leo Yan
2024-08-09 8:02 ` Adrian Hunter
2024-08-28 21:16 ` Arnaldo Carvalho de Melo
2024-08-30 7:32 ` Leo Yan
2024-08-06 20:41 ` [PATCH v1 3/9] perf auxtrace: Refactor auxtrace__evsel_is_auxtrace() Leo Yan
2024-08-08 12:58 ` Adrian Hunter
2024-08-09 10:08 ` James Clark
2024-08-09 10:57 ` Leo Yan
2024-08-06 20:41 ` [PATCH v1 4/9] perf arm-spe: Remove the 'pmu_type' field Leo Yan
2024-08-06 20:41 ` [PATCH v1 5/9] perf cs-etm: " Leo Yan
2024-08-06 20:41 ` [PATCH v1 6/9] perf hisi-ptt: Remove the unused " Leo Yan
2024-08-06 20:41 ` Leo Yan [this message]
2024-08-06 20:41 ` [PATCH v1 8/9] perf intel-pt: Remove the " Leo Yan
2024-08-06 20:41 ` [PATCH v1 9/9] perf s390-cpumsf: Remove the unused " Leo Yan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240806204130.720977-8-leo.yan@arm.com \
--to=leo.yan@arm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=coresight@lists.linaro.org \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@linaro.org \
--cc=namhyung@kernel.org \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).