Avoid pre-aging when debugger is active
BUG=None R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/47023003 Patch from Ross McIlroy <rmcilroy@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
316271fc35
commit
6f27e4b377
@ -35,6 +35,7 @@
|
||||
#include "codegen.h"
|
||||
#include "cpu-profiler.h"
|
||||
#include "debug.h"
|
||||
#include "isolate-inl.h"
|
||||
#include "runtime.h"
|
||||
|
||||
namespace v8 {
|
||||
@ -926,7 +927,7 @@ void MacroAssembler::Prologue(PrologueFrameMode frame_mode) {
|
||||
this, kNoCodeAgeSequenceLength * Assembler::kInstrSize);
|
||||
// The following three instructions must remain together and unmodified
|
||||
// for code aging to work properly.
|
||||
if (FLAG_optimize_for_size && FLAG_age_code) {
|
||||
if (isolate()->IsCodePreAgingActive()) {
|
||||
// Pre-age the code.
|
||||
Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
|
||||
add(r0, pc, Operand(-8));
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "codegen.h"
|
||||
#include "cpu-profiler.h"
|
||||
#include "debug.h"
|
||||
#include "isolate-inl.h"
|
||||
#include "runtime.h"
|
||||
#include "serialize.h"
|
||||
|
||||
@ -1022,7 +1023,7 @@ void MacroAssembler::Prologue(PrologueFrameMode frame_mode) {
|
||||
} else {
|
||||
PredictableCodeSizeScope predictible_code_size_scope(this,
|
||||
kNoCodeAgeSequenceLength);
|
||||
if (FLAG_optimize_for_size && FLAG_age_code) {
|
||||
if (isolate()->IsCodePreAgingActive()) {
|
||||
// Pre-age the code.
|
||||
call(isolate()->builtins()->MarkCodeAsExecutedOnce(),
|
||||
RelocInfo::CODE_AGE_SEQUENCE);
|
||||
|
@ -48,6 +48,11 @@ SaveContext::SaveContext(Isolate* isolate)
|
||||
}
|
||||
|
||||
|
||||
bool Isolate::IsCodePreAgingActive() {
|
||||
return FLAG_optimize_for_size && FLAG_age_code && !IsDebuggerActive();
|
||||
}
|
||||
|
||||
|
||||
bool Isolate::IsDebuggerActive() {
|
||||
#ifdef ENABLE_DEBUGGER_SUPPORT
|
||||
if (!NoBarrier_Load(&debugger_initialized_)) return false;
|
||||
|
@ -994,6 +994,8 @@ class Isolate {
|
||||
void PreallocatedStorageDelete(void* p);
|
||||
void PreallocatedStorageInit(size_t size);
|
||||
|
||||
inline bool IsCodePreAgingActive();
|
||||
|
||||
#ifdef ENABLE_DEBUGGER_SUPPORT
|
||||
Debugger* debugger() {
|
||||
if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger();
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "codegen.h"
|
||||
#include "cpu-profiler.h"
|
||||
#include "debug.h"
|
||||
#include "isolate-inl.h"
|
||||
#include "runtime.h"
|
||||
|
||||
namespace v8 {
|
||||
@ -4596,7 +4597,7 @@ void MacroAssembler::Prologue(PrologueFrameMode frame_mode) {
|
||||
this, kNoCodeAgeSequenceLength * Assembler::kInstrSize);
|
||||
// The following three instructions must remain together and unmodified
|
||||
// for code aging to work properly.
|
||||
if (FLAG_optimize_for_size && FLAG_age_code) {
|
||||
if (isolate()->IsCodePreAgingActive()) {
|
||||
// Pre-age the code.
|
||||
Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
|
||||
nop(Assembler::CODE_AGE_MARKER_NOP);
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "serialize.h"
|
||||
#include "debug.h"
|
||||
#include "heap.h"
|
||||
#include "isolate-inl.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
@ -3659,7 +3660,7 @@ void MacroAssembler::Prologue(PrologueFrameMode frame_mode) {
|
||||
} else {
|
||||
PredictableCodeSizeScope predictible_code_size_scope(this,
|
||||
kNoCodeAgeSequenceLength);
|
||||
if (FLAG_optimize_for_size && FLAG_age_code) {
|
||||
if (isolate()->IsCodePreAgingActive()) {
|
||||
// Pre-age the code.
|
||||
Call(isolate()->builtins()->MarkCodeAsExecutedOnce(),
|
||||
RelocInfo::CODE_AGE_SEQUENCE);
|
||||
|
Loading…
Reference in New Issue
Block a user