Skip to content

Commit 1764ce0

Browse files
James-A-Clarkacmel
authored andcommitted
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@arm.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Denis Nikitin <denik@google.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Yang Shi <shy828301@gmail.com> Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230424134748.228137-7-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 7bfc154 commit 1764ce0

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

tools/perf/util/cs-etm-decoder/cs-etm-decoder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ struct cs_etm_decoder_params {
6060
int operation;
6161
void (*packet_printer)(const char *msg);
6262
cs_etm_mem_cb_type mem_acc_cb;
63-
u8 formatted;
64-
u8 fsyncs;
65-
u8 hsyncs;
66-
u8 frame_aligned;
63+
bool formatted;
64+
bool fsyncs;
65+
bool hsyncs;
66+
bool frame_aligned;
6767
void *data;
6868
};
6969

tools/perf/util/cs-etm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ struct cs_etm_auxtrace {
5050
struct thread *unknown_thread;
5151
struct perf_tsc_conversion tc;
5252

53-
u8 timeless_decoding;
54-
u8 snapshot_mode;
55-
u8 data_queued;
56-
u8 has_virtual_ts; /* Virtual/Kernel timestamps in the trace. */
53+
bool timeless_decoding;
54+
bool snapshot_mode;
55+
bool data_queued;
56+
bool has_virtual_ts; /* Virtual/Kernel timestamps in the trace. */
5757

5858
int num_cpu;
5959
u64 latest_kernel_timestamp;

tools/perf/util/cs-etm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ struct cs_etm_packet {
179179
u32 last_instr_subtype;
180180
u32 flags;
181181
u32 exception_number;
182-
u8 last_instr_cond;
183-
u8 last_instr_taken_branch;
182+
bool last_instr_cond;
183+
bool last_instr_taken_branch;
184184
u8 last_instr_size;
185185
u8 trace_chan_id;
186186
int cpu;

0 commit comments

Comments
 (0)