From 62e074f0d1a18f0f5aa6716f000825704f55e81b Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Tue, 7 Apr 2015 18:09:37 +0100 Subject: 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 --- compiler/optimizing/graph_visualizer.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'compiler/optimizing/graph_visualizer.cc') diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index 49c0d3884f..4c283788b5 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); -- cgit v1.2.3