summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2015-04-07 18:09:37 +0100
committerDavid Brazdil <dbrazdil@google.com>2015-04-07 18:22:40 +0100
commit62e074f0d1a18f0f5aa6716f000825704f55e81b (patch)
treebad5f57aad20c4303c717240f2dc879d14c19453 /compiler/optimizing/graph_visualizer.cc
parent1b8e8cac2c96f6d2af8e7217f997a30e11c098b5 (diff)
downloadart-62e074f0d1a18f0f5aa6716f000825704f55e81b.zip
art-62e074f0d1a18f0f5aa6716f000825704f55e81b.tar.gz
art-62e074f0d1a18f0f5aa6716f000825704f55e81b.tar.bz2
ART: Print C1vis header only if visualizer enabled
Setting kStringFilter currently suppresses graph dumps of non-matching methods but their headers are still printed. This fixes the issue. Change-Id: Ib33fb20fcca2bf409534a824e7f76f1feb85724d
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r--compiler/optimizing/graph_visualizer.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc
index 49c0d38..4c28378 100644
--- a/compiler/optimizing/graph_visualizer.cc
+++ b/compiler/optimizing/graph_visualizer.cc
@@ -337,13 +337,11 @@ class HGraphVisualizerPrinter : public HGraphVisitor {
HGraphVisualizer::HGraphVisualizer(std::ostream* output,
HGraph* graph,
- const CodeGenerator& codegen,
- const char* method_name)
- : output_(output), graph_(graph), codegen_(codegen) {
- if (output == nullptr) {
- return;
- }
+ const CodeGenerator& codegen)
+ : output_(output), graph_(graph), codegen_(codegen) {}
+void HGraphVisualizer::PrintHeader(const char* method_name) const {
+ DCHECK(output_ != nullptr);
HGraphVisualizerPrinter printer(graph_, *output_, "", true, codegen_);
printer.StartTag("compilation");
printer.PrintProperty("name", method_name);