History

perf cs-etm: Handle PERF_RECORD_AUX_OUTPUT_HW_ID packet

When using dynamically assigned CoreSight trace IDs the drivers can output the ID / CPU association as a PERF_RECORD_AUX_OUTPUT_HW_ID packet. Update cs-etm decoder to handle this packet by setting the CPU/Trace ID mapping.

Mike Leach committed 3 years ago

Commit b6521ea1 parent e5fa5b43 files · +250 −18Browse files

Showing the changes to tools/include/linux (1 of 3 files). Show all

Unified · Split

tools/include/linux/coresight-pmu.h+15−0
@@ -31,6 +31,9 @@ · 30 unmodified lines
3131 */
3232 #define CORESIGHT_TRACE_ID_UNUSED_FLAG BIT(31)
3333
34+/* Value to set for unused trace ID values */
35+#define CORESIGHT_TRACE_ID_UNUSED_VAL 0x7F
36+
3437 /*
3538 * Below are the definition of bit offsets for perf option, and works as
3639 * arbitrary values for all ETM versions.
@@ -55,4 +58,16 @@ · 18 unmodified lines
5558 #define ETM4_CFG_BIT_RETSTK 12
5659 #define ETM4_CFG_BIT_VMID_OPT 15
5760
61+/*
62+ * Interpretation of the PERF_RECORD_AUX_OUTPUT_HW_ID payload.
63+ * Used to associate a CPU with the CoreSight Trace ID.
64+ * [07:00] - Trace ID - uses 8 bits to make value easy to read in file.
65+ * [59:08] - Unused (SBZ)
66+ * [63:60] - Version
67+ */
68+#define CS_AUX_HW_ID_TRACE_ID_MASK GENMASK_ULL(7, 0)
69+#define CS_AUX_HW_ID_VERSION_MASK GENMASK_ULL(63, 60)
70+
71+#define CS_AUX_HW_ID_CURR_VERSION 0
72+
5873 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t