> In exp-drd I need the value of VG_(get_running_tid)() upon *every*
> client memory access, not just for the memory accesses generated by
> translated code. [...]

Yes.  And the same is true in Helgrind.

> Only _start. Even if I would track _stop, I still would need code in
> the drd_trace_load() / drd_trace_store() functions for verifying
> whether VG_(get_running_tid)() changed.

You really need to intercept the _stop function.

* when notified with _start, cache the thread ID provided.

* when notified with _stop, discard the cached thread ID.

* when you need to know the thread ID, first see if you have
  a cached ID.  If not, call VG_(get_running_tid) (but don't
  cache the result).

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