On Wednesday, November 21, 2007 9:51 AM,
tesla-dev-bounces at opensolaris.org wrote:

> On Wednesday, November 21, 2007 9:33 AM, Eric Saxe wrote:
> 
>> Hi Aubrey,
>> 
>> Li, Aubrey wrote:
>>> Hi Eric,
>>> 
>>> If I understand correctly, we have to take the initial timestamp in
>>> the loop as follows. Which dtrace probe should we use to take the
>>> initial timestamp? 
>>> 
>> Sorry for the delay. We can add a BEGIN probe (which is a probe that
>> fires when the script begins running) to collect the initial
>> timestamp. 
>> 
> We must take the initial timestamp in every loop.
> So I believe BEGIN is not what we want, isn't it?
> 

In my point of view, p-state statistics is not reachable based on the
current Dtrace probes.
The following is what I'm thinking,

1. add one member in the structure cpudrv_pm_spd to record last lbolt.

2. add one kstat member in the structure cpudrv_pm_spd to inform kernel
when p state data is collected.

3. So we can do in every loop.

loop{
    kstat_write(open the flag to inform the kernel we are ready to
collect p-state data)
    wait for sampling period
    kstat_write(closed the flag to inform the kernel stop collect
p-state data)
    snap dtrace data
}

It looks very cumbersome. 
Any suggestions?

Thanks,
-Aubrey

Reply via email to