Revision: 24109
Author: [email protected]
Date: Mon Sep 22 09:05:22 2014 UTC
Log: Emit source positions in deopt comments, too.
[email protected]
Review URL: https://codereview.chromium.org/587223002
https://code.google.com/p/v8/source/detail?r=24109
Modified:
/branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
/branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc
/branches/bleeding_edge/src/deoptimizer.h
/branches/bleeding_edge/src/hydrogen-instructions.h
/branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
/branches/bleeding_edge/src/lithium-codegen.cc
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc
/branches/bleeding_edge/src/x64/lithium-codegen-x64.cc
/branches/bleeding_edge/src/x87/lithium-codegen-x87.cc
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Mon Sep 22
06:36:57 2014 UTC
+++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Mon Sep 22
09:05:22 2014 UTC
@@ -899,7 +899,8 @@
__ stop("trap_on_deopt", condition);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to handle condition, build frame, or
// restore caller doubles.
=======================================
--- /branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc Mon Sep 22
06:36:57 2014 UTC
+++ /branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc Mon Sep 22
09:05:22 2014 UTC
@@ -1044,7 +1044,8 @@
__ Bind(&dont_trap);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to build frame, or restore caller
doubles.
if (branch_type == always &&
=======================================
--- /branches/bleeding_edge/src/deoptimizer.h Mon Sep 22 06:36:57 2014 UTC
+++ /branches/bleeding_edge/src/deoptimizer.h Mon Sep 22 09:05:22 2014 UTC
@@ -102,7 +102,9 @@
static const int kBailoutTypesWithCodeEntry = SOFT + 1;
struct Reason {
- Reason(const char* m, const char* d) : mnemonic(m), detail(d) {}
+ Reason(int r, const char* m, const char* d)
+ : raw_position(r), mnemonic(m), detail(d) {}
+ int raw_position;
const char* mnemonic;
const char* detail;
};
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Wed Sep 17 14:28:48
2014 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.h Mon Sep 22 09:05:22
2014 UTC
@@ -455,10 +455,10 @@
// Offset from the start of the inlined function.
typedef BitField<int, 9, 23> PositionField;
- // On HPositionInfo can use this constructor.
explicit HSourcePosition(int value) : value_(value) { }
friend class HPositionInfo;
+ friend class LCodeGenBase;
// If FLAG_hydrogen_track_positions is set contains bitfields
InliningIdField
// and PositionField.
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Mon Sep 22
06:36:57 2014 UTC
+++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Mon Sep 22
09:05:22 2014 UTC
@@ -867,7 +867,8 @@
__ bind(&done);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
if (cc == no_condition && frame_is_built_) {
DeoptComment(reason);
=======================================
--- /branches/bleeding_edge/src/lithium-codegen.cc Mon Sep 22 06:36:57 2014
UTC
+++ /branches/bleeding_edge/src/lithium-codegen.cc Mon Sep 22 09:05:22 2014
UTC
@@ -148,8 +148,11 @@
void LCodeGenBase::DeoptComment(const Deoptimizer::Reason& reason) {
- Comment(";;; deoptimize %s: %s", reason.mnemonic,
- reason.detail == NULL ? "unknown reason" : reason.detail);
+ OStringStream os;
+ os << ";;; deoptimize at " << HSourcePosition(reason.raw_position) << " "
+ << reason.mnemonic;
+ if (reason.detail != NULL) os << ": " << reason.detail;
+ Comment("%s", os.c_str());
}
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Mon Sep 22
06:36:57 2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Mon Sep 22
09:05:22 2014 UTC
@@ -860,7 +860,8 @@
__ bind(&skip);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to handle condition, build frame, or
// restore caller doubles.
=======================================
--- /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc Mon Sep 22
06:36:57 2014 UTC
+++ /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc Mon Sep 22
09:05:22 2014 UTC
@@ -810,7 +810,8 @@
__ bind(&skip);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to handle condition, build frame, or
// restore caller doubles.
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Mon Sep 22
06:36:57 2014 UTC
+++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Mon Sep 22
09:05:22 2014 UTC
@@ -774,7 +774,8 @@
__ bind(&done);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
// Go through jump table if we need to handle condition, build frame, or
// restore caller doubles.
=======================================
--- /branches/bleeding_edge/src/x87/lithium-codegen-x87.cc Mon Sep 22
06:36:57 2014 UTC
+++ /branches/bleeding_edge/src/x87/lithium-codegen-x87.cc Mon Sep 22
09:05:22 2014 UTC
@@ -1148,7 +1148,8 @@
__ bind(&done);
}
- Deoptimizer::Reason reason(instr->Mnemonic(), detail);
+ Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(),
+ instr->Mnemonic(), detail);
DCHECK(info()->IsStub() || frame_is_built_);
if (cc == no_condition && frame_is_built_) {
DeoptComment(reason);
--
--
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/d/optout.