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

Unified Diff: src/deoptimizer.cc

Issue 959203002: CpuProfiler: replace raw position with SourcePosition for DeoptReason (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix for win32 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/deoptimizer.h ('k') | src/hydrogen-instructions.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 05d3953d79ee630a1c0f625e34634c6882250c53..d45ca228fd5752686fca1ddf8bbfb2c4ec6cf72d 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -3650,7 +3650,7 @@ const char* Deoptimizer::GetDeoptReason(DeoptReason deopt_reason) {
Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, int bailout_id) {
- int last_position = 0;
+ SourcePosition last_position = SourcePosition::Unknown();
Isolate* isolate = code->GetIsolate();
Deoptimizer::DeoptReason last_reason = Deoptimizer::kNoReason;
int mask = RelocInfo::ModeMask(RelocInfo::DEOPT_REASON) |
@@ -3659,7 +3659,9 @@ Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, int bailout_id) {
for (RelocIterator it(code, mask); !it.done(); it.next()) {
RelocInfo* info = it.rinfo();
if (info->rmode() == RelocInfo::POSITION) {
- last_position = static_cast<int>(info->data());
+ 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) {
@@ -3677,6 +3679,6 @@ Deoptimizer::DeoptInfo Deoptimizer::GetDeoptInfo(Code* code, int bailout_id) {
}
}
}
- return DeoptInfo(0, NULL, Deoptimizer::kNoReason);
+ return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason);
}
} } // namespace v8::internal
« no previous file with comments | « src/deoptimizer.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698