Skip to content

Commit

Permalink
Bug 1224374 - Profiler labels for the 25 top chrome hangs;r=BenWa,MarcoZ
Browse files Browse the repository at this point in the history
Experience shows that we do not have enough profiler labels to make
BHR hang reports meaningful. This patch adds enough labels to let us
exploit hang reports matching the 25 topmost chrome hangs.
  • Loading branch information
David Rajchenbach-Teller committed Jan 14, 2016
1 parent 91e107a commit a637119
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions accessible/base/NotificationController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ NotificationController::IsUpdatePending()
void
NotificationController::WillRefresh(mozilla::TimeStamp aTime)
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
Telemetry::AutoTimer<Telemetry::A11Y_UPDATE_TIME> updateTimer;

// If the document accessible that notification collector was created for is
Expand Down
1 change: 1 addition & 0 deletions dom/base/nsFrameLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ bool
nsFrameLoader::ShowRemoteFrame(const ScreenIntSize& size,
nsSubDocumentFrame *aFrame)
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS);
NS_ASSERTION(IsRemoteFrame(), "ShowRemote only makes sense on remote frames.");

if (!mRemoteBrowser && !TryRemoteBrowser()) {
Expand Down
2 changes: 2 additions & 0 deletions dom/base/nsJSEnvironment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,8 @@ nsJSContext::ShrinkGCBuffersNow()
static void
FinishAnyIncrementalGC()
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GC);

if (sCCLockedOut) {
// We're in the middle of an incremental GC, so finish it.
JS::PrepareForIncrementalGC(sRuntime);
Expand Down
1 change: 1 addition & 0 deletions dom/base/nsObjectLoadingContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3102,6 +3102,7 @@ nsObjectLoadingContent::DoStopPlugin(nsPluginInstanceOwner* aInstanceOwner,
NS_IMETHODIMP
nsObjectLoadingContent::StopPluginInstance()
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
// Clear any pending events
mPendingInstantiateEvent = nullptr;
mPendingCheckPluginStopEvent = nullptr;
Expand Down
6 changes: 6 additions & 0 deletions dom/ipc/ContentParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,8 @@ ContentParent::CreateBrowserOrApp(const TabContext& aContext,
Element* aFrameElement,
ContentParent* aOpenerContentParent)
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);

if (!sCanLaunchSubprocesses) {
return nullptr;
}
Expand Down Expand Up @@ -2386,6 +2388,8 @@ ContentParent::InitializeMembers()
bool
ContentParent::LaunchSubprocess(ProcessPriority aInitialPriority /* = PROCESS_PRIORITY_FOREGROUND */)
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);

std::vector<std::string> extraArgs;
if (mIsNuwaProcess) {
extraArgs.push_back("-nuwa");
Expand Down Expand Up @@ -3642,6 +3646,8 @@ ContentParent::ForceKillTimerCallback(nsITimer* aTimer, void* aClosure)
void
ContentParent::KillHard(const char* aReason)
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);

// On Windows, calling KillHard multiple times causes problems - the
// process handle becomes invalid on the first call, causing a second call
// to crash our process - more details in bug 890840.
Expand Down
1 change: 1 addition & 0 deletions dom/plugins/base/nsPluginHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,7 @@ nsresult nsPluginHost::EnsurePluginLoaded(nsPluginTag* aPluginTag)
nsresult
nsPluginHost::GetPluginForContentProcess(uint32_t aPluginId, nsNPAPIPlugin** aPlugin)
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
MOZ_ASSERT(XRE_IsParentProcess());

// If plugins haven't been scanned yet, do so now
Expand Down
1 change: 1 addition & 0 deletions dom/plugins/ipc/PluginModuleParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ mozilla::plugins::SetupBridge(uint32_t aPluginId,
nsresult* rv,
uint32_t* runID)
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);
if (NS_WARN_IF(!rv) || NS_WARN_IF(!runID)) {
return false;
}
Expand Down
1 change: 1 addition & 0 deletions gfx/layers/client/TextureClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ static void DestroyTextureData(TextureData* aTextureData, ISurfaceAllocator* aAl
void
TextureChild::ActorDestroy(ActorDestroyReason why)
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS);
mWaitForRecycle = nullptr;

if (mTextureData) {
Expand Down
4 changes: 4 additions & 0 deletions js/xpconnect/wrappers/AddonWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "mozilla/dom/BindingUtils.h"
#include "nsGlobalWindow.h"

#include "GeckoProfiler.h"

#include "nsID.h"

using namespace js;
Expand Down Expand Up @@ -172,6 +174,8 @@ bool
AddonWrapper<Base>::get(JSContext* cx, JS::Handle<JSObject*> wrapper, JS::Handle<Value> receiver,
JS::Handle<jsid> id, JS::MutableHandle<JS::Value> vp) const
{
PROFILER_LABEL_FUNC(js::ProfileEntry::Category::OTHER);

Rooted<JSPropertyDescriptor> desc(cx);
if (!InterposeProperty(cx, wrapper, nullptr, id, &desc))
return false;
Expand Down
1 change: 1 addition & 0 deletions layout/generic/nsSubDocumentFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class AsyncFrameInit : public nsRunnable
explicit AsyncFrameInit(nsIFrame* aFrame) : mFrame(aFrame) {}
NS_IMETHOD Run()
{
PROFILER_LABEL("mozilla", "AsyncFrameInit::Run", js::ProfileEntry::Category::OTHER);
if (mFrame.IsAlive()) {
static_cast<nsSubDocumentFrame*>(mFrame.GetFrame())->ShowViewer();
}
Expand Down

0 comments on commit a637119

Please sign in to comment.