perf cs-etm: Use bool type for boolean values
authorJames Clark <james.clark@arm.com>
Mon, 24 Apr 2023 13:47:46 +0000 (14:47 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Apr 2023 17:42:20 +0000 (14:42 -0300)
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>
tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
tools/perf/util/cs-etm.c
tools/perf/util/cs-etm.h

index 92a855f..21d403f 100644 (file)
@@ -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;
 };
 
index 5059328..e048949 100644 (file)
@@ -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;
index 16333d3..70cac03 100644 (file)
@@ -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;