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.
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.
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:
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.