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

Side by Side Diff: src/execution.cc

Issue 9323007: Tweak compaction candidate selection to avoid keeping page with low occupancy around. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 } 870 }
871 871
872 872
873 #endif 873 #endif
874 874
875 MaybeObject* Execution::HandleStackGuardInterrupt() { 875 MaybeObject* Execution::HandleStackGuardInterrupt() {
876 Isolate* isolate = Isolate::Current(); 876 Isolate* isolate = Isolate::Current();
877 StackGuard* stack_guard = isolate->stack_guard(); 877 StackGuard* stack_guard = isolate->stack_guard();
878 878
879 if (stack_guard->IsGCRequest()) { 879 if (stack_guard->IsGCRequest()) {
880 isolate->heap()->CollectAllGarbage(false); 880 isolate->heap()->CollectAllGarbage(false, "StackGuard GC request");
881 stack_guard->Continue(GC_REQUEST); 881 stack_guard->Continue(GC_REQUEST);
882 } 882 }
883 883
884 isolate->counters()->stack_interrupts()->Increment(); 884 isolate->counters()->stack_interrupts()->Increment();
885 if (stack_guard->IsRuntimeProfilerTick()) { 885 if (stack_guard->IsRuntimeProfilerTick()) {
886 isolate->counters()->runtime_profiler_ticks()->Increment(); 886 isolate->counters()->runtime_profiler_ticks()->Increment();
887 stack_guard->Continue(RUNTIME_PROFILER_TICK); 887 stack_guard->Continue(RUNTIME_PROFILER_TICK);
888 isolate->runtime_profiler()->OptimizeNow(); 888 isolate->runtime_profiler()->OptimizeNow();
889 } 889 }
890 #ifdef ENABLE_DEBUGGER_SUPPORT 890 #ifdef ENABLE_DEBUGGER_SUPPORT
891 if (stack_guard->IsDebugBreak() || stack_guard->IsDebugCommand()) { 891 if (stack_guard->IsDebugBreak() || stack_guard->IsDebugCommand()) {
892 DebugBreakHelper(); 892 DebugBreakHelper();
893 } 893 }
894 #endif 894 #endif
895 if (stack_guard->IsPreempted()) RuntimePreempt(); 895 if (stack_guard->IsPreempted()) RuntimePreempt();
896 if (stack_guard->IsTerminateExecution()) { 896 if (stack_guard->IsTerminateExecution()) {
897 stack_guard->Continue(TERMINATE); 897 stack_guard->Continue(TERMINATE);
898 return isolate->TerminateExecution(); 898 return isolate->TerminateExecution();
899 } 899 }
900 if (stack_guard->IsInterrupted()) { 900 if (stack_guard->IsInterrupted()) {
901 stack_guard->Continue(INTERRUPT); 901 stack_guard->Continue(INTERRUPT);
902 return isolate->StackOverflow(); 902 return isolate->StackOverflow();
903 } 903 }
904 return isolate->heap()->undefined_value(); 904 return isolate->heap()->undefined_value();
905 } 905 }
906 906
907 } } // namespace v8::internal 907 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/extensions/gc-extension.cc » ('j') | src/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698