Suppress crossgen warnings on failures to load types/methods from IBC data. (dotnet...
authorFadi Hanna <fadim@microsoft.com>
Thu, 16 May 2019 14:19:31 +0000 (07:19 -0700)
committerGitHub <noreply@github.com>
Thu, 16 May 2019 14:19:31 +0000 (07:19 -0700)
It's not unusual to see these types of warnings with incremental IBC.
These warnings will move under the crossgen verbose mode.

Commit migrated from https://github.com/dotnet/coreclr/commit/ff61bfc8aa9f0f71feddc8c03d824b13cc61215c

src/coreclr/src/vm/ceeload.cpp
src/coreclr/src/zap/zapimage.cpp

index 1541ccf..e389df9 100644 (file)
@@ -7179,7 +7179,9 @@ TypeHandle Module::LoadIBCTypeHelper(DataImage *image, CORBBTPROF_BLOB_PARAM_SIG
     }
     EX_CATCH
     {
-        image->GetPreloader()->Error(pBlobSigEntry->blob.token, GET_EXCEPTION());
+        if (g_CorCompileVerboseLevel >= CORCOMPILE_VERBOSE)
+            image->GetPreloader()->Error(pBlobSigEntry->blob.token, GET_EXCEPTION());
+
         loadedType = TypeHandle();
     }
     EX_END_CATCH(SwallowAllExceptions)
@@ -7236,7 +7238,9 @@ MethodDesc* Module::LoadIBCMethodHelper(DataImage *image, CORBBTPROF_BLOB_PARAM_
     }
     EX_CATCH
     {
-        image->GetPreloader()->Error(pBlobSigEntry->blob.token, GET_EXCEPTION());
+        if (g_CorCompileVerboseLevel >= CORCOMPILE_VERBOSE)
+            image->GetPreloader()->Error(pBlobSigEntry->blob.token, GET_EXCEPTION());
+
         enclosingType = TypeHandle();
     }
     EX_END_CATCH(SwallowAllExceptions)
index a70b710..e64c0b6 100644 (file)
@@ -3573,6 +3573,10 @@ void ZapImage::Error(mdToken token, HRESULT hr, UINT resID,  LPCWSTR message)
     if ((resID == IDS_IBC_MISSING_EXTERNAL_TYPE) ||
         (resID == IDS_IBC_MISSING_EXTERNAL_METHOD))
     {
+        // Suppress printing IBC related warnings except in verbose mode.
+        if (m_zapper->m_pOpt->m_ignoreErrors && !m_zapper->m_pOpt->m_verbose)
+            return;
+
         // Supress printing of "The generic type/method specified by the IBC data is not available to this assembly"
         level = CORZAP_LOGLEVEL_INFO;
     }