Stack Frame Depth & other knobs in Inspector

Stack Frame Depth & other knobs in Inspector


I'm trying to use the Parallel Inspector on my TBB code, but am getting all kinds of strange race conditions.
It actually looks like what I would expect if I wasn't using any mutexes - saying there are concurrent calls to functions when I know the call sites are mutex-protected. (and I double checked this by testing directly in the code, in case the mutexes weren't working somehow. note these are plain tbb:mutex-s)

So I was looking around the knobs in the Inspector, and I see I can set the stack-frame-depth. Is this something like how deep into the call tree inspector looks? That would explain my strange results, since my call tree can be very deep (more than 32, which is the limit for this parameter). But on the other hand that seems like a strange restriction.

Anyway, the online help says 'To be written' - so what does this parameter mean?

Also, I see the detect-data-races-on-stack-accesses knob is set to False by default, and is not listed by "inspxe-cl -knob-list=ti3" or with mi3. Does this mean that currently such data races are not detected?

I'm compiling using TBB 3.0 update 2, with TBB_USE_THREADING_TOOLS set, with /Zi /Od /MD as recommended.

Any help here is appreciated.

thanks very much,
Daniel Faken

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Daniel,

The biggest number of Stack frame depth in Inspector is 32, but your stack-frame-depth is more than 32. I don't think itwill impact on Inspector XE results (tbb:mutex-s was not detected, thatwas wrong).

Have you tried "ti2" or "ti3" with stack-frame-depth=1 to reproduce this problem?

If you use /MDd instead of /MD to recompile the projecttolinkTBBlibraries (especially for tbb_debug.lib), can you reproduce this issue?

Regards, Peter

Hello Peter,

Thanks for your reply.

This was using ti3, and I tried both 16 and 32 for the stack-frame-depth.
I can try 1, but what does this mean? What does "stack frame depth" control?

I will look into /MDd.


Leave a Comment

Please sign in to add a comment. Not a member? Join today