diff options
Diffstat (limited to 'lldb/source/DataFormatters')
| -rw-r--r-- | lldb/source/DataFormatters/FormatManager.cpp | 56 |
1 files changed, 20 insertions, 36 deletions
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp index 6e5fdf92305..a7006ccf830 100644 --- a/lldb/source/DataFormatters/FormatManager.cpp +++ b/lldb/source/DataFormatters/FormatManager.cpp @@ -660,11 +660,9 @@ FormatManager::GetFormat(ValueObject &valobj, if (log) { log->Printf( "[FormatManager::GetFormat] Cache search success. Returning."); - if (log->GetDebug()) - log->Printf("[FormatManager::GetFormat] Cache hits: %" PRIu64 - " - Cache Misses: %" PRIu64, - m_format_cache.GetCacheHits(), - m_format_cache.GetCacheMisses()); + LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}", + m_format_cache.GetCacheHits(), + m_format_cache.GetCacheMisses()); } return retval; } @@ -705,10 +703,8 @@ FormatManager::GetFormat(ValueObject &valobj, match_data.GetTypeForCache().AsCString("<invalid>")); m_format_cache.SetFormat(match_data.GetTypeForCache(), retval); } - if (log && log->GetDebug()) - log->Printf("[FormatManager::GetFormat] Cache hits: %" PRIu64 - " - Cache Misses: %" PRIu64, - m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses()); + LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}", + m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses()); return retval; } @@ -742,11 +738,9 @@ FormatManager::GetSummaryFormat(ValueObject &valobj, if (log) { log->Printf("[FormatManager::GetSummaryFormat] Cache search success. " "Returning."); - if (log->GetDebug()) - log->Printf("[FormatManager::GetSummaryFormat] Cache hits: %" PRIu64 - " - Cache Misses: %" PRIu64, - m_format_cache.GetCacheHits(), - m_format_cache.GetCacheMisses()); + LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}", + m_format_cache.GetCacheHits(), + m_format_cache.GetCacheMisses()); } return retval; } @@ -787,10 +781,8 @@ FormatManager::GetSummaryFormat(ValueObject &valobj, match_data.GetTypeForCache().AsCString("<invalid>")); m_format_cache.SetSummary(match_data.GetTypeForCache(), retval); } - if (log && log->GetDebug()) - log->Printf("[FormatManager::GetSummaryFormat] Cache hits: %" PRIu64 - " - Cache Misses: %" PRIu64, - m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses()); + LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}", + m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses()); return retval; } @@ -825,11 +817,9 @@ FormatManager::GetSyntheticChildren(ValueObject &valobj, if (log) { log->Printf("[FormatManager::GetSyntheticChildren] Cache search " "success. Returning."); - if (log->GetDebug()) - log->Printf( - "[FormatManager::GetSyntheticChildren] Cache hits: %" PRIu64 - " - Cache Misses: %" PRIu64, - m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses()); + LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}", + m_format_cache.GetCacheHits(), + m_format_cache.GetCacheMisses()); } return retval; } @@ -871,10 +861,8 @@ FormatManager::GetSyntheticChildren(ValueObject &valobj, match_data.GetTypeForCache().AsCString("<invalid>")); m_format_cache.SetSynthetic(match_data.GetTypeForCache(), retval); } - if (log && log->GetDebug()) - log->Printf("[FormatManager::GetSyntheticChildren] Cache hits: %" PRIu64 - " - Cache Misses: %" PRIu64, - m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses()); + LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}", + m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses()); return retval; } #endif @@ -895,11 +883,9 @@ FormatManager::GetValidator(ValueObject &valobj, if (log) { log->Printf( "[FormatManager::GetValidator] Cache search success. Returning."); - if (log->GetDebug()) - log->Printf("[FormatManager::GetValidator] Cache hits: %" PRIu64 - " - Cache Misses: %" PRIu64, - m_format_cache.GetCacheHits(), - m_format_cache.GetCacheMisses()); + LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}", + m_format_cache.GetCacheHits(), + m_format_cache.GetCacheMisses()); } return retval; } @@ -940,10 +926,8 @@ FormatManager::GetValidator(ValueObject &valobj, match_data.GetTypeForCache().AsCString("<invalid>")); m_format_cache.SetValidator(match_data.GetTypeForCache(), retval); } - if (log && log->GetDebug()) - log->Printf("[FormatManager::GetValidator] Cache hits: %" PRIu64 - " - Cache Misses: %" PRIu64, - m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses()); + LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}", + m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses()); return retval; } |

