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

Unified Diff: src/deoptimizer.cc

Issue 984773003: CpuProfiler: fix for GetDeoptReason code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: win platform was fixed Created 5 years, 9 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
« src/cpu-profiler.cc ('K') | « src/deoptimizer.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index d45ca228fd5752686fca1ddf8bbfb2c4ec6cf72d..979b4e95e58db1019065591fa853e9e14660d78a 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -770,7 +770,7 @@ void Deoptimizer::DoComputeOutputFrames() {
fp_to_sp_delta_);
if (bailout_type_ == EAGER || bailout_type_ == SOFT ||
(compiled_code_->is_hydrogen_stub())) {
- compiled_code_->PrintDeoptLocation(trace_scope_->file(), bailout_id_);
+ compiled_code_->PrintDeoptLocation(trace_scope_->file(), from_);
}
}
@@ -3649,34 +3649,20 @@ const char* Deoptimizer::GetDeoptReason(DeoptReason deopt_reason) {
}
-Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, int bailout_id) {
+Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, Address pc) {
SourcePosition last_position = SourcePosition::Unknown();
- Isolate* isolate = code->GetIsolate();
Deoptimizer::DeoptReason last_reason = Deoptimizer::kNoReason;
int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) |
- RelocInfo::ModeMask(RelocInfo::POSITION) |
- RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
+ RelocInfo::ModeMask(RelocInfo::POSITION);
for (RelocIterator it(code, mask); !it.done(); it.next()) {
RelocInfo* info = it.rinfo();
+ if (info->pc() >= pc) return DeoptInfo(last_position, NULL, last_reason);
if (info->rmode() == RelocInfo::POSITION) {
int raw_position = static_cast<int>(info->data());
last_position = raw_position ? SourcePosition::FromRaw(raw_position)
: SourcePosition::Unknown();
} else if (info->rmode() == RelocInfo::DEOPT_REASON) {
last_reason = static_cast<Deoptimizer::DeoptReason>(info->data());
- } else if (last_reason != Deoptimizer::kNoReason) {
- if ((bailout_id ==
- Deoptimizer::GetDeoptimizationId(isolate, info->target_address(),
- Deoptimizer::EAGER)) ||
- (bailout_id ==
- Deoptimizer::GetDeoptimizationId(isolate, info->target_address(),
- Deoptimizer::SOFT)) ||
- (bailout_id ==
- Deoptimizer::GetDeoptimizationId(isolate, info->target_address(),
- Deoptimizer::LAZY))) {
- CHECK(RelocInfo::IsRuntimeEntry(info->rmode()));
- return DeoptInfo(last_position, NULL, last_reason);
- }
}
}
return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason);
« src/cpu-profiler.cc ('K') | « src/deoptimizer.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698