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

Unified Diff: src/compiler/escape-analysis-reducer.cc

Issue 1559003002: [turbofan] Add performance counters for escape analysis (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@improve-node-cache
Patch Set: Rebase Created 4 years, 11 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/compiler/escape-analysis-reducer.h ('k') | src/counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/escape-analysis-reducer.cc
diff --git a/src/compiler/escape-analysis-reducer.cc b/src/compiler/escape-analysis-reducer.cc
index 1fece43fc3d2236adcc703ef7884efcecbab7723..9ecd264863bc64b00860543cf72bed41d7fb41e3 100644
--- a/src/compiler/escape-analysis-reducer.cc
+++ b/src/compiler/escape-analysis-reducer.cc
@@ -5,7 +5,7 @@
#include "src/compiler/escape-analysis-reducer.h"
#include "src/compiler/js-graph.h"
-#include "src/compiler/js-operator.h"
+#include "src/counters.h"
namespace v8 {
namespace internal {
@@ -50,6 +50,7 @@ Reduction EscapeAnalysisReducer::ReduceLoad(Node* node) {
DCHECK(node->opcode() == IrOpcode::kLoadField ||
node->opcode() == IrOpcode::kLoadElement);
if (Node* rep = escape_analysis()->GetReplacement(node)) {
+ counters()->turbo_escape_loads_replaced()->Increment();
if (FLAG_trace_turbo_escape) {
PrintF("Replaced #%d (%s) with #%d (%s)\n", node->id(),
node->op()->mnemonic(), rep->id(), rep->op()->mnemonic());
@@ -80,6 +81,7 @@ Reduction EscapeAnalysisReducer::ReduceAllocate(Node* node) {
DCHECK_EQ(node->opcode(), IrOpcode::kAllocate);
if (escape_analysis()->IsVirtual(node)) {
RelaxEffectsAndControls(node);
+ counters()->turbo_escape_allocs_replaced()->Increment();
if (FLAG_trace_turbo_escape) {
PrintF("Removed allocate #%d from effect chain\n", node->id());
}
@@ -187,6 +189,10 @@ Reduction EscapeAnalysisReducer::ReplaceWithDeoptDummy(Node* node) {
}
+Counters* EscapeAnalysisReducer::counters() const {
+ return jsgraph_->isolate()->counters();
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/escape-analysis-reducer.h ('k') | src/counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698