* Does perf randomize the sampling period?
@ 2015-09-09 15:11 Milian Wolff
2015-09-09 15:16 ` Manuel Selva
2015-09-10 15:48 ` Andi Kleen
0 siblings, 2 replies; 4+ messages in thread
From: Milian Wolff @ 2015-09-09 15:11 UTC (permalink / raw)
To: linux-perf-users
[-- Attachment #1: Type: text/plain, Size: 727 bytes --]
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
> 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
--
Milian Wolff | milian.wolff@kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5903 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does perf randomize the sampling period?
2015-09-09 15:11 Does perf randomize the sampling period? Milian Wolff
@ 2015-09-09 15:16 ` Manuel Selva
2015-09-09 15:24 ` Andreas Hollmann
2015-09-10 15:48 ` Andi Kleen
1 sibling, 1 reply; 4+ messages in thread
From: Manuel Selva @ 2015-09-09 15:16 UTC (permalink / raw)
To: Milian Wolff, linux-perf-users
Regarding perf mem record on Intel platforms, I think that the sampling
randomization is ensured by the hardware.
----
Manu
On 09/09/2015 05:11 PM, Milian Wolff wrote:
> 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
>
>> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does perf randomize the sampling period?
2015-09-09 15:16 ` Manuel Selva
@ 2015-09-09 15:24 ` Andreas Hollmann
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Hollmann @ 2015-09-09 15:24 UTC (permalink / raw)
To: Manuel Selva; +Cc: Milian Wolff, linux-perf-users
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 <selva.manuel@gmail.com>:
> Regarding perf mem record on Intel platforms, I think that the sampling
> randomization is ensured by the hardware.
>
> ----
> Manu
>
> On 09/09/2015 05:11 PM, Milian Wolff wrote:
>>
>> 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
>>
>>> 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
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-perf-users"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does perf randomize the sampling period?
2015-09-09 15:11 Does perf randomize the sampling period? Milian Wolff
2015-09-09 15:16 ` Manuel Selva
@ 2015-09-10 15:48 ` Andi Kleen
1 sibling, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2015-09-10 15:48 UTC (permalink / raw)
To: Milian Wolff; +Cc: linux-perf-users
Milian Wolff <milian.wolff@kdab.com> writes:
> 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
--
ak@linux.intel.com -- Speaking for myself only
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-10 15:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-09 15:11 Does perf randomize the sampling period? Milian Wolff
2015-09-09 15:16 ` Manuel Selva
2015-09-09 15:24 ` Andreas Hollmann
2015-09-10 15:48 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).