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

Side by Side Diff: src/arm/lithium-codegen-arm.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/arm/deoptimizer-arm.cc ('k') | src/arm64/deoptimizer-arm64.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/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 329
330 Register entry_offset = scratch0(); 330 Register entry_offset = scratch0();
331 331
332 int length = jump_table_.length(); 332 int length = jump_table_.length();
333 for (int i = 0; i < length; i++) { 333 for (int i = 0; i < length; i++) {
334 Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i]; 334 Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i];
335 __ bind(&table_entry->label); 335 __ bind(&table_entry->label);
336 336
337 DCHECK_EQ(jump_table_[0].bailout_type, table_entry->bailout_type); 337 DCHECK_EQ(jump_table_[0].bailout_type, table_entry->bailout_type);
338 Address entry = table_entry->address; 338 Address entry = table_entry->address;
339 DeoptComment(table_entry->reason); 339 DeoptComment(table_entry->deopt_info);
340 340
341 // Second-level deopt table entries are contiguous and small, so instead 341 // Second-level deopt table entries are contiguous and small, so instead
342 // of loading the full, absolute address of each one, load an immediate 342 // of loading the full, absolute address of each one, load an immediate
343 // offset which will be added to the base address later. 343 // offset which will be added to the base address later.
344 __ mov(entry_offset, Operand(entry - base)); 344 __ mov(entry_offset, Operand(entry - base));
345 345
346 if (table_entry->needs_frame) { 346 if (table_entry->needs_frame) {
347 DCHECK(!info()->saves_caller_doubles()); 347 DCHECK(!info()->saves_caller_doubles());
348 if (needs_frame.is_bound()) { 348 if (needs_frame.is_bound()) {
349 __ b(&needs_frame); 349 __ b(&needs_frame);
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 if (condition != al) { 886 if (condition != al) {
887 condition = ne; 887 condition = ne;
888 __ cmp(scratch, Operand::Zero()); 888 __ cmp(scratch, Operand::Zero());
889 } 889 }
890 } 890 }
891 891
892 if (info()->ShouldTrapOnDeopt()) { 892 if (info()->ShouldTrapOnDeopt()) {
893 __ stop("trap_on_deopt", condition); 893 __ stop("trap_on_deopt", condition);
894 } 894 }
895 895
896 Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(), 896 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position().raw(),
897 instr->Mnemonic(), deopt_reason); 897 instr->Mnemonic(), deopt_reason);
898 DCHECK(info()->IsStub() || frame_is_built_); 898 DCHECK(info()->IsStub() || frame_is_built_);
899 // Go through jump table if we need to handle condition, build frame, or 899 // Go through jump table if we need to handle condition, build frame, or
900 // restore caller doubles. 900 // restore caller doubles.
901 if (condition == al && frame_is_built_ && 901 if (condition == al && frame_is_built_ &&
902 !info()->saves_caller_doubles()) { 902 !info()->saves_caller_doubles()) {
903 DeoptComment(reason); 903 DeoptComment(deopt_info);
904 __ Call(entry, RelocInfo::RUNTIME_ENTRY); 904 __ Call(entry, RelocInfo::RUNTIME_ENTRY);
905 } else { 905 } else {
906 Deoptimizer::JumpTableEntry table_entry(entry, reason, bailout_type, 906 Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type,
907 !frame_is_built_); 907 !frame_is_built_);
908 // We often have several deopts to the same entry, reuse the last 908 // We often have several deopts to the same entry, reuse the last
909 // jump entry if this is the case. 909 // jump entry if this is the case.
910 if (jump_table_.is_empty() || 910 if (jump_table_.is_empty() ||
911 !table_entry.IsEquivalentTo(jump_table_.last())) { 911 !table_entry.IsEquivalentTo(jump_table_.last())) {
912 jump_table_.Add(table_entry, zone()); 912 jump_table_.Add(table_entry, zone());
913 } 913 }
914 __ b(condition, &jump_table_.last().label); 914 __ b(condition, &jump_table_.last().label);
915 } 915 }
916 } 916 }
(...skipping 5059 matching lines...) Expand 10 before | Expand all | Expand 10 after
5976 __ Push(scope_info); 5976 __ Push(scope_info);
5977 __ push(ToRegister(instr->function())); 5977 __ push(ToRegister(instr->function()));
5978 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5978 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5979 RecordSafepoint(Safepoint::kNoLazyDeopt); 5979 RecordSafepoint(Safepoint::kNoLazyDeopt);
5980 } 5980 }
5981 5981
5982 5982
5983 #undef __ 5983 #undef __
5984 5984
5985 } } // namespace v8::internal 5985 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/deoptimizer-arm.cc ('k') | src/arm64/deoptimizer-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698