Thread Viewer Application Question
Thread Viewer Application Question
- Subject: Thread Viewer Application Question
- From: jim Schimpf <email@hidden>
- Date: Sun, 13 Nov 2005 18:42:29 -0500
Hi, I've been using the Thread Viewer (Developer->Applications->Performance Tools) to analyze the performance of an applicaton. The multithreaded app is running in XCode 2.1 debugger and via the Thread Viewer app I can see one thread is running much more than the others. I would like to examine this thread in the debugger in detail but how do I map from the Thread number in the Thread Viewer to the Pthreads displayed in the XCode debugger ? According to the help for Thread Viewer these on the left of the display are the Mach Port Number for each thread.
I can see that say thread 04d07 is consuming a lot of cycles but the debugger only shows threads as 1-23. Also the way this app is structured ALL the threads run the same base thread code so I cannot look at the stack snap shots in the Viewer to guess which pthread it might be.
I've tried calling pthread_mach_thread_np() and putting that value into my per thread data structure. This is supposed to be the kernel thread (Mach port) under the pthread. This value doesn't seem to match anything in Thread Viewer. I've been looking at the source of Libc-391.2.3 from Darwin (pthreads/pthread.c is here). It does put the Mach port value into the struct when it creates the thread and pthread_mach_thread_np() will get it back. My question is how do I use the Thread Viewer app to cross reference with the debugger and find a specific thread ? --jim schimpf |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden