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

Unified Diff: src/x64/lithium-codegen-x64.cc

Issue 582743002: Emit comment with instruction+reason before deopt calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x87/lithium-codegen-x87.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 9f1c396abf77240ab777cbd19fcba4889c81497a..46456a1ef690e50118c4476ffabe5bcc3ab72ccd 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -303,16 +303,18 @@ bool LCodeGen::GenerateJumpTable() {
Comment(";;; -------------------- Jump table --------------------");
}
for (int i = 0; i < jump_table_.length(); i++) {
- __ bind(&jump_table_[i].label);
- Address entry = jump_table_[i].address;
- Deoptimizer::BailoutType type = jump_table_[i].bailout_type;
+ Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i];
+ __ bind(&table_entry->label);
+ Address entry = table_entry->address;
+ Deoptimizer::BailoutType type = table_entry->bailout_type;
int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
if (id == Deoptimizer::kNotDeoptimizationEntry) {
Comment(";;; jump table entry %d.", i);
} else {
Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
}
- if (jump_table_[i].needs_frame) {
+ DeoptComment(table_entry->mnemonic, table_entry->reason);
+ if (table_entry->needs_frame) {
DCHECK(!info()->saves_caller_doubles());
__ Move(kScratchRegister, ExternalReference::ForDeoptEntry(entry));
if (needs_frame.is_bound()) {
@@ -730,6 +732,7 @@ void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment,
void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
+ const char* reason,
Deoptimizer::BailoutType bailout_type) {
LEnvironment* environment = instr->environment();
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
@@ -779,6 +782,7 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
// restore caller doubles.
if (cc == no_condition && frame_is_built_ &&
!info()->saves_caller_doubles()) {
+ DeoptComment(instr->Mnemonic(), reason);
__ call(entry, RelocInfo::RUNTIME_ENTRY);
} else {
// We often have several deopts to the same entry, reuse the last
@@ -787,9 +791,8 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
jump_table_.last().address != entry ||
jump_table_.last().needs_frame != !frame_is_built_ ||
jump_table_.last().bailout_type != bailout_type) {
- Deoptimizer::JumpTableEntry table_entry(entry,
- bailout_type,
- !frame_is_built_);
+ Deoptimizer::JumpTableEntry table_entry(entry, instr->Mnemonic(), reason,
+ bailout_type, !frame_is_built_);
jump_table_.Add(table_entry, zone());
}
if (cc == no_condition) {
@@ -801,11 +804,12 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
}
-void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr) {
+void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
+ const char* reason) {
Deoptimizer::BailoutType bailout_type = info()->IsStub()
? Deoptimizer::LAZY
: Deoptimizer::EAGER;
- DeoptimizeIf(cc, instr, bailout_type);
+ DeoptimizeIf(cc, instr, reason, bailout_type);
}
@@ -5647,9 +5651,7 @@ void LCodeGen::DoDeoptimize(LDeoptimize* instr) {
if (info()->IsStub() && type == Deoptimizer::EAGER) {
type = Deoptimizer::LAZY;
}
-
- Comment(";;; deoptimize: %s", instr->hydrogen()->reason());
- DeoptimizeIf(no_condition, instr, type);
+ DeoptimizeIf(no_condition, instr, instr->hydrogen()->reason(), type);
}
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x87/lithium-codegen-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698