Skip to content
Snippets Groups Projects
Commit 49797bea authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Measure RAM access with Linux perf API

There is currently no reliable way to measure RAM accesses with PAPI,
the previous way by counting load and store instructions is not very
useful, as it is unknown how many bytes are transferred in each
instruction.

On certain CPUs there is a reliable way to measure this via an "uncore"
performance counter, one can check if your CPU (and/or Linux kernel
version) support this by checking if the files

	/sys/devices/uncore_imc/events/data_reads
	/sys/devices/uncore_imc/events/data_writes

exist.

To access these counter from an unprivileged program one has to set the
"paranoia" level of the perf subsystem to at most 0, adjustable via the
file

	/proc/sys/kernel/perf_event_paranoid

Along with this change there is a small API/ABI breakage as some keyword
arguments related to the memory measurement have been renamed/split-up.
parent d6e80973
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment