VANDAL / prism

Modular, flexible, cross-platform workload profiling and characterization
BSD 3-Clause "New" or "Revised" License
13 stars 6 forks source link

Valgrind frontend sometimes misses new threads #2

Open mikelui opened 6 years ago

mikelui commented 6 years ago

Sigrind, the modified Callgrind tool, uses Callgrind's implementation of differentiating threads which can sometimes miss new threads.

This is because Callgrind uses Valgrind's internal thread id's, which reuses id's of exited threads.

So the following can happen:

Created - tid 1
Created - tid 2
Created - tid 3
Created - tid 4
Exited  - tid 2
Created - tid 2 <-- **Reusing old thread id** should be unique tid 5!

Prism will then conflate events from unique tid 2 and unique tid 5, treating them as coming from the same thread.