Intel® Thread Checker for Linux* - Tips and Techniques

Page Contents:


I don't have source code. Can I use Intel® Thread Checker?
Yes. For example: You are using an executable file from another vendor, so you don't have source code to it. But you are interested in diagnostics about a library (.dll or .so file) that is loaded by the vendor's executable file. 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.


Collecting Thread Checker Diagnostics Outside of the VTune™ Environment
To collect diagnostics outside of the VTune™ environment, follow this process:
  1. Compile your software using an Intel® Compiler and the /Qtcheck (on Microsoft Windows*) or -tcheck (on Linux*) switch. This option enables source instrumentation.

  2. Start your software as usual from the Windows*, DOS* or Linux* environment. For example, use Windows Explorer* to browse to your executable file and double-click on that file name.

  3. Run your software until it terminates normally. Don't forget to reduce your workload. Also because your software is instrumented, expect that it will run slower than usual.

  4. Exit (quit) your software, and a Thread Checker results ("*.thr") file is written to the working folder. If you are running on a Linux* system, transfer the .thr results file back to a Microsoft Windows* system (with Thread Checker installed) for viewing.

  5. To view the results file with Windows* Explorer, simply double-click the file. Alternatively you can start the VTune environment and open it with the File » Open File ... (NOT Open Project...) dialog. Important: Don't forget to set the file type to *.thr when using this dialog.
Keep in mind that when collecting data outside of the VTune environment, only software that has been source instrumented will be analyzed by Thread Checker. Therefore, threading errors in the not instrumented softwa re may be missed. To ensure that all run-time code is instrumented, you must run from within the VTune environment or Microsoft .NET* Developer Environment.

Note: Many third-party libraries, such as MFC* (Microsoft Foundation Class*) libraries, create and use threads. Therefore, software that uses MFC should always be run from within the VTune environment or Microsoft .NET* Developer Environment


Analyze Multiple Processes or Executables
Intel® Thread Checker only supports one process (executable) when run from within either the VTune™ environment or Microsoft .NET* Developer Environment. Furthermore, Thread Checker only supports finding diagnostics within one process; that is it will not produce diagnostics for synchronization objects shared between processes. However if your software launches another process, Thread Checker can still be used to find threading diagnostics within either process. To use Thread Checker for either process, use source instrumentation and run your software outside of the VTune™ environment.
For more complete information about compiler optimizations, see our Optimization Notice.