On 26.10.10 15:32, goinsane wrote:
Hi,
I'd like to know if D enables to save and recall values of the same thread in a
way like self->... does.
Let's say a thread fires syscall::open:entry two times and gets 2
filedescriptors. How could I save those in syscall::open:return for later reuse?
The use of just 1 variable (e.g.self->fd) only would overwrite the value at the
2nd call. Maybe an associative array would tend to a solution, like self->fd[port]
= ... ?
And how could I evaluate them in a predicate of another probe?
how about storing what interests you about this fd in self->stuff[self->fd]
(where I assume self->fd is the "current" fd being opened)? would that work
for your app?
Michael
--
michael.schus...@oracle.com http://blogs.sun.com/recursion
Recursion, n.: see 'Recursion'
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org