Profiling C++ multi-threaded applications

前端 未结 7 1546
眼角桃花
眼角桃花 2020-12-31 14:09

Have you used any profiling tool like Intel Vtune analyzer?

What are your recommendations for a C++ multi threaded application on Linux and windows? I am primarily

7条回答
  •  忘掉有多难
    2020-12-31 14:20

    Following are the good tools for multithreaded applications. You can try evaluation copy.

    1. Runtime sanity check tool
      • Thread Checker -- Intel Thread checker / VTune, here
    2. Memory consistency-check tools (memory usage, memory leaks) - Memory Validator, here
    3. Performance Analysis. (CPU usage) - AQTime , here

    EDIT: Intel thread checker can be used to diagnose Data races, Deadlocks, Stalled threads, abandoned locks etc. Please have lots of patience in analyzing the results as it is easy to get confused.

    Few tips:

    1. Disable the features that are not required.(In case of identifying deadlocks, data race can be disabled and vice versa.)
    2. Use Instrumentation level based on your need. Levels like "All Function" and "Full Image" are used for data races, where as "API Imports" can be used for deadlock detection)
    3. use context sensitive menu "Diagnostic Help" often.

提交回复
热议问题