Reputation: 20140
If I run Valgrind cachegrind, will the results with one or more threads be different? Or Valgrind just sequentializes the program and only reports the work of one thread?
Upvotes: 5
Views: 684
Reputation: 477494
Valgrind serializes all threads in an indeterminate fashion and analyses the sequential code flow. You will receive results about all your code, but the results may not be representative of an actual production run of the same code. (For example, many concurrency-related bugs will not manifest in a program that's run under Valgrind.)
Upvotes: 4