Reviewers: Vyacheslav Egorov,
Message:
This supersedes https://chromiumcodereview.appspot.com/9620003/. Please
take a
look.
Description:
Profiler experiments: Honor postponing of interrupts in
HandleStackGuardInterrupt
Please review this at https://chromiumcodereview.appspot.com/9620009/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/execution.h
M src/execution.cc
Index: src/execution.cc
diff --git a/src/execution.cc b/src/execution.cc
index
1f019820b84e9da391ed1d7d80fc6770067f36bc..443d4b8d0f2af0df6652372baf52494f5b500131
100644
--- a/src/execution.cc
+++ b/src/execution.cc
@@ -376,6 +376,12 @@ void StackGuard::DisableInterrupts() {
}
+bool StackGuard::ShouldPostponeInterrupts() {
+ ExecutionAccess access(isolate_);
+ return should_postpone_interrupts(access);
+}
+
+
bool StackGuard::IsInterrupted() {
ExecutionAccess access(isolate_);
return (thread_local_.interrupt_flags_ & INTERRUPT) != 0;
@@ -874,6 +880,9 @@ void Execution::ProcessDebugMessages(bool
debug_command_only) {
MaybeObject* Execution::HandleStackGuardInterrupt(Isolate* isolate) {
StackGuard* stack_guard = isolate->stack_guard();
+ if (stack_guard->ShouldPostponeInterrupts()) {
+ return isolate->heap()->undefined_value();
+ }
if (stack_guard->IsGCRequest()) {
isolate->heap()->CollectAllGarbage(false, "StackGuard GC request");
Index: src/execution.h
diff --git a/src/execution.h b/src/execution.h
index
d9ec9dccf527c551af86a366843749f199397c63..01e4b9da4f7c6905d5cb72a21232499171f56690
100644
--- a/src/execution.h
+++ b/src/execution.h
@@ -226,6 +226,7 @@ class StackGuard {
Address address_of_real_jslimit() {
return reinterpret_cast<Address>(&thread_local_.real_jslimit_);
}
+ bool ShouldPostponeInterrupts();
private:
StackGuard();
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev