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

Unified Diff: src/profile-generator.cc

Issue 1062053004: Revert of CpuProfiler: public API for deopt info in cpu profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/profile-generator.h ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index 2123b1ba53a0e795c05dda81b90d8aab29a1c03c..385e753025b58c9c91e3798685b13a3a3e97dfa9 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -112,14 +112,15 @@
}
-CpuProfileDeoptInfo CodeEntry::GetDeoptInfo() {
+DeoptInfo CodeEntry::GetDeoptInfo() {
DCHECK(has_deopt_info());
- CpuProfileDeoptInfo info;
+ DeoptInfo info;
info.deopt_reason = deopt_reason_;
if (inlined_function_infos_.empty()) {
- info.stack.push_back(CpuProfileDeoptInfo::Frame(
- {script_id_, position_ + deopt_position_.position()}));
+ info.stack.push_back(DeoptInfo::Frame(
+ {script_id_,
+ static_cast<int>(position_ + deopt_position_.position())}));
return info;
}
// Copy the only branch from the inlining tree where the deopt happened.
@@ -135,9 +136,9 @@
}
while (inlining_id != InlinedFunctionInfo::kNoParentId) {
InlinedFunctionInfo& inlined_info = inlined_function_infos_.at(inlining_id);
- info.stack.push_back(CpuProfileDeoptInfo::Frame(
+ info.stack.push_back(DeoptInfo::Frame(
{inlined_info.script_id,
- inlined_info.start_position + position.raw()}));
+ static_cast<int>(inlined_info.start_position + position.raw())}));
position = inlined_info.inline_position;
inlining_id = inlined_info.parent_id;
}
@@ -215,7 +216,7 @@
base::OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number());
base::OS::Print("\n");
for (size_t i = 0; i < deopt_infos_.size(); ++i) {
- CpuProfileDeoptInfo& info = deopt_infos_[i];
+ DeoptInfo& info = deopt_infos_[i];
base::OS::Print(
"%*s;;; deopted at script_id: %d position: %d with reason '%s'.\n",
indent + 10, "", info.stack[0].script_id, info.stack[0].position,
« no previous file with comments | « src/profile-generator.h ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698