access pointer and global variables

David Smith dsmith@redhat.com
Thu Jun 7 20:04:00 GMT 2007


Stone, Joshua I wrote:
> Stone, Joshua I wrote:
>>     probe kernel.function("schedule") {
>>         cache[...] = $prev->pid
>>     }
>>     probe kernel.function("schedule").return {
>>         printf("pid is %d\n", cache[...])
>>     }
> 
> But I would still be happy with this, which I don't think would require 
> too much change.

I agree with you that this might be implementable, but is it what you 
would really want?  In a return probe would you want the original value 
of $prev->pid or the current value (assuming the function changed the 
data pointed to by $prev)?

I'd guess that most times you'd want the current value.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)



More information about the Systemtap mailing list