Does perf randomize the sampling period?
Hey all,
does perf randomize its sampling intervals/period to prevent pattern effects? I found https://lkml.org/lkml/2010/3/4/51 but neither the man page on perf record says anything on that matter, nor does the perf wiki say it's supported:
https://perf.wiki.kernel.org/index.php/Tutorial#Period_and_rate
Quoted 1 line
There is currently no support for sampling period randomization.
So is it supported, or not? If it is supported, how do I enable it? Or is this enabled by default?
If it is not supported, why so? Is it not important to have?
Thanks
Signature · 4 lines
Milian Wolff | [email protected] | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt Experts
Regarding perf mem record on Intel platforms, I think that the sampling randomization is ensured by the hardware.
----
Manu
Quoted 18 lines · Milian Wolff
Hey all,
does perf randomize its sampling intervals/period to prevent pattern effects? I found https://lkml.org/lkml/2010/3/4/51 but neither the man page on perf record says anything on that matter, nor does the perf wiki say it's supported:
https://perf.wiki.kernel.org/index.php/Tutorial#Period_and_rate
Quoted 1 line
There is currently no support for sampling period randomization.
So is it supported, or not? If it is supported, how do I enable it? Or is this enabled by default?
If it is not supported, why so? Is it not important to have?
Thanks
According to this paper
Establishing a Base of Trust with Performance Counters for Enterprise Workloads
software randomization is not available in perf.
"We program the PMU to sample with prime and non-prime periods. Due to perf limitations, software- based period randomization was unavailable, but the hardware randomizes the 4 least significant bits."
2015-09-09 17:16 GMT+02:00 Manuel Selva <[email protected]>:
Quoted 34 lines
Regarding perf mem record on Intel platforms, I think that the sampling randomization is ensured by the hardware.
----
ManuQuoted 14 lines · Milian Wolff
Hey all,
does perf randomize its sampling intervals/period to prevent pattern effects?
I found https://lkml.org/lkml/2010/3/4/51 but neither the man page on perf record says anything on that matter, nor does the perf wiki say it's supported:https://perf.wiki.kernel.org/index.php/Tutorial#Period_and_rate
Quoted 1 line
There is currently no support for sampling period randomization.
Quoted 8 lines
So is it supported, or not? If it is supported, how do I enable it? Or is this
enabled by default?If it is not supported, why so? Is it not important to have?
Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Milian Wolff
Hey all,
does perf randomize its sampling intervals/period to prevent pattern effects?
It does not.
Usually you can get most of the benefits of randomization by using a prime period with -c.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only