diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2020-02-04 10:16:51 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2020-02-04 13:22:16 +0000 |
commit | 002eac6f818dc89c75487ba928fbe5901e4f82e8 (patch) | |
tree | f49de3d98802b5bd95ed51a3b46b735f58c77f6d /compiler/optimizing/optimizing_compiler.cc | |
parent | 75bca74ab46799f0b9a2663184efe4735b3bd8c1 (diff) |
Only flush visualizer output at the end of the compilation.
Otherwise multiple threads compiling will mix their output.
Test: run-tests
Bug: 147094528
Change-Id: I905c8874cbe2c02c2d79577024d4606a3784b67a
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index f8eae2fb70..26e081d117 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -137,13 +137,15 @@ class PassObserver : public ValueObject { LOG(INFO) << "TIMINGS " << GetMethodName(); LOG(INFO) << Dumpable<TimingLogger>(timing_logger_); } + if (visualizer_enabled_) { + FlushVisualizer(); + } DCHECK(visualizer_oss_.str().empty()); } - void DumpDisassembly() REQUIRES(!visualizer_dump_mutex_) { + void DumpDisassembly() { if (visualizer_enabled_) { visualizer_.DumpGraphWithDisassembly(); - FlushVisualizer(); } } @@ -158,12 +160,11 @@ class PassObserver : public ValueObject { } private: - void StartPass(const char* pass_name) REQUIRES(!visualizer_dump_mutex_) { + void StartPass(const char* pass_name) { VLOG(compiler) << "Starting pass: " << pass_name; // Dump graph first, then start timer. if (visualizer_enabled_) { visualizer_.DumpGraph(pass_name, /* is_after_pass= */ false, graph_in_bad_state_); - FlushVisualizer(); } if (timing_logger_enabled_) { timing_logger_.StartTiming(pass_name); @@ -178,14 +179,13 @@ class PassObserver : public ValueObject { visualizer_oss_.clear(); } - void EndPass(const char* pass_name, bool pass_change) REQUIRES(!visualizer_dump_mutex_) { + void EndPass(const char* pass_name, bool pass_change) { // Pause timer first, then dump graph. if (timing_logger_enabled_) { timing_logger_.EndTiming(); } if (visualizer_enabled_) { visualizer_.DumpGraph(pass_name, /* is_after_pass= */ true, graph_in_bad_state_); - FlushVisualizer(); } // Validate the HGraph if running in debug mode. |