Hi,

On Wed, Oct 20, 2010 at 12:09 PM, xudi <x...@ict.ac.cn> wrote:
> hi all,
>
>  I am new to libpfm v4.  I read the example code "task_smpl.c", which uses
> random sampling periods, but I didn't find any explicit statement to turn
> this feature on.
>

There is no sampling randomization support in perf_events. What you have
is two modes:
  1- fixed period
  2- target average sample rate

In the first mode, you set the period and it is used for each sample.
In the second mode, you set a target frequency, e.g., 1000Hz, which means
you'd like to get about 1000 samples/sec. The kernel will adjust the sampling
period dynamically to achieve the target average frequency. The frequency
is adjusted every timer tick.

In task_smpl, you can select either mode:
fixed period:  task_smpl -p 2400000000 .......
frequency: task_smpl -p 1000 -f ......



> So, how to turn off sampling period randomization?
>
> I am using the official Linux 2.6.35 kernel.
>
> Thanks.
>
> 2010-10-20
> ________________________________
> Di Xu
> ICT, CAS
> ------------------------------------------------------------------------------
> Download new Adobe(R) Flash(R) Builder(TM) 4
> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
> Flex(R) Builder(TM)) enable the development of rich applications that run
> across multiple browsers and platforms. Download your free trials today!
> http://p.sf.net/sfu/adobe-dev2dev
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
>
>

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to