views:

422

answers:

3

We are using multi-thread in our fairly large product, but when doing review we hardly know a function or method will run under which thread. I know this looks stupid, but in a large product without good modularization, we can lost. And there are many potential synchronization problems are aware of.

So I'm wondering if there are tools for code browsing that could help you easily identify function/method would be run under which thread(s).

+3  A: 

Intel Thread Profiler?

Gwaredd
+1  A: 

Understand for C++ is able to generate call graphs via source code analysis. A graph starting from each thread entry point will gives you which functions each thread is running.

It can be scripted in Perl, so you probably can generate a list of thread that can run a function. This may already exists in the scripts they provide.

philippe