[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230424134748.228137-7-james.clark@arm.com>
Date: Mon, 24 Apr 2023 14:47:46 +0100
From: James Clark <james.clark@....com>
To: linux-perf-users@...r.kernel.org, coresight@...ts.linaro.org,
shy828301@...il.com
Cc: denik@...gle.com, James Clark <james.clark@....com>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
Leo Yan <leo.yan@...aro.org>,
John Garry <john.g.garry@...cle.com>,
Will Deacon <will@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 6/7] perf: cs-etm: Use bool type for boolean values
Using u8 for boolean values makes the code a bit more difficult to read
so be more explicit by using bool.
Signed-off-by: James Clark <james.clark@....com>
---
tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 8 ++++----
tools/perf/util/cs-etm.c | 8 ++++----
tools/perf/util/cs-etm.h | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
index 92a855fbe5b8..21d403f55d96 100644
--- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
+++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
@@ -60,10 +60,10 @@ struct cs_etm_decoder_params {
int operation;
void (*packet_printer)(const char *msg);
cs_etm_mem_cb_type mem_acc_cb;
- u8 formatted;
- u8 fsyncs;
- u8 hsyncs;
- u8 frame_aligned;
+ bool formatted;
+ bool fsyncs;
+ bool hsyncs;
+ bool frame_aligned;
void *data;
};
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 50593289d53c..e048949bf655 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -50,10 +50,10 @@ struct cs_etm_auxtrace {
struct thread *unknown_thread;
struct perf_tsc_conversion tc;
- u8 timeless_decoding;
- u8 snapshot_mode;
- u8 data_queued;
- u8 has_virtual_ts; /* Virtual/Kernel timestamps in the trace. */
+ bool timeless_decoding;
+ bool snapshot_mode;
+ bool data_queued;
+ bool has_virtual_ts; /* Virtual/Kernel timestamps in the trace. */
int num_cpu;
u64 latest_kernel_timestamp;
diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
index 16333d35bed4..70cac0375b34 100644
--- a/tools/perf/util/cs-etm.h
+++ b/tools/perf/util/cs-etm.h
@@ -179,8 +179,8 @@ struct cs_etm_packet {
u32 last_instr_subtype;
u32 flags;
u32 exception_number;
- u8 last_instr_cond;
- u8 last_instr_taken_branch;
+ bool last_instr_cond;
+ bool last_instr_taken_branch;
u8 last_instr_size;
u8 trace_chan_id;
int cpu;
--
2.34.1
Powered by blists - more mailing lists