Bug 1276540 - remove dead instrumentation in xptiInterfaceInfo.cpp; r=erahm
authorNathan Froyd <froydnj@gmail.com>
Tue, 07 Jun 2016 17:09:41 -0400
changeset 300893 dec55e893640ed288c34e3398b3c4037fb71511d
parent 300892 a29db603cf6ec486f6065b1e4471befda71fa6da
child 300894 be7175764dc766594c5287ca184fc7a5c2f392d8
push id19599
push usercbook@mozilla.com
push dateWed, 08 Jun 2016 10:16:21 +0000
treeherderfx-team@81f4cc3f6f4c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1276540
milestone50.0a1
Bug 1276540 - remove dead instrumentation in xptiInterfaceInfo.cpp; r=erahm Doubt anybody has compiled with the appropriate #define in a while, and there's no evidence of the associated DEBUG_* constants being used.
xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp
--- a/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp
@@ -9,44 +9,16 @@
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/XPTInterfaceInfoManager.h"
 #include "mozilla/PodOperations.h"
 #include "jsapi.h"
 
 using namespace mozilla;
 
-/***************************************************************************/
-// Debug Instrumentation...
-
-#ifdef SHOW_INFO_COUNT_STATS
-static int DEBUG_TotalInfos = 0;
-static int DEBUG_CurrentInfos = 0;
-static int DEBUG_MaxInfos = 0;
-static int DEBUG_ReentrantMonitorEntryCount = 0;
-
-#define LOG_INFO_CREATE(t)                                                  \
-    DEBUG_TotalInfos++;                                                     \
-    DEBUG_CurrentInfos++;                                                   \
-    if(DEBUG_MaxInfos < DEBUG_CurrentInfos)                                 \
-        DEBUG_MaxInfos = DEBUG_CurrentInfos /* no ';' */
-
-#define LOG_INFO_DESTROY(t)                                                 \
-    DEBUG_CurrentInfos-- /* no ';' */
-
-#define LOG_INFO_MONITOR_ENTRY                                              \
-    DEBUG_ReentrantMonitorEntryCount++ /* no ';' */
-
-#else /* SHOW_INFO_COUNT_STATS */
-
-#define LOG_INFO_CREATE(t)     ((void)0)
-#define LOG_INFO_DESTROY(t)    ((void)0)
-#define LOG_INFO_MONITOR_ENTRY ((void)0)
-#endif /* SHOW_INFO_COUNT_STATS */
-
 /* static */ xptiInterfaceEntry*
 xptiInterfaceEntry::Create(const char* name, const nsID& iid,
                            XPTInterfaceDescriptor* aDescriptor,
                            xptiTypelibGuts* aTypelib)
 {
     int namelen = strlen(name);
     void* place =
         XPT_CALLOC8(gXPTIStructArena, sizeof(xptiInterfaceEntry) + namelen);
@@ -658,17 +630,16 @@ xptiInterfaceEntry::HasAncestor(const ns
 
 already_AddRefed<xptiInterfaceInfo> 
 xptiInterfaceEntry::InterfaceInfo()
 {
 #ifdef DEBUG
     XPTInterfaceInfoManager::GetSingleton()->mWorkingSet.mTableReentrantMonitor.
         AssertCurrentThreadIn();
 #endif
-    LOG_INFO_MONITOR_ENTRY;
 
     if(!mInfo)
     {
         mInfo = new xptiInterfaceInfo(this);
     }
     
     RefPtr<xptiInterfaceInfo> info = mInfo;
     return info.forget();
@@ -700,22 +671,20 @@ xptiInterfaceInfo::BuildParent()
 
 /***************************************************************************/
 
 NS_IMPL_QUERY_INTERFACE(xptiInterfaceInfo, nsIInterfaceInfo)
 
 xptiInterfaceInfo::xptiInterfaceInfo(xptiInterfaceEntry* entry)
     : mEntry(entry)
 {
-    LOG_INFO_CREATE(this);
 }
 
 xptiInterfaceInfo::~xptiInterfaceInfo() 
 {
-    LOG_INFO_DESTROY(this);
     NS_ASSERTION(!mEntry, "bad state in dtor");
 }
 
 void
 xptiInterfaceInfo::Invalidate()
 {
   mParent = nullptr;
   mEntry = nullptr;
@@ -735,17 +704,16 @@ xptiInterfaceInfo::Release(void)
     xptiInterfaceEntry* entry = mEntry;
     nsrefcnt cnt = --mRefCnt;
     NS_LOG_RELEASE(this, cnt, "xptiInterfaceInfo");
     if(!cnt)
     {
         mozilla::ReentrantMonitorAutoEnter monitor(XPTInterfaceInfoManager::
                                           GetSingleton()->mWorkingSet.
                                           mTableReentrantMonitor);
-        LOG_INFO_MONITOR_ENTRY;
 
         // If InterfaceInfo added and *released* a reference before we 
         // acquired the monitor then 'this' might already be dead. In that
         // case we would not want to try to access any instance data. We
         // would want to bail immediately. If 'this' is already dead then the
         // entry will no longer have a pointer to 'this'. So, we can protect 
         // ourselves from danger without more aggressive locking.
         if(entry && !entry->InterfaceInfoEquals(this))