Hi all, With "dvm$target:::thread-start" we can only know the thread-name of the thread being created. But at the same time I want to know thread-id also. Could you, please, tell me how to do this? Thanks, Ajit. -- This message posted from opensolaris.org
On Wed, Oct 03, 2007 at 05:23:58AM -0700, Ajit Bansode wrote:> Hi all, > With "dvm$target:::thread-start" we can only know the thread-name of the thread being created. But at the same time I want to know thread-id also. > > Could you, please, tell me how to do this?''tid'' is what you are looking for: dtrace -n ''dvm$target:::thread-start {printf ("%d, %s, ", tid, copyinstr(arg0))}'' przemol -- http://przemol.blogspot.com/ ---------------------------------------------------------------------- Fajne i smieszne. Zobacz najlepsze filmiki!>>> http://link.interia.pl/f1bbb
Hi przemol, Thanks for your reply. But with the following script one could know the tid of a thread which is creating another thread with name "copyinstr(arg0)". dtrace -n ''dvm$target:::thread-start {printf ("%d, %s, ", tid, copyinstr(arg0))}'' And I want to know the tid of a thread which is being created by "tid"; i.e. the thread id of a thread whose name is "copyinstr(arg0)". Like, With following dtrace -n ''proc:::lwp-create{printf("%d created %d", tid, args[0]->pr_lwpid)}'' we can know thread "tid" created another thread with thread-id "args[0]->pr_lwpid". Thanks, Ajit. -- This message posted from opensolaris.org