Tips on Preparing Linux* Code for Intel® Thread Checker for Linux*
The following are general tips for preparing Linux* source code for Intel® Thread Checker. Build (make) your source with the following switches:
- Generate symbols by compiling with the -g switch. This will enable Thread Checker to specify source code information (file name and line number) with its diagnostics.
- Compile without optimization using the -O0 switch. Just like when using a debugger, this will enable Thread Checker source code information (especially line numbers) to be accurate. Moreover, turning on compiler optimizations is usually not beneficial for code run under Intel Thread Checker.
I don't have source code. Can I use Intel® Thread Checker?
An example of using Thread Checker without source code might be if you are using an application file from another vendor, so you don't have source code for the for the application. But you are interested in diagnostics about a dynamic or shared library file that is loaded by the vendor's .application. You may not even have source code for the library that gets loaded. You can still use Thread Checker to see if any threading diagnostics are detected. Of course, if you really want to correct threading issues, you'll need source code.