Timing instrumentation not thread-safe

Issue #173 resolved
Chris Beall created an issue

Timing instrumentation (gttic/gttoc) is not thread-safe, resulting in crashes. Making it thread-safe would defeat its purpose, so we should probably prohibit that combination in CMake, or at least add a warning about enabling TBB+ENABLE_TIMING together.

Comments (5)

  1. Frank Dellaert

    I agree, just bitten by that :-) Can you prohibit the combination in cmake ?

    PS, I am assuming that by "defeat its purpose" you mean that adding guards would slow down things horriby? Because an alternate solution is to make it thread safe...

  2. Chris Beall reporter

    Yes, adding mutexes to make it thread-safe would slow things down and skew the results to the point of not being useful. In this scenario one should really be using an external profiling tool such as Apple's Instruments or Intel VTune.

  3. Log in to comment