Running into a strange error with powertop(1). The script below, which
worked until snv_107, fails with the following error
r...@catfish:~$ dtrace -s /tmp/freq.d
dtrace: failed to compile script /tmp/freq.d: line 13: last[ ] key #1 is
incompatible with prototype:
prototype: int
key: struct vsd_node
r...@catfish:~$ cat /tmp/freq.d
hrtime_t last[int];
BEGIN
{
begin = timestamp;
}
:::cpu-change-speed
/last[((cpudrv_devstate_t *)arg0)->cpu_id] != 0/
{
this->cpu = ((cpudrv_devstate_t *)arg0)->cpu_id;
this->oldspeed = ((cpudrv_pm_t *)arg1)->cur_spd->speed;
@times[this->cpu, this->oldspeed] = sum(timestamp - last[this->cpu]);
last[this->cpu] = timestamp;
}
:::cpu-change-speed
/last[((cpudrv_devstate_t *)arg0)->cpu_id] == 0/
{
this->cpu = ((cpudrv_devstate_t *)arg0)->cpu_id;
this->oldspeed = ((cpudrv_pm_t *)arg1)->cur_spd->speed;
@times[this->cpu, this->oldspeed] = sum(timestamp - begin);
last[this->cpu] = timestamp;
}
If I replace
hrtime_t last[int];
with something like
hrtime_t last[2];
I get
r...@catfish:~$ dtrace -s /tmp/freq.d
dtrace: failed to compile script /tmp/freq.d: line 13: operands have
incompatible types: "hrtime_t [2]" + "struct vsd_node"
Line 13 being
@times[this->cpu, this->oldspeed] = sum(timestamp - last[this->cpu]);
Any ideas ?
Thanks,
Rafael
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org