[vmkit-commits] [vmkit] r68444 - /vmkit/trunk/lib/Mvm/GCMmap2/gccollector.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Mon Apr 6 07:42:40 PDT 2009


Author: geoffray
Date: Mon Apr  6 09:42:25 2009
New Revision: 68444

URL: http://llvm.org/viewvc/llvm-project?rev=68444&view=rev
Log:
Trace threads before tracing their stacks.


Modified:
    vmkit/trunk/lib/Mvm/GCMmap2/gccollector.cpp

Modified: vmkit/trunk/lib/Mvm/GCMmap2/gccollector.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/GCMmap2/gccollector.cpp?rev=68444&r1=68443&r2=68444&view=diff

==============================================================================
--- vmkit/trunk/lib/Mvm/GCMmap2/gccollector.cpp (original)
+++ vmkit/trunk/lib/Mvm/GCMmap2/gccollector.cpp Mon Apr  6 09:42:25 2009
@@ -53,6 +53,16 @@
   threads->synchronize();
 #endif
 
+  mvm::Thread* th = th->get();
+  mvm::Thread* tcur = th;
+
+  // First, trace threads.
+  do {
+    th->tracer();
+    tcur = (mvm::Thread*)tcur->next();
+  } while (tcur != th);
+
+  // Then trace stack objects.
   for(cur=used_nodes->next(); cur!=used_nodes; cur=cur->next())
     trace(cur);
 





More information about the vmkit-commits mailing list