- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm trying to use user API and observed the following under linux version of amplxe :
threadNaming, frame and events seems only effective for user mode sampling collections.
Moreover, thread naming only shows half of the threads when duration-type is greater than veryshort.
The threads are sharing the same code (worker threads).
Are there some limitation for using user API ?
regards,
Marc
I'm trying to use user API and observed the following under linux version of amplxe :
threadNaming, frame and events seems only effective for user mode sampling collections.
Moreover, thread naming only shows half of the threads when duration-type is greater than veryshort.
The threads are sharing the same code (worker threads).
Are there some limitation for using user API ?
regards,
Marc
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Usually VTune Amplifier will show entry function name as thread_name, but you can set thread name by yourself - use ittnotify API. Here is example:
Compile example file - itt_set_thread_name.cpp:
# g++ -g itt_set_thread_name.cpp /opt/intel/vtune_amplifier_xe_2011/lib64/libittnotify.a -o itt_set_thread_name.g++ -lpthread ldl
[cpp]#include#include #include #include "/opt/intel/vtune_amplifier_xe_2011/include/ittnotify.h" #define NUMTHREADS 16 void *helloFunc(void *pArg) { int curthread = *(int *)pArg; if (curthread==11) /* Want to monitor interest of thread */ __itt_thread_set_name("Thread 12"); for (unsigned long i=0; i<0x8000000; i++); printf("Hello Thread %dn",curthread); return 0; } main() { pthread_t hThread[NUMTHREADS]; int i, j, threadNo[NUMTHREADS]; for (i = 0; i < NUMTHREADS; i++) { threadNo = i; pthread_create(&hThread, NULL, helloFunc, &threadNo); } for (j = 0; j < NUMTHREADS; j++) pthread_join(hThread , NULL); return 0; } [/cpp]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peter,
thanks for your answer.
Actually I used the API as you suggested but had it partially working.
My point was about this partial result :
- not working with Event Based Sampling (i.e. lightweight-hotspots)
- partially working with User Mode Sampling (needs -duration-type very-short)
My question is then : is there a limitation od the user API regarding the collection configuration ?
Regards,
Marc
thanks for your answer.
Actually I used the API as you suggested but had it partially working.
My point was about this partial result :
- not working with Event Based Sampling (i.e. lightweight-hotspots)
- partially working with User Mode Sampling (needs -duration-type very-short)
My question is then : is there a limitation od the user API regarding the collection configuration ?
Regards,
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peter,
I managed to have thread names with Event Based Sampling (i.e. lightweight-hotspots), but nor event.
With user mode sampling, the events shows up (using windows version), but I have a question : I have created two events, and wondered how to see event names within the "Bottom Up" panel of the gui.
Thanks,
Marc
I managed to have thread names with Event Based Sampling (i.e. lightweight-hotspots), but nor event.
With user mode sampling, the events shows up (using windows version), but I have a question : I have created two events, and wondered how to see event names within the "Bottom Up" panel of the gui.
Thanks,
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to see your events in report, please refer to ittnotify.h & online helper.
Here is my blog to educate how to mark user's tasks in timeline of the report (Sorry for Chinese version, butexample code can be referenced)
Regards, Peter
![](/skins/images/8B5EA638CA3587CA763EE9EF53643DD4/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page