Skip to content

Commit d465bff

Browse files
committed
Merge tag 'perf-tools-for-v6.1-1-2022-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull perf tools updates from Arnaldo Carvalho de Melo: - Add support for AMD on 'perf mem' and 'perf c2c', the kernel enablement patches went via tip. Example: $ sudo perf mem record -- -c 10000 ^C[ perf record: Woken up 227 times to write data ] [ perf record: Captured and wrote 58.760 MB perf.data (836978 samples) ] $ sudo perf mem report -F mem,sample,snoop Samples: 836K of event 'ibs_op//', Event count (approx.): 8418762 Memory access Samples Snoop N/A 700620 N/A L1 hit 126675 N/A L2 hit 424 N/A L3 hit 664 HitM L3 hit 10 N/A Local RAM hit 2 N/A Remote RAM (1 hop) hit 8558 N/A Remote Cache (1 hop) hit 3 N/A Remote Cache (1 hop) hit 2 HitM Remote Cache (2 hops) hit 10 HitM Remote Cache (2 hops) hit 6 N/A Uncached hit 4 N/A $ - "perf lock" improvements: - Add -E/--entries option to limit the number of entries to display, say to ask for just the top 5 contended locks. - Add -q/--quiet option to suppress header and debug messages. - Add a 'perf test' kernel lock contention entry to test 'perf lock'. - "perf lock contention" improvements: - Ask BPF's bpf_get_stackid() to skip some callchain entries. The ones closer to the tooling are bpf related and not that interesting, the ones calling the locking function are the ones we're interested in, example of a full, unskipped callstack: - Allow changing the callstack depth and number of entries to skip. 1 10.74 us 10.74 us 10.74 us spinlock __bpf_trace_contention_begin+0xb 0xffffffffc03b5c47 bpf_prog_bf07ae9e2cbd02c5_contention_begin+0x117 0xffffffffc03b5c47 bpf_prog_bf07ae9e2cbd02c5_contention_begin+0x117 0xffffffffbb8b8e75 bpf_trace_run2+0x35 0xffffffffbb7eab9b __bpf_trace_contention_begin+0xb 0xffffffffbb7ebe75 queued_spin_lock_slowpath+0x1f5 0xffffffffbc1c26ff _raw_spin_lock+0x1f 0xffffffffbb841015 tick_do_update_jiffies64+0x25 0xffffffffbb8409ee tick_irq_enter+0x9e - Show full callstack in verbose mode (-v option), sometimes this is desirable instead of showing just one callstack entry. - Allow multiple time ranges in 'perf record --delay' to help in reducing the amount of data collected from hardware tracing (Intel PT, etc) when there is a rough idea of periods of time where events of interest take time. - Add Intel PT to record only decoder debug messages when error happens. - Improve layout of Intel PT man page. - Add new branch types: alignment, data and inst faults and arch specific ones, such as fiq, debug_halt, debug_exit, debug_inst and debug_data on arm64. Kernel enablement went thru the tip tree. - Fix 'perf probe' error log check in 'perf test' when no debuginfo is available. - Fix 'perf stat' aggregation mode logic, it should be looking at the CPU not at the core number. - Fix flags parsing in 'perf trace' filters. - Introduce compact encoding of CPU range encoding on perf.data, to avoid having a bitmap with all the CPUs. - Improvements to the 'perf stat' metrics, including adding "core_wide", and computing "smt" from the CPU topology. - Add support to the new PERF_FORMAT_LOST perf_event_attr.read_format, that allows tooling to ask for the precise number of lost samples for a given event. - Add 'addr' sort key to see just the address of sampled instructions: $ perf record -o- true | perf report -i- -s addr [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] # Samples: 12 of event 'cycles:u' # Event count (approx.): 252512 # # Overhead Address # ........ .................. 42.96% 0x7f96f08443d7 29.55% 0x7f96f0859b50 14.76% 0x7f96f0852e02 8.30% 0x7f96f0855028 4.43% 0xffffffff8de01087 perf annotate: Toggle full address <-> offset display - Add 'f' hotkey to the 'perf annotate' TUI interface when in 'disassembler output' mode ('o' hotkey) to toggle showing full virtual address or just the offset. - Cache DSO build-ids when synthesizing PERF_RECORD_MMAP records for pre-existing threads, at the start of a 'perf record' session, speeding up that record startup phase. - Add a command line option to specify build ids in 'perf inject'. - Update JSON event files for the Intel alderlake, broadwell, broadwellde, broadwellx, cascadelakex, haswell, haswellx, icelake, icelakex, ivybridge, ivytown, jaketown, sandybridge, sapphirerapids, skylake, skylakex, and tigerlake processors. - Update vendor JSON event files for the ARM Neoverse V1 and E1 platforms. - Add a 'perf test' entry for 'perf mem' where a struct has false sharing and this gets detected in the 'perf mem' output, tested with Intel, AMD and ARM64 systems. - Add a 'perf test' entry to test the resolution of java symbols, where an output like this is expected: 8.18% jshell jitted-50116-29.so [.] Interpreter 0.75% Thread-1 jitted-83602-1670.so [.] jdk.internal.jimage.BasicImageReader.getString(int) - Add tests for the ARM64 CoreSight hardware tracing feature, with specially crafted pureloop, memcpy, thread loop and unroll tread that then gets traced and the output compared with expected output. Documentation explaining it is also included. - Add per thread Intel PT 'perf test' entry to check that PERF_RECORD_TEXT_POKE events are recorded per CPU, resulting in a mixture of per thread and per CPU events and mmaps, verify that this gets all recorded correctly. - Introduce pthread mutex wrappers to allow for building with clang's -Wthread-safety, i.e. using the "guarded_by" "pt_guarded_by" "lockable", "exclusive_lock_function", "exclusive_trylock_function", "exclusive_locks_required", and "no_thread_safety_analysis" compiler function attributes. - Fix empty version number when building outside of a git repo. - Improve feature detection display when multiple versions of a feature are present, such as for binutils libbfd, that has a mix of possible ways to detect according to the Linux distribution. Previously in some cases we had: Auto-detecting system features <SNIP> ... libbfd: [ on ] ... libbfd-liberty: [ on ] ... libbfd-liberty-z: [ on ] <SNIP> Now for this case we show just the main feature: Auto-detecting system features <SNIP> ... libbfd: [ on ] <SNIP> - Remove some unused structs, variables, macros, function prototypes and includes from various places. * tag 'perf-tools-for-v6.1-1-2022-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (169 commits) perf script: Add missing fields in usage hint perf mem: Print "LFB/MAB" for PERF_MEM_LVLNUM_LFB perf mem/c2c: Avoid printing empty lines for unsupported events perf mem/c2c: Add load store event mappings for AMD perf mem/c2c: Set PERF_SAMPLE_WEIGHT for LOAD_STORE events perf mem: Add support for printing PERF_MEM_LVLNUM_{CXL|IO} perf amd ibs: Sync arch/x86/include/asm/amd-ibs.h header with the kernel tools headers UAPI: Sync include/uapi/linux/perf_event.h header with the kernel perf stat: Fix cpu check to use id.cpu.cpu in aggr_printout() perf test coresight: Add relevant documentation about ARM64 CoreSight testing perf test: Add git ignore for tmp and output files of ARM CoreSight tests perf test coresight: Add unroll thread test shell script perf test coresight: Add unroll thread test tool perf test coresight: Add thread loop test shell scripts perf test coresight: Add thread loop test tool perf test coresight: Add memcpy thread test shell script perf test coresight: Add memcpy thread test tool perf test: Add git ignore for perf data generated by the ARM CoreSight tests perf test: Add arm64 asm pureloop test shell script perf test: Add asm pureloop test tool ...
2 parents 041bc24 + d793107 commit d465bff

File tree

236 files changed

+15807
-5281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+15807
-5281
lines changed
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
================
4+
CoreSight - Perf
5+
================
6+
7+
:Author: Carsten Haitzler <[email protected]>
8+
:Date: June 29th, 2022
9+
10+
Perf is able to locally access CoreSight trace data and store it to the
11+
output perf data files. This data can then be later decoded to give the
12+
instructions that were traced for debugging or profiling purposes. You
13+
can log such data with a perf record command like::
14+
15+
perf record -e cs_etm//u testbinary
16+
17+
This would run some test binary (testbinary) until it exits and record
18+
a perf.data trace file. That file would have AUX sections if CoreSight
19+
is working correctly. You can dump the content of this file as
20+
readable text with a command like::
21+
22+
perf report --stdio --dump -i perf.data
23+
24+
You should find some sections of this file have AUX data blocks like::
25+
26+
0x1e78 [0x30]: PERF_RECORD_AUXTRACE size: 0x11dd0 offset: 0 ref: 0x1b614fc1061b0ad1 idx: 0 tid: 531230 cpu: -1
27+
28+
. ... CoreSight ETM Trace data: size 73168 bytes
29+
Idx:0; ID:10; I_ASYNC : Alignment Synchronisation.
30+
Idx:12; ID:10; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0 }
31+
Idx:17; ID:10; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0x0000000000000000;
32+
Idx:26; ID:10; I_TRACE_ON : Trace On.
33+
Idx:27; ID:10; I_ADDR_CTXT_L_64IS0 : Address & Context, Long, 64 bit, IS0.; Addr=0x0000FFFFB6069140; Ctxt: AArch64,EL0, NS;
34+
Idx:38; ID:10; I_ATOM_F6 : Atom format 6.; EEEEEEEEEEEEEEEEEEEEEEEE
35+
Idx:39; ID:10; I_ATOM_F6 : Atom format 6.; EEEEEEEEEEEEEEEEEEEEEEEE
36+
Idx:40; ID:10; I_ATOM_F6 : Atom format 6.; EEEEEEEEEEEEEEEEEEEEEEEE
37+
Idx:41; ID:10; I_ATOM_F6 : Atom format 6.; EEEEEEEEEEEN
38+
...
39+
40+
If you see these above, then your system is tracing CoreSight data
41+
correctly.
42+
43+
To compile perf with CoreSight support in the tools/perf directory do::
44+
45+
make CORESIGHT=1
46+
47+
This requires OpenCSD to build. You may install distribution packages
48+
for the support such as libopencsd and libopencsd-dev or download it
49+
and build yourself. Upstream OpenCSD is located at:
50+
51+
https://github.com/Linaro/OpenCSD
52+
53+
For complete information on building perf with CoreSight support and
54+
more extensive usage look at:
55+
56+
https://github.com/Linaro/OpenCSD/blob/master/HOWTO.md
57+
58+
59+
Kernel CoreSight Support
60+
------------------------
61+
62+
You will also want CoreSight support enabled in your kernel config.
63+
Ensure it is enabled with::
64+
65+
CONFIG_CORESIGHT=y
66+
67+
There are various other CoreSight options you probably also want
68+
enabled like::
69+
70+
CONFIG_CORESIGHT_LINKS_AND_SINKS=y
71+
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
72+
CONFIG_CORESIGHT_CATU=y
73+
CONFIG_CORESIGHT_SINK_TPIU=y
74+
CONFIG_CORESIGHT_SINK_ETBV10=y
75+
CONFIG_CORESIGHT_SOURCE_ETM4X=y
76+
CONFIG_CORESIGHT_CTI=y
77+
CONFIG_CORESIGHT_CTI_INTEGRATION_REGS=y
78+
79+
Please refer to the kernel configuration help for more information.
80+
81+
Perf test - Verify kernel and userspace perf CoreSight work
82+
-----------------------------------------------------------
83+
84+
When you run perf test, it will do a lot of self tests. Some of those
85+
tests will cover CoreSight (only if enabled and on ARM64). You
86+
generally would run perf test from the tools/perf directory in the
87+
kernel tree. Some tests will check some internal perf support like:
88+
89+
Check Arm CoreSight trace data recording and synthesized samples
90+
Check Arm SPE trace data recording and synthesized samples
91+
92+
Some others will actually use perf record and some test binaries that
93+
are in tests/shell/coresight and will collect traces to ensure a
94+
minimum level of functionality is met. The scripts that launch these
95+
tests are in the same directory. These will all look like:
96+
97+
CoreSight / ASM Pure Loop
98+
CoreSight / Memcpy 16k 10 Threads
99+
CoreSight / Thread Loop 10 Threads - Check TID
100+
etc.
101+
102+
These perf record tests will not run if the tool binaries do not exist
103+
in tests/shell/coresight/\*/ and will be skipped. If you do not have
104+
CoreSight support in hardware then either do not build perf with
105+
CoreSight support or remove these binaries in order to not have these
106+
tests fail and have them skip instead.
107+
108+
These tests will log historical results in the current working
109+
directory (e.g. tools/perf) and will be named stats-\*.csv like:
110+
111+
stats-asm_pure_loop-out.csv
112+
stats-memcpy_thread-16k_10.csv
113+
...
114+
115+
These statistic files log some aspects of the AUX data sections in
116+
the perf data output counting some numbers of certain encodings (a
117+
good way to know that it's working in a very simple way). One problem
118+
with CoreSight is that given a large enough amount of data needing to
119+
be logged, some of it can be lost due to the processor not waking up
120+
in time to read out all the data from buffers etc.. You will notice
121+
that the amount of data collected can vary a lot per run of perf test.
122+
If you wish to see how this changes over time, simply run perf test
123+
multiple times and all these csv files will have more and more data
124+
appended to it that you can later examine, graph and otherwise use to
125+
figure out if things have become worse or better.
126+
127+
This means sometimes these tests fail as they don't capture all the
128+
data needed. This is about tracking quality and amount of data
129+
produced over time and to see when changes to the Linux kernel improve
130+
quality of traces.
131+
132+
Be aware that some of these tests take quite a while to run, specifically
133+
in processing the perf data file and dumping contents to then examine what
134+
is inside.
135+
136+
You can change where these csv logs are stored by setting the
137+
PERF_TEST_CORESIGHT_STATDIR environment variable before running perf
138+
test like::
139+
140+
export PERF_TEST_CORESIGHT_STATDIR=/var/tmp
141+
perf test
142+
143+
They will also store resulting perf output data in the current
144+
directory for later inspection like::
145+
146+
perf-asm_pure_loop-out.data
147+
perf-memcpy_thread-16k_10.data
148+
...
149+
150+
You can alter where the perf data files are stored by setting the
151+
PERF_TEST_CORESIGHT_DATADIR environment variable such as::
152+
153+
PERF_TEST_CORESIGHT_DATADIR=/var/tmp
154+
perf test
155+
156+
You may wish to set these above environment variables if you wish to
157+
keep the output of tests outside of the current working directory for
158+
longer term storage and examination.

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,6 +2067,7 @@ F: drivers/hwtracing/coresight/*
20672067
F: include/dt-bindings/arm/coresight-cti-dt.h
20682068
F: include/linux/coresight*
20692069
F: samples/coresight/*
2070+
F: tools/perf/tests/shell/coresight/*
20702071
F: tools/perf/arch/arm/util/auxtrace.c
20712072
F: tools/perf/arch/arm/util/cs-etm.c
20722073
F: tools/perf/arch/arm/util/cs-etm.h

tools/arch/x86/include/asm/amd-ibs.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66

77
#include "msr-index.h"
88

9+
/* IBS_OP_DATA2 DataSrc */
10+
#define IBS_DATA_SRC_LOC_CACHE 2
11+
#define IBS_DATA_SRC_DRAM 3
12+
#define IBS_DATA_SRC_REM_CACHE 4
13+
#define IBS_DATA_SRC_IO 7
14+
15+
/* IBS_OP_DATA2 DataSrc Extension */
16+
#define IBS_DATA_SRC_EXT_LOC_CACHE 1
17+
#define IBS_DATA_SRC_EXT_NEAR_CCX_CACHE 2
18+
#define IBS_DATA_SRC_EXT_DRAM 3
19+
#define IBS_DATA_SRC_EXT_FAR_CCX_CACHE 5
20+
#define IBS_DATA_SRC_EXT_PMEM 6
21+
#define IBS_DATA_SRC_EXT_IO 7
22+
#define IBS_DATA_SRC_EXT_EXT_MEM 8
23+
#define IBS_DATA_SRC_EXT_PEER_AGENT_MEM 12
24+
925
/*
1026
* IBS Hardware MSRs
1127
*/

tools/build/Makefile.feature

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ FEATURE_DISPLAY ?= \
137137
libaio \
138138
libzstd
139139

140+
#
141+
# Declare group members of a feature to display the logical OR of the detection
142+
# result instead of each member result.
143+
#
144+
FEATURE_GROUP_MEMBERS-libbfd = libbfd-liberty libbfd-liberty-z
145+
140146
# Set FEATURE_CHECK_(C|LD)FLAGS-all for all FEATURE_TESTS features.
141147
# If in the future we need per-feature checks/flags for features not
142148
# mentioned in this list we need to refactor this ;-).
@@ -177,19 +183,28 @@ endif
177183
#
178184
# Print the result of the feature test:
179185
#
180-
feature_print_status = $(eval $(feature_print_status_code)) $(info $(MSG))
186+
feature_print_status = $(eval $(feature_print_status_code))
187+
188+
feature_group = $(eval $(feature_gen_group)) $(GROUP)
189+
190+
define feature_gen_group
191+
GROUP := $(1)
192+
ifneq ($(feature_verbose),1)
193+
GROUP += $(FEATURE_GROUP_MEMBERS-$(1))
194+
endif
195+
endef
181196

182197
define feature_print_status_code
183-
ifeq ($(feature-$(1)), 1)
184-
MSG = $(shell printf '...%30s: [ \033[32mon\033[m ]' $(1))
198+
ifneq (,$(filter 1,$(foreach feat,$(call feature_group,$(feat)),$(feature-$(feat)))))
199+
MSG = $(shell printf '...%40s: [ \033[32mon\033[m ]' $(1))
185200
else
186-
MSG = $(shell printf '...%30s: [ \033[31mOFF\033[m ]' $(1))
201+
MSG = $(shell printf '...%40s: [ \033[31mOFF\033[m ]' $(1))
187202
endif
188203
endef
189204

190-
feature_print_text = $(eval $(feature_print_text_code)) $(info $(MSG))
205+
feature_print_text = $(eval $(feature_print_text_code))
191206
define feature_print_text_code
192-
MSG = $(shell printf '...%30s: %s' $(1) $(2))
207+
MSG = $(shell printf '...%40s: %s' $(1) $(2))
193208
endef
194209

195210
#
@@ -244,24 +259,29 @@ ifeq ($(VF),1)
244259
feature_verbose := 1
245260
endif
246261

262+
ifneq ($(feature_verbose),1)
263+
#
264+
# Determine the features to omit from the displayed message, as only the
265+
# logical OR of the detection result will be shown.
266+
#
267+
FEATURE_OMIT := $(foreach feat,$(FEATURE_DISPLAY),$(FEATURE_GROUP_MEMBERS-$(feat)))
268+
endif
269+
247270
feature_display_entries = $(eval $(feature_display_entries_code))
248271
define feature_display_entries_code
249272
ifeq ($(feature_display),1)
250-
$(info )
251-
$(info Auto-detecting system features:)
252-
$(foreach feat,$(FEATURE_DISPLAY),$(call feature_print_status,$(feat),))
253-
ifneq ($(feature_verbose),1)
254-
$(info )
255-
endif
273+
$$(info )
274+
$$(info Auto-detecting system features:)
275+
$(foreach feat,$(filter-out $(FEATURE_OMIT),$(FEATURE_DISPLAY)),$(call feature_print_status,$(feat),) $$(info $(MSG)))
256276
endif
257277

258278
ifeq ($(feature_verbose),1)
259-
TMP := $(filter-out $(FEATURE_DISPLAY),$(FEATURE_TESTS))
260-
$(foreach feat,$(TMP),$(call feature_print_status,$(feat),))
261-
$(info )
279+
$(eval TMP := $(filter-out $(FEATURE_DISPLAY),$(FEATURE_TESTS)))
280+
$(foreach feat,$(TMP),$(call feature_print_status,$(feat),) $$(info $(MSG)))
262281
endif
263282
endef
264283

265284
ifeq ($(FEATURE_DISPLAY_DEFERRED),)
266285
$(call feature_display_entries)
286+
$(info )
267287
endif

tools/include/uapi/linux/perf_event.h

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ enum perf_branch_sample_type_shift {
204204

205205
PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT = 17, /* save low level index of raw branch records */
206206

207+
PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT = 18, /* save privilege mode */
208+
207209
PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */
208210
};
209211

@@ -233,6 +235,8 @@ enum perf_branch_sample_type {
233235

234236
PERF_SAMPLE_BRANCH_HW_INDEX = 1U << PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT,
235237

238+
PERF_SAMPLE_BRANCH_PRIV_SAVE = 1U << PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT,
239+
236240
PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT,
237241
};
238242

@@ -253,9 +257,37 @@ enum {
253257
PERF_BR_COND_RET = 10, /* conditional function return */
254258
PERF_BR_ERET = 11, /* exception return */
255259
PERF_BR_IRQ = 12, /* irq */
260+
PERF_BR_SERROR = 13, /* system error */
261+
PERF_BR_NO_TX = 14, /* not in transaction */
262+
PERF_BR_EXTEND_ABI = 15, /* extend ABI */
256263
PERF_BR_MAX,
257264
};
258265

266+
enum {
267+
PERF_BR_NEW_FAULT_ALGN = 0, /* Alignment fault */
268+
PERF_BR_NEW_FAULT_DATA = 1, /* Data fault */
269+
PERF_BR_NEW_FAULT_INST = 2, /* Inst fault */
270+
PERF_BR_NEW_ARCH_1 = 3, /* Architecture specific */
271+
PERF_BR_NEW_ARCH_2 = 4, /* Architecture specific */
272+
PERF_BR_NEW_ARCH_3 = 5, /* Architecture specific */
273+
PERF_BR_NEW_ARCH_4 = 6, /* Architecture specific */
274+
PERF_BR_NEW_ARCH_5 = 7, /* Architecture specific */
275+
PERF_BR_NEW_MAX,
276+
};
277+
278+
enum {
279+
PERF_BR_PRIV_UNKNOWN = 0,
280+
PERF_BR_PRIV_USER = 1,
281+
PERF_BR_PRIV_KERNEL = 2,
282+
PERF_BR_PRIV_HV = 3,
283+
};
284+
285+
#define PERF_BR_ARM64_FIQ PERF_BR_NEW_ARCH_1
286+
#define PERF_BR_ARM64_DEBUG_HALT PERF_BR_NEW_ARCH_2
287+
#define PERF_BR_ARM64_DEBUG_EXIT PERF_BR_NEW_ARCH_3
288+
#define PERF_BR_ARM64_DEBUG_INST PERF_BR_NEW_ARCH_4
289+
#define PERF_BR_ARM64_DEBUG_DATA PERF_BR_NEW_ARCH_5
290+
259291
#define PERF_SAMPLE_BRANCH_PLM_ALL \
260292
(PERF_SAMPLE_BRANCH_USER|\
261293
PERF_SAMPLE_BRANCH_KERNEL|\
@@ -1295,7 +1327,9 @@ union perf_mem_data_src {
12951327
#define PERF_MEM_LVLNUM_L2 0x02 /* L2 */
12961328
#define PERF_MEM_LVLNUM_L3 0x03 /* L3 */
12971329
#define PERF_MEM_LVLNUM_L4 0x04 /* L4 */
1298-
/* 5-0xa available */
1330+
/* 5-0x8 available */
1331+
#define PERF_MEM_LVLNUM_CXL 0x09 /* CXL */
1332+
#define PERF_MEM_LVLNUM_IO 0x0a /* I/O */
12991333
#define PERF_MEM_LVLNUM_ANY_CACHE 0x0b /* Any cache */
13001334
#define PERF_MEM_LVLNUM_LFB 0x0c /* LFB */
13011335
#define PERF_MEM_LVLNUM_RAM 0x0d /* RAM */
@@ -1373,7 +1407,9 @@ struct perf_branch_entry {
13731407
abort:1, /* transaction abort */
13741408
cycles:16, /* cycle count to last branch */
13751409
type:4, /* branch type */
1376-
reserved:40;
1410+
new_type:4, /* additional branch type */
1411+
priv:3, /* privilege level */
1412+
reserved:33;
13771413
};
13781414

13791415
union perf_sample_weight {

tools/lib/api/fd/array.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ struct fdarray {
3131
};
3232

3333
enum fdarray_flags {
34-
fdarray_flag__default = 0x00000000,
35-
fdarray_flag__nonfilterable = 0x00000001
34+
fdarray_flag__default = 0x00000000,
35+
fdarray_flag__nonfilterable = 0x00000001,
36+
fdarray_flag__non_perf_event = 0x00000002,
3637
};
3738

3839
void fdarray__init(struct fdarray *fda, int nr_autogrow);

0 commit comments

Comments
 (0)