- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, collecting information using Thread Profiler is sometimes pretty time consuming. Is there a way to start and stop profiling from within the code using certain function calls such that only relevant parts are considered? Thank you very much in advance.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my opinion, there is no sense in such functionality since Tread Profiler is intended to analyze the treading model of the whole application, i.e. from the life beginning of the main thread to its death. If you restrict the analysis to the certain functions, the important threading events could be unmanageably missed and the results become useless.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The __itt_pause and __itt_resume calls should do what you want. Look in the help under "API Support -> APIs to Control Data Collection" for more information.
You could also lower the instrumentation level for modules that you are not interested in, but as Vladimir points out, then you run the risk of missing threading API's.
Mark
You could also lower the instrumentation level for modules that you are not interested in, but as Vladimir points out, then you run the risk of missing threading API's.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It can be useful to restrict detailed analysis to certain parts of the program. (Note that the pause/resume APIs restrict the analysis in time, not to particular functions - calling __itt_pause on on thread suspends analysis for all the threads.) A typically example would be a program with multiple phases, and the user is only interested in a single phase - by pausing the analysis during the uninteresting phases, TP doesn't incur the overhead of tracking all the thread synchronization in those phases. (Synchronization interactions between the phases would be missed, but those might be known already, either through the structure of the program or from runs of TP covering the whole program).
Mark
Mark

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