- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you let us know what are the recommended tools to debug TBB applications, including finding race conditions, memory problems, performance issues, etc.
I know valgrind doesn't support tbb memory allocator.
Thanks.
I know valgrind doesn't support tbb memory allocator.
Thanks.
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you would like to find memory and threading issues in TBB application, I'd suggest using Intel Inspector XE. To monitorperformance of your application you can use Intel VTune Amplifier XE. Both tools support TBB.
Regards,
Kirill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It depends on what IDE you're using. For example, in case of a Windows platform aVisual Studio'sDebugger is one of the best.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. I am working on Linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
adding Intel Debugger (IDB) that comes with the Intel Composer XE 2011 for Linux. It also has awareness of the most important TBB containers and even allows partial editing (as long as the allocation model allows it) during runtime.
IDB also has a feature to detect data races called Thread Data Sharing Detection.
Best regards,
Georg Zitzlsberger
adding Intel Debugger (IDB) that comes with the Intel Composer XE 2011 for Linux. It also has awareness of the most important TBB containers and even allows partial editing (as long as the allocation model allows it) during runtime.
IDB also has a feature to detect data races called Thread Data Sharing Detection.
Best regards,
Georg Zitzlsberger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting Georg Zitzlsberger (Intel)
Hello,
adding Intel Debugger (IDB) that comes with the Intel Composer XE 2011 for Linux. It also has awareness of the most important TBB containers...
[SergeyK] Could you provide more technical details ( I mean the list of these containers )? And, what
do you mean when you mentioned'awareness'?
Best regards,
Georg Zitzlsberger
adding Intel Debugger (IDB) that comes with the Intel Composer XE 2011 for Linux. It also has awareness of the most important TBB containers...
[SergeyK] Could you provide more technical details ( I mean the list of these containers )? And, what
do you mean when you mentioned'awareness'?
Best regards,
Georg Zitzlsberger
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sergey,
the support for TBB is adding awareness to IDB about it to get the same features as for STL:
- TBB types, mostly containers, are shown "pretty printed" (see screenshot)
- TBB types can be modified (if no allocation/deallocation is needed)
- TBB implementation is not entered when doing step-into (but can be turned off by setting $usessteppingrules=0)
You'll find a file called idb_tbb_config.xml in the debugger directory (inside Composer XE 2011 for Linux). It defines filters for doing the pretty printing. Currently we support the following TBB types:
Giving an example:

In the screenshot above we're evaluating cv which is TBB type concurrenct_vector of type long. Usually you'd see the real data members of it which are pointers (begin, end, next, ...). Then it's hard to extract the elements you, as a developer, are usually interested in. IDB does this for you automatically, which is called pretty printing. Here, you see the three elements of type long (1/4, 2 & 3).
Also IDB allows you to modify those elements, which I'm just doing; value of first element was changed from 1 to 4. Note, that you cannot remove or add new elements becasue that involves allocation/deallocation which is not possible.
Regarding stepping: If you're at lines 10-12 and try to do a step-into IDB detects that this is TBB namespace and does not follow. For you, it's 3rd party code and usually you won't be interested in its implementation. Mostly people do step-into very quickly and suddently end up inside TBB which is of no use for them. That's the idea of this feature.
Please let me know if you have further questions,
Georg Zitzlsberger
the support for TBB is adding awareness to IDB about it to get the same features as for STL:
- TBB types, mostly containers, are shown "pretty printed" (see screenshot)
- TBB types can be modified (if no allocation/deallocation is needed)
- TBB implementation is not entered when doing step-into (but can be turned off by setting $usessteppingrules=0)
You'll find a file called idb_tbb_config.xml in the debugger directory (inside Composer XE 2011 for Linux). It defines filters for doing the pretty printing. Currently we support the following TBB types:
- task
- atomic
- concurrent_vector (& iterator)
- concurrent_queue (& iterator)
- concurrent_hashmap (& accessor/iterator)
Giving an example:

In the screenshot above we're evaluating cv which is TBB type concurrenct_vector of type long. Usually you'd see the real data members of it which are pointers (begin, end, next, ...). Then it's hard to extract the elements you, as a developer, are usually interested in. IDB does this for you automatically, which is called pretty printing. Here, you see the three elements of type long (1/4, 2 & 3).
Also IDB allows you to modify those elements, which I'm just doing; value of first element was changed from 1 to 4. Note, that you cannot remove or add new elements becasue that involves allocation/deallocation which is not possible.
Regarding stepping: If you're at lines 10-12 and try to do a step-into IDB detects that this is TBB namespace and does not follow. For you, it's 3rd party code and usually you won't be interested in its implementation. Mostly people do step-into very quickly and suddently end up inside TBB which is of no use for them. That's the idea of this feature.
Please let me know if you have further questions,
Georg Zitzlsberger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you,Georg! That's anawesomedescription! I wish to see more responses like this one from
everybody.
Best regards,
Sergey
everybody.
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is an example of debuggingthe sameTBB's 'concurrent_vector' Test-Case withVisual Studio 2005:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's also the Parallel Studio plugin.

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