This is an automated email from the ASF dual-hosted git repository. joemcdonnell pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit c7938976ace95e5a95bd296c44807f12e7a813dc Author: Yida Wu <[email protected]> AuthorDate: Wed Jan 11 13:48:21 2023 -0800 IMPALA-11836: Remove duplicated information in codegen cache logs The patch removes duplicated logs when a codegen cache is stored and also removes the query id from the codegen cache logs because the information is already included in the log. Tests: Passed core tests. Change-Id: I6a19ea4394c651d1cf64fce92375e7fa5cb09baa Reviewed-on: http://gerrit.cloudera.org:8080/19415 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- be/src/codegen/llvm-codegen.cc | 12 +++++------- be/src/codegen/llvm-codegen.h | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/be/src/codegen/llvm-codegen.cc b/be/src/codegen/llvm-codegen.cc index 27205580f..f0bfbaf7a 100644 --- a/be/src/codegen/llvm-codegen.cc +++ b/be/src/codegen/llvm-codegen.cc @@ -1220,7 +1220,8 @@ Status LlvmCodeGen::StoreCache(CodeGenCacheKey& cache_key) { Status store_status = ExecEnv::GetInstance()->codegen_cache()->Store( cache_key, this, state_->query_options().codegen_cache_mode); LOG(INFO) << DebugCacheEntryString(cache_key, false /*is_lookup*/, - CodeGenCacheModeAnalyzer::is_debug(state_->query_options().codegen_cache_mode)); + CodeGenCacheModeAnalyzer::is_debug(state_->query_options().codegen_cache_mode), + store_status.ok()); return store_status; } @@ -1341,8 +1342,6 @@ Status LlvmCodeGen::FinalizeModule() { if (codegen_cache_enabled) { SCOPED_TIMER(codegen_cache_save_timer_); store_cache_status = StoreCache(cache_key); - LOG(INFO) << DebugCacheEntryString(cache_key, false /*is_lookup*/, - CodeGenCacheModeAnalyzer::is_debug(state_->query_options().codegen_cache_mode)); } // If the codegen is stored to the cache successfully, the cache will be responsible to // track the memory consumption instead. @@ -1986,8 +1985,8 @@ string LlvmCodeGen::DiagnosticHandler::GetErrorString() { return ""; } -string LlvmCodeGen::DebugCacheEntryString( - CodeGenCacheKey& key, bool is_lookup, bool debug_mode, bool success) const { +string LlvmCodeGen::DebugCacheEntryString(CodeGenCacheKey& key, bool is_lookup, + bool debug_mode, bool success) const { stringstream out; if (is_lookup) { out << "Look up codegen cache "; @@ -2004,9 +2003,8 @@ string LlvmCodeGen::DebugCacheEntryString( } } out << "CodeGen Cache Key hash_code=" << key.hash_code(); - out << " query_id=" << PrintId(state_->query_id()) << "\n"; if (UNLIKELY(debug_mode)) { - out << "Fragment Plan: " << apache::thrift::ThriftDebugString(state_->fragment()) + out << "\nFragment Plan: " << apache::thrift::ThriftDebugString(state_->fragment()) << "\n"; out << "CodeGen Functions: \n"; for (int i = 0; i < fns_to_jit_compile_.size(); ++i) { diff --git a/be/src/codegen/llvm-codegen.h b/be/src/codegen/llvm-codegen.h index edc2665f4..d9c4c22a7 100644 --- a/be/src/codegen/llvm-codegen.h +++ b/be/src/codegen/llvm-codegen.h @@ -190,8 +190,8 @@ class LlvmCodeGen { /// Turns on/off optimization passes void EnableOptimizations(bool enable); - std::string DebugCacheEntryString( - CodeGenCacheKey& key, bool is_lookup, bool debug_mode, bool success = true) const; + std::string DebugCacheEntryString(CodeGenCacheKey& key, bool is_lookup, bool debug_mode, + bool success) const; /// For debugging. Returns the IR that was generated. If full_module, the /// entire module is dumped, including what was loaded from precompiled IR.
