Erik,

On Tue, Jul 15, 2008 at 4:38 PM, Erik Junberger <[EMAIL PROTECTED]> wrote:
>
>>> If I for instance set the /reg_value, reg_long_reset, reg_short_reset/
>>> and /pfm_pebs_core_smpl_arg_t.cnt_reset/ to -10000 (on pmd0), the values
>>> are initially set correctly. Every time pmd0 wraps around however, the
>>> lower 32-bits of pmd0 will be set to 0, and the upper 32 to 1. This
>>> effectively means that I can't choose any other sampling period than 2³².
>>> When I read the /pfm_ds_area_core_t.pebs_cnt_reset/ value, the correct
>>> reset value is always returned, but this doesn't reflect reality.
>>>
>>>
>>
>> With PEBS, you sampling value can only be 32-bit wide due to the wrmsrl()
>> restriction that it can only modify the lower 32 bits. In fact you
>> actually have
>> 31-bits, bit 31 being the sign bit.
>>
>
> I see. This should be sufficient though.
>
Yes, for any type of sampling.


> Yes, the concept of amortizing the cost of many samples is clear to me. But
> I never get any interrupts at all.
> I have also tried to have a separate thread do /read(fd, &msg, sizeof(msg))/
> during the execution of the program. This call never returns.
> Also the /pebs_index /value never changes during execution, indicating that
> no samples are written to memory, if I am not mistaken?
>
You need to set the PFM_REGL_OVFL_NOTIFY on the PMD.

> Shouldn't it also be impossible for pmd0 to reach a value lower than 2^64 -
> cnt_reset? Or is bit 31 to be considered a sign bit even in perfmon's
> virtual 64-bit counters?
Internally perfmon will set the upper bits according to the width of the
counter. From your point-of-view, consider the counter as 64-bit.
There is only one restriction w.r.t. to cnt_reset, make sure your sampling
period fits 31-bits.

> This seems to work fine, as I am at least getting some samples
>
Then you must be missing a flag somewhere.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
perfmon2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to