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

Unified Diff: src/profile-generator.cc

Issue 1045753002: CpuProfiler: public API for deopt info in cpu profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: unnecessary typedef was removed 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 385e753025b58c9c91e3798685b13a3a3e97dfa9..895c008e0b5c7bd94d87e241bb3109b83e3ddb99 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -112,15 +112,14 @@ void CodeEntry::FillFunctionInfo(SharedFunctionInfo* shared) {
}
-DeoptInfo CodeEntry::GetDeoptInfo() {
+CpuProfileDeoptInfo CodeEntry::GetDeoptInfo() {
DCHECK(has_deopt_info());
- DeoptInfo info;
+ CpuProfileDeoptInfo info;
info.deopt_reason = deopt_reason_;
if (inlined_function_infos_.empty()) {
- info.stack.push_back(DeoptInfo::Frame(
- {script_id_,
- static_cast<int>(position_ + deopt_position_.position())}));
+ info.stack.push_back(CpuProfileDeoptFrame(
+ {script_id_, position_ + deopt_position_.position()}));
return info;
}
// Copy the only branch from the inlining tree where the deopt happened.
@@ -136,9 +135,9 @@ DeoptInfo CodeEntry::GetDeoptInfo() {
}
while (inlining_id != InlinedFunctionInfo::kNoParentId) {
InlinedFunctionInfo& inlined_info = inlined_function_infos_.at(inlining_id);
- info.stack.push_back(DeoptInfo::Frame(
- {inlined_info.script_id,
- static_cast<int>(inlined_info.start_position + position.raw())}));
+ info.stack.push_back(
+ CpuProfileDeoptFrame({inlined_info.script_id,
+ inlined_info.start_position + position.raw()}));
position = inlined_info.inline_position;
inlining_id = inlined_info.parent_id;
}
@@ -216,7 +215,7 @@ void ProfileNode::Print(int indent) {
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) {
- DeoptInfo& info = deopt_infos_[i];
+ CpuProfileDeoptInfo& 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