Analysis and profiling of a multithreaded application

We have a multi-threaded application that has heavy packet processing at several stages of the pipeline. The application is in C under Linux.

The whole application works fine and does not have memory leaks or thread safety issues. However, to analyze the application, how can we profile and analyze flows?

In particular, we are interested in:

  • resource usage by each thread
  • the frequency and time during which the threads have been approved to receive locks
  • The amount of overhead associated with synchronization
  • any bottlenecks in the system
  • What is the maximum system bandwidth we can get

What are the best methods and tools available to them?

+5
source share
4 answers

Take a look at the Intel VTune Amplifier XE (formerly ... Intel Thread Profiler) to see if it meets your needs. This and other Intel Linux development tools are available for free for non-commercial use .

Intel VTune Amplifier XE . , . 9:20 " API- , , ".

+2

. :

1. . . , .

2. - , . , , , . . , , a) , , - -, b) . , , , , . .

.

, . , . , .

+1

1) . Linux .

2) , , , P-C . - 10 + , /. 100uS, , .

3) , (2), - .

4) / . .

5) - , , .. "" - , , - , " , " - .

0

Darwin (OSX) Linux? (Shark Thread Viewer ).

Of course, there are many possibilities for Linux performance. gprof, Valgrind (using Cachegrind, Callgrind, Massif) and Vtune will do what you need.

As far as I know, there is no tool that will directly answer your questions. However, answers can be found by cross-referencing data points and metrics from tool and sample solutions.

0
source

All Articles