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

Unified Diff: src/objects.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 20fd66b37eb90b1f1523627350edace29096bfa9..e8bb005dc8b8f46ae88b0b68dc75e3b5ef773e2f 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11084,30 +11084,10 @@ Code* Code::GetCodeAgeStub(Isolate* isolate, Age age, MarkingParity parity) {
void Code::PrintDeoptLocation(FILE* out, int bailout_id) {
- int last_position = 0;
- Deoptimizer::DeoptReason last_reason = Deoptimizer::kNoReason;
- int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) |
- RelocInfo::ModeMask(RelocInfo::POSITION) |
- RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
- for (RelocIterator it(this, mask); !it.done(); it.next()) {
- RelocInfo* info = it.rinfo();
- if (info->rmode() == RelocInfo::POSITION) {
- last_position = static_cast<int>(info->data());
- } 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(
- GetIsolate(), info->target_address(), Deoptimizer::EAGER)) ||
- (bailout_id == Deoptimizer::GetDeoptimizationId(
- GetIsolate(), info->target_address(), Deoptimizer::SOFT)) ||
- (bailout_id == Deoptimizer::GetDeoptimizationId(
- GetIsolate(), info->target_address(), Deoptimizer::LAZY))) {
- CHECK(RelocInfo::IsRuntimeEntry(info->rmode()));
- PrintF(out, " ;;; deoptimize at %d: %s\n", last_position,
- Deoptimizer::GetDeoptReason(last_reason));
- return;
- }
- }
+ Deoptimizer::DeoptInfo info = Deoptimizer::GetDeoptInfo(this, bailout_id);
+ if (info.deopt_reason != Deoptimizer::kNoReason || info.raw_position != 0) {
+ PrintF(out, " ;;; deoptimize at %d: %s\n", info.raw_position,
+ Deoptimizer::GetDeoptReason(info.deopt_reason));
}
}
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698