This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: access pointer and global variables


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]