From 8b998650341eca3d8dd5a11b5330648b16ec4e91 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sat, 12 May 2018 00:33:12 +0000 Subject: [PATCH] [LanguageRuntime/ObjC] Turn off ISA logging once and for all. On behalf of Jim, who's out today. llvm-svn: 332163 --- .../ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index 4605eff..e2602ec 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -1437,6 +1437,8 @@ uint32_t AppleObjCRuntimeV2::ParseClassInfoArray(const DataExtractor &data, // } __attribute__((__packed__)); Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES)); + bool should_log = log && log->GetVerbose(); + uint32_t num_parsed = 0; // Iterate through all ClassInfo structures @@ -1445,7 +1447,7 @@ uint32_t AppleObjCRuntimeV2::ParseClassInfoArray(const DataExtractor &data, ObjCISA isa = data.GetPointer(&offset); if (isa == 0) { - if (log && log->GetVerbose()) + if (should_log) log->Printf( "AppleObjCRuntimeV2 found NULL isa, ignoring this class info"); continue; @@ -1453,7 +1455,7 @@ uint32_t AppleObjCRuntimeV2::ParseClassInfoArray(const DataExtractor &data, // Check if we already know about this ISA, if we do, the info will never // change, so we can just skip it. if (ISAIsCached(isa)) { - if (log) + if (should_log) log->Printf("AppleObjCRuntimeV2 found cached isa=0x%" PRIx64 ", ignoring this class info", isa); @@ -1464,14 +1466,14 @@ uint32_t AppleObjCRuntimeV2::ParseClassInfoArray(const DataExtractor &data, ClassDescriptorSP descriptor_sp(new ClassDescriptorV2(*this, isa, NULL)); AddClass(isa, descriptor_sp, name_hash); num_parsed++; - if (log) + if (should_log) log->Printf("AppleObjCRuntimeV2 added isa=0x%" PRIx64 ", hash=0x%8.8x, name=%s", isa, name_hash, descriptor_sp->GetClassName().AsCString("")); } } - if (log) + if (should_log) log->Printf("AppleObjCRuntimeV2 parsed %" PRIu32 " class infos", num_parsed); return num_parsed; -- 2.7.4