On Sunday 09 March 2008 14:38, Bart Van Assche wrote:
> Hello,
>
> As far as I understood the libgomp source code directly, libgomp has
> its own barrier implementation based on the futex system call. This
> means that if I want to support OpenMP in DRD, I have to intercept the
> futex system call.

sys_futex is only called (iow, the kernel is only involved) when a
lock is contended.  Since that is in general very rare, monitoring
sys_futex will not work as you will miss most inter-thread dependencies.

> Is there a better way than adding calls to 
> appropriate tracking functions in PRE(sys_futex) and POST(sys_futex)
> (defined in coregrind/m_syswrap/syswrap-linux.c) ?

Patch libgomp as described in the README in the tarball and make
sure you configure the gcc build with --disable-linux-futex.

J

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to