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

Side by Side Diff: src/mips64/lithium-codegen-mips64.cc

Issue 910773002: Propagate Deopt reason to cpu-profiler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 5 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
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 Comment(";;; -------------------- Jump table --------------------"); 302 Comment(";;; -------------------- Jump table --------------------");
303 } 303 }
304 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); 304 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
305 Label table_start; 305 Label table_start;
306 __ bind(&table_start); 306 __ bind(&table_start);
307 Label needs_frame; 307 Label needs_frame;
308 for (int i = 0; i < jump_table_.length(); i++) { 308 for (int i = 0; i < jump_table_.length(); i++) {
309 Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i]; 309 Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i];
310 __ bind(&table_entry->label); 310 __ bind(&table_entry->label);
311 Address entry = table_entry->address; 311 Address entry = table_entry->address;
312 DeoptComment(table_entry->reason); 312 DeoptComment(table_entry->deopt_info);
313 __ li(t9, Operand(ExternalReference::ForDeoptEntry(entry))); 313 __ li(t9, Operand(ExternalReference::ForDeoptEntry(entry)));
314 if (table_entry->needs_frame) { 314 if (table_entry->needs_frame) {
315 DCHECK(!info()->saves_caller_doubles()); 315 DCHECK(!info()->saves_caller_doubles());
316 if (needs_frame.is_bound()) { 316 if (needs_frame.is_bound()) {
317 __ Branch(&needs_frame); 317 __ Branch(&needs_frame);
318 } else { 318 } else {
319 __ bind(&needs_frame); 319 __ bind(&needs_frame);
320 __ MultiPush(cp.bit() | fp.bit() | ra.bit()); 320 __ MultiPush(cp.bit() | fp.bit() | ra.bit());
321 // This variant of deopt can only be used with stubs. Since we don't 321 // This variant of deopt can only be used with stubs. Since we don't
322 // have a function pointer to install in the stack frame that we're 322 // have a function pointer to install in the stack frame that we're
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 799
800 if (info()->ShouldTrapOnDeopt()) { 800 if (info()->ShouldTrapOnDeopt()) {
801 Label skip; 801 Label skip;
802 if (condition != al) { 802 if (condition != al) {
803 __ Branch(&skip, NegateCondition(condition), src1, src2); 803 __ Branch(&skip, NegateCondition(condition), src1, src2);
804 } 804 }
805 __ stop("trap_on_deopt"); 805 __ stop("trap_on_deopt");
806 __ bind(&skip); 806 __ bind(&skip);
807 } 807 }
808 808
809 Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(), 809 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position().raw(),
810 instr->Mnemonic(), deopt_reason); 810 instr->Mnemonic(), deopt_reason);
811 DCHECK(info()->IsStub() || frame_is_built_); 811 DCHECK(info()->IsStub() || frame_is_built_);
812 // Go through jump table if we need to handle condition, build frame, or 812 // Go through jump table if we need to handle condition, build frame, or
813 // restore caller doubles. 813 // restore caller doubles.
814 if (condition == al && frame_is_built_ && 814 if (condition == al && frame_is_built_ &&
815 !info()->saves_caller_doubles()) { 815 !info()->saves_caller_doubles()) {
816 DeoptComment(reason); 816 DeoptComment(deopt_info);
817 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2); 817 __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2);
818 } else { 818 } else {
819 Deoptimizer::JumpTableEntry table_entry(entry, reason, bailout_type, 819 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type,
820 !frame_is_built_); 820 !frame_is_built_);
821 // We often have several deopts to the same entry, reuse the last 821 // We often have several deopts to the same entry, reuse the last
822 // jump entry if this is the case. 822 // jump entry if this is the case.
823 if (jump_table_.is_empty() || 823 if (jump_table_.is_empty() ||
824 !table_entry.IsEquivalentTo(jump_table_.last())) { 824 !table_entry.IsEquivalentTo(jump_table_.last())) {
825 jump_table_.Add(table_entry, zone()); 825 jump_table_.Add(table_entry, zone());
826 } 826 }
827 __ Branch(&jump_table_.last().label, condition, src1, src2); 827 __ Branch(&jump_table_.last().label, condition, src1, src2);
828 } 828 }
829 } 829 }
(...skipping 5226 matching lines...) Expand 10 before | Expand all | Expand 10 after
6056 __ li(at, scope_info); 6056 __ li(at, scope_info);
6057 __ Push(at, ToRegister(instr->function())); 6057 __ Push(at, ToRegister(instr->function()));
6058 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6058 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6059 RecordSafepoint(Safepoint::kNoLazyDeopt); 6059 RecordSafepoint(Safepoint::kNoLazyDeopt);
6060 } 6060 }
6061 6061
6062 6062
6063 #undef __ 6063 #undef __
6064 6064
6065 } } // namespace v8::internal 6065 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698