Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika

Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU
This commit is contained in:
Doug Thayer
2018-04-29 18:21:20 -07:00
parent 72636530a3
commit c6c9d870ab
44 changed files with 249 additions and 1388 deletions

View File

@@ -9,6 +9,7 @@
#include "base/process_util.h"
#include "mozilla/Attributes.h"
#include "mozilla/AutoRestore.h"
#include "mozilla/BackgroundHangMonitor.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/ipc/CrashReporterClient.h"
@@ -656,7 +657,7 @@ PluginModuleChromeParent::PluginModuleChromeParent(const char* aFilePath,
mSandboxLevel = aSandboxLevel;
mRunID = GeckoChildProcessHost::GetUniqueID();
mozilla::HangMonitor::RegisterAnnotator(*this);
mozilla::BackgroundHangMonitor::RegisterAnnotator(*this);
}
PluginModuleChromeParent::~PluginModuleChromeParent()
@@ -709,7 +710,7 @@ PluginModuleChromeParent::~PluginModuleChromeParent()
}
#endif
mozilla::HangMonitor::UnregisterAnnotator(*this);
mozilla::BackgroundHangMonitor::UnregisterAnnotator(*this);
}
void
@@ -988,16 +989,16 @@ PluginModuleChromeParent::ExitedCxxStack()
}
/**
* This function is always called by the HangMonitor thread.
* This function is always called by the BackgroundHangMonitor thread.
*/
void
PluginModuleChromeParent::AnnotateHang(mozilla::HangMonitor::HangAnnotations& aAnnotations)
PluginModuleChromeParent::AnnotateHang(mozilla::BackgroundHangAnnotations& aAnnotations)
{
uint32_t flags = mHangAnnotationFlags;
if (flags) {
/* We don't actually annotate anything specifically for kInPluginCall;
we use it to determine whether to annotate other things. It will
be pretty obvious from the ChromeHang stack that we're in a plugin
be pretty obvious from the hang stack that we're in a plugin
call when the hang occurred. */
if (flags & kHangUIShown) {
aAnnotations.AddAnnotation(NS_LITERAL_STRING("HangUIShown"),