[PATCH] StopTheWorld in sanitizer_common (first commit)

Kostya Serebryany kcc at google.com
Wed Feb 27 05:14:50 PST 2013



================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld.h:27
@@ +26,3 @@
+// functionality (to be implemented).
+class SuspendedThreadsList {
+ public:
----------------
Why do you need a whole new class for this? 
Isn't it better to add the Contains method to InternalVector and just use typedef InternalVector<> SuspendedThreadsVector? 

================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux.cc:247
@@ +246,3 @@
+void StopTheWorld(StopTheWorldCallback callback, void *argument) {
+  SanitizerVerbosity = 1;
+  BlockingMutexLock lock(&stoptheworld_mutex);
----------------
did you leave this here intentionally? 

================
Comment at: lib/sanitizer_common/tests/sanitizer_stoptheworld_test.cc:85
@@ +84,3 @@
+  // terminate before we can return from this function.
+  int join_status = pthread_join(thread_id, NULL);
+  ASSERT_EQ(join_status, 0);
----------------
EXPECT_EQ(thread_join(thread_id, NULL), 0)


http://llvm-reviews.chandlerc.com/D469



More information about the llvm-commits mailing list