Revision: 17443
Author: [email protected]
Date: Thu Oct 31 11:43:23 2013 UTC
Log: Avoid pre-aging when debugger is active
BUG=None
[email protected]
Review URL: https://codereview.chromium.org/47023003
Patch from Ross McIlroy <[email protected]>.
http://code.google.com/p/v8/source/detail?r=17443
Modified:
/branches/bleeding_edge/src/arm/macro-assembler-arm.cc
/branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc
/branches/bleeding_edge/src/isolate-inl.h
/branches/bleeding_edge/src/isolate.h
/branches/bleeding_edge/src/mips/macro-assembler-mips.cc
/branches/bleeding_edge/src/x64/macro-assembler-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Thu Oct 24
12:40:34 2013 UTC
+++ /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Thu Oct 31
11:43:23 2013 UTC
@@ -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 @@
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));
=======================================
--- /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Wed Oct 23
13:48:04 2013 UTC
+++ /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Thu Oct 31
11:43:23 2013 UTC
@@ -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 @@
} 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);
=======================================
--- /branches/bleeding_edge/src/isolate-inl.h Tue Sep 10 11:13:55 2013 UTC
+++ /branches/bleeding_edge/src/isolate-inl.h Thu Oct 31 11:43:23 2013 UTC
@@ -46,6 +46,11 @@
c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top());
}
+
+
+bool Isolate::IsCodePreAgingActive() {
+ return FLAG_optimize_for_size && FLAG_age_code && !IsDebuggerActive();
+}
bool Isolate::IsDebuggerActive() {
=======================================
--- /branches/bleeding_edge/src/isolate.h Wed Oct 2 09:01:40 2013 UTC
+++ /branches/bleeding_edge/src/isolate.h Thu Oct 31 11:43:23 2013 UTC
@@ -994,6 +994,8 @@
void PreallocatedStorageDelete(void* p);
void PreallocatedStorageInit(size_t size);
+ inline bool IsCodePreAgingActive();
+
#ifdef ENABLE_DEBUGGER_SUPPORT
Debugger* debugger() {
if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger();
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Wed Oct 23
13:48:04 2013 UTC
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Thu Oct 31
11:43:23 2013 UTC
@@ -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 @@
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);
=======================================
--- /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Thu Oct 24
01:27:47 2013 UTC
+++ /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Thu Oct 31
11:43:23 2013 UTC
@@ -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 @@
} 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);
--
--
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.