Author: sewardj
Date: 2007-11-10 22:13:03 +0000 (Sat, 10 Nov 2007)
New Revision: 7139

Log:
Clarify reason for existence of track_pre_thread_ll_create/_exit.

Modified:
   trunk/include/pub_tool_tooliface.h


Modified: trunk/include/pub_tool_tooliface.h
===================================================================
--- trunk/include/pub_tool_tooliface.h  2007-11-10 20:21:11 UTC (rev 7138)
+++ trunk/include/pub_tool_tooliface.h  2007-11-10 22:13:03 UTC (rev 7139)
@@ -573,6 +573,21 @@
 
    ll_exit: low level thread exit.  Called after the exiting thread
    has run its last instruction.
+
+   The _ll_ part makes it clear these events are not to do with
+   pthread_create or pthread_exit/pthread_join (etc), which are a
+   higher level abstraction synthesised by libpthread.  What you be
+   sure of from _ll_create/_ll_exit is the absolute limits of each
+   thread's lifetime, and hence be assured that all memory references
+   made by the thread fall inside the _ll_create/_ll_exit pair.  This
+   is important for tools that need a 100% accurate account of which
+   thread is responsible for every memory reference in the process.
+
+   pthread_create/join/exit do not give this property - they will
+   calls/returns to/from them happen arbitrarily far away from the
+   relevant low-level thread create/quit event.  In general a few
+   hundred instructions; hence a few hundred(ish) memory references
+   could get misclassified each time.
 */
 void VG_(track_pre_thread_ll_create)(void(*f)(ThreadId tid, ThreadId child));
 void VG_(track_pre_thread_ll_exit)  (void(*f)(ThreadId tid));


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to