Revision: 15439
Author: [email protected]
Date: Tue Jul 2 02:04:45 2013
Log: Join threads after stopping.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/18287003
http://code.google.com/p/v8/source/detail?r=15439
Modified:
/branches/bleeding_edge/src/marking-thread.cc
/branches/bleeding_edge/src/optimizing-compiler-thread.cc
/branches/bleeding_edge/src/sweeper-thread.cc
/branches/bleeding_edge/test/cctest/test-mark-compact.cc
=======================================
--- /branches/bleeding_edge/src/marking-thread.cc Mon Jun 3 08:32:22 2013
+++ /branches/bleeding_edge/src/marking-thread.cc Tue Jul 2 02:04:45 2013
@@ -73,6 +73,7 @@
Release_Store(&stop_thread_, static_cast<AtomicWord>(true));
start_marking_semaphore_->Signal();
stop_semaphore_->Wait();
+ Join();
}
=======================================
--- /branches/bleeding_edge/src/optimizing-compiler-thread.cc Mon Jul 1
08:12:59 2013
+++ /branches/bleeding_edge/src/optimizing-compiler-thread.cc Tue Jul 2
02:04:45 2013
@@ -130,6 +130,8 @@
double percentage = (compile_time * 100) / total_time;
PrintF(" ** Compiler thread did %.2f%% useful work\n", percentage);
}
+
+ Join();
}
=======================================
--- /branches/bleeding_edge/src/sweeper-thread.cc Mon Jun 3 08:32:22 2013
+++ /branches/bleeding_edge/src/sweeper-thread.cc Tue Jul 2 02:04:45 2013
@@ -93,6 +93,7 @@
Release_Store(&stop_thread_, static_cast<AtomicWord>(true));
start_sweeping_semaphore_->Signal();
stop_semaphore_->Wait();
+ Join();
}
=======================================
--- /branches/bleeding_edge/test/cctest/test-mark-compact.cc Mon Jun 24
00:02:53 2013
+++ /branches/bleeding_edge/test/cctest/test-mark-compact.cc Tue Jul 2
02:04:45 2013
@@ -565,5 +565,26 @@
}
}
}
+
+
+intptr_t ShortLivingIsolate() {
+ v8::Isolate* isolate = v8::Isolate::New();
+ { v8::Isolate::Scope isolate_scope(isolate);
+ v8::Locker lock(isolate);
+ v8::HandleScope handle_scope;
+ v8::Local<v8::Context> context = v8::Context::New(isolate);
+ CHECK(!context.IsEmpty());
+ }
+ isolate->Dispose();
+ return MemoryInUse();
+}
+
+
+TEST(RegressJoinThreadsOnIsolateDeinit) {
+ intptr_t first_size = ShortLivingIsolate();
+ for (int i = 0; i < 10; i++) {
+ CHECK_EQ(first_size, ShortLivingIsolate());
+ }
+}
#endif // __linux__ and !USE_SIMULATOR
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.