Fixed bug where "DCI_NUMA" was missing from debug channel names (dotnet/coreclr#21454...
authorOded Hanson <odhanson@microsoft.com>
Mon, 10 Dec 2018 09:49:39 +0000 (11:49 +0200)
committerJan Vorlicek <janvorli@microsoft.com>
Mon, 10 Dec 2018 09:49:39 +0000 (10:49 +0100)
In additional to adding "DCI_NUMA" to dbg_channel_names, a static assertion was added to verify that  dbg_channel_names length is valid. Also added some comments to help developpers not to forget to add corresponding entries in dbg_channel_names.

FIxes dotnet/coreclr#21454

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

src/coreclr/src/pal/src/include/pal/dbgmsg.h
src/coreclr/src/pal/src/misc/dbgmsg.cpp

index 63b3c89..641de90 100644 (file)
@@ -195,6 +195,9 @@ typedef enum
     DCI_SXS,
 #endif // FEATURE_PAL_SXS
     DCI_NUMA,
+    // Please make sure to update dbg_channel_names when adding entries here.
+
+    // Do not remove this line, as it indicates the end of the list
     DCI_LAST
 } DBG_CHANNEL_ID;
 
index f130d6b..72e131c 100644 (file)
@@ -101,8 +101,12 @@ static const char *dbg_channel_names[]=
 #ifdef FEATURE_PAL_SXS
   , "SXS"
 #endif // FEATURE_PAL_SXS
+  , "DCI_NUMA"
 };
 
+// Verify the number of elements in dbg_channel_names
+static_assert_no_msg(_countof(dbg_channel_names) == DCI_LAST);
+
 static const char *dbg_level_names[]=
 {
     "ENTRY",