diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2018-06-05 11:00:50 -0600 |
---|---|---|
committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2019-05-23 15:41:56 -0600 |
commit | f9537728f52b8a889c98636954e9f42e863ea15c (patch) | |
tree | 9402952148f60e6861a583b33b5f5f1be1422eea /tools/perf/util/cs-etm.h | |
parent | 46d4c9a0528517690ad5d4c7b39a10a6d5a6492a (diff) |
perf tools: Configure contextID tracing in CPU-wide mode
When operating in CPU-wide mode being notified of contextID changes is
required so that the decoding mechanic is aware of the process context
switch.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Diffstat (limited to 'tools/perf/util/cs-etm.h')
-rw-r--r-- | tools/perf/util/cs-etm.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h index 0e97c196147a..826c9eedaf5c 100644 --- a/tools/perf/util/cs-etm.h +++ b/tools/perf/util/cs-etm.h @@ -103,6 +103,18 @@ struct intlist *traceid_list; #define KiB(x) ((x) * 1024) #define MiB(x) ((x) * 1024 * 1024) +/* + * Create a contiguous bitmask starting at bit position @l and ending at + * position @h. For example + * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. + * + * Carbon copy of implementation found in $KERNEL/include/linux/bitops.h + */ +#define GENMASK(h, l) \ + (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) + +#define BMVAL(val, lsb, msb) ((val & GENMASK(msb, lsb)) >> lsb) + #define CS_ETM_HEADER_SIZE (CS_HEADER_VERSION_0_MAX * sizeof(u64)) #define __perf_cs_etmv3_magic 0x3030303030303030ULL |