Bug 380350

Summary: RFE: --trace-fork-join in helgrind mode
Product: [Developer tools] valgrind Reporter: Mark Wielaard <mark>
Component: helgrindAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Mark Wielaard 2017-05-30 09:04:42 UTC
This was reported in the fedora bug tracker:
https://bugzilla.redhat.com/show_bug.cgi?id=1455657

When using helgrind, it would be nice to be able to correlate thread lifecycle
events with a program's logs & valgrind reports.  drd already has a
--trace-fork-join=yes option; please consider activating same for
--tool=helgrind.

This looks simple enough to implement in the same way drd does.
helgrind already has hooks for track_pre_thread_ll_create and track_pre_thread_first_insn. helgrind also intercepts pthreadZujoin (pthread_join) and generates a POST_THREAD_JOIN client request which is handled in evh__HG_PTHREAD_JOIN_POST. Which seem to be all the places where the trace_msgs need to be added.
In the track_pre_thread_ll_create thread_post_join pre_thread_create post_thread_create