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

Unified Diff: src/profile-generator.cc

Issue 915173005: Revert of CPUProfiler: Push deopt reason further to ProfileNode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/profile-generator.h ('k') | src/profile-generator-inl.h » ('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 490cb83d75209943e09e0f65c13574181c63cd79..777be3fbd143a38844d6c13452b60c17e06d9b08 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -8,7 +8,6 @@
#include "src/compiler.h"
#include "src/debug.h"
-#include "src/deoptimizer.h"
#include "src/global-handles.h"
#include "src/sampler.h"
#include "src/scopeinfo.h"
@@ -159,9 +158,7 @@
const char* const CodeEntry::kEmptyNamePrefix = "";
const char* const CodeEntry::kEmptyResourceName = "";
-const char* const CodeEntry::kEmptyBailoutReason =
- GetBailoutReason(BailoutReason::kNoReason);
-const char* const CodeEntry::kNoDeoptReason = "";
+const char* const CodeEntry::kEmptyBailoutReason = "";
CodeEntry::~CodeEntry() {
@@ -215,12 +212,6 @@
}
-void ProfileNode::CollectDeoptInfo(CodeEntry* entry) {
- deopt_infos_.Add(DeoptInfo(entry->deopt_reason(), entry->deopt_location()));
- entry->clear_deopt_info();
-}
-
-
ProfileNode* ProfileNode::FindChild(CodeEntry* entry) {
HashMap::Entry* map_entry =
children_.Lookup(entry, CodeEntryHash(entry), false);
@@ -232,15 +223,13 @@
ProfileNode* ProfileNode::FindOrAddChild(CodeEntry* entry) {
HashMap::Entry* map_entry =
children_.Lookup(entry, CodeEntryHash(entry), true);
- ProfileNode* node = reinterpret_cast<ProfileNode*>(map_entry->value);
- if (node == NULL) {
+ if (map_entry->value == NULL) {
// New node added.
- node = new ProfileNode(tree_, entry);
- map_entry->value = node;
- children_list_.Add(node);
- }
- if (entry->has_deopt_info()) node->CollectDeoptInfo(entry);
- return node;
+ ProfileNode* new_node = new ProfileNode(tree_, entry);
+ map_entry->value = new_node;
+ children_list_.Add(new_node);
+ }
+ return reinterpret_cast<ProfileNode*>(map_entry->value);
}
@@ -279,21 +268,12 @@
void ProfileNode::Print(int indent) {
- base::OS::Print("%5u %*s %s%s %d #%d", self_ticks_, indent, "",
+ base::OS::Print("%5u %*s %s%s %d #%d %s", self_ticks_, indent, "",
entry_->name_prefix(), entry_->name(), entry_->script_id(),
- id());
+ id(), entry_->bailout_reason());
if (entry_->resource_name()[0] != '\0')
base::OS::Print(" %s:%d", entry_->resource_name(), entry_->line_number());
base::OS::Print("\n");
- for (auto info : deopt_infos_) {
- base::OS::Print("%*s deopted at %d with reason '%s'\n", indent + 10, "",
- info.deopt_location, info.deopt_reason);
- }
- const char* bailout_reason = entry_->bailout_reason();
- if (bailout_reason != GetBailoutReason(BailoutReason::kNoReason)) {
- base::OS::Print("%*s bailed out due to '%s'\n", indent + 10, "",
- bailout_reason);
- }
for (HashMap::Entry* p = children_.Start();
p != NULL;
p = children_.Next(p)) {
« no previous file with comments | « src/profile-generator.h ('k') | src/profile-generator-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698