|
From: Yao Qi <qiy...@gm...> - 2007-03-28 16:26:14
|
I am playing with helgrind on data race detection, and want to implement my data race detection in the framework of helgrind. I find that hg_thread_create and hg_thread_join is "hooked" to VG_(track_post_thread_create) and VG_(track_post_thread_join) respectively. One point confused me is how VG_(track_post_thread_join) is called? I could find the location invoke VG_(track_post_thread_create), but I could not find any thing call this function. I set breakpoint on hg_thread_join in gdb, and the helgrind does not hit this breakpoint either. Am I missing something? Thanks. -- Yao Qi <qiy...@gm...> GNU/Linux Developer http://duewayqi.googlepages.com/ Think twice before speaking, but don't say "think think click click". |
|
From: Nicholas N. <nj...@cs...> - 2007-03-28 21:48:30
|
On Thu, 29 Mar 2007, Yao Qi wrote: > I am playing with helgrind on data race detection, and want to implement > my data race detection in the framework of helgrind. > > I find that hg_thread_create and hg_thread_join is "hooked" to > VG_(track_post_thread_create) and VG_(track_post_thread_join) > respectively. One point confused me is how VG_(track_post_thread_join) > is called? I could find the location invoke > VG_(track_post_thread_create), but I could not find any thing call this > function. I set breakpoint on hg_thread_join in gdb, and the helgrind > does not hit this breakpoint either. > > Am I missing something? Thanks. These functions are called via functions pointers. The names depend on which version you're using, but look at the code within VG_(track_post_thread_create) to see where the function pointer is being assigned. Also beware that the point where the function pointer is called may involve macros, and so the names might not match up exactly. Nick |