Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: runtime/vm/code_generator.cc

Issue 1259223005: Safepoint interface and unit tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add comment about overflow. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | runtime/vm/thread_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index dd977b239684252db484eb32a0e25e3a92e5da2d..2ab631fb6fa8fb9d604350a79c4faf8a5d6575c2 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -23,6 +23,7 @@
#include "vm/runtime_entry.h"
#include "vm/stack_frame.h"
#include "vm/symbols.h"
+#include "vm/thread_registry.h"
#include "vm/verifier.h"
namespace dart {
@@ -1299,11 +1300,14 @@ DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
}
uword interrupt_bits = isolate->GetAndClearInterrupts();
- if ((interrupt_bits & Isolate::kStoreBufferInterrupt) != 0) {
- if (FLAG_verbose_gc) {
- OS::PrintErr("Scavenge scheduled by store buffer overflow.\n");
+ if ((interrupt_bits & Isolate::kVMInterrupt) != 0) {
+ isolate->thread_registry()->CheckSafepoint();
+ if (isolate->store_buffer()->Overflowed()) {
+ if (FLAG_verbose_gc) {
+ OS::PrintErr("Scavenge scheduled by store buffer overflow.\n");
+ }
+ isolate->heap()->CollectGarbage(Heap::kNew);
}
- isolate->heap()->CollectGarbage(Heap::kNew);
}
if ((interrupt_bits & Isolate::kMessageInterrupt) != 0) {
bool ok = isolate->message_handler()->HandleOOBMessages();
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | runtime/vm/thread_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698