Bug 836593: Add profiler labels to organize samples under FrameLoader::StartLoading(), IFrameElement::BindToTree(), and TabParent creation code. r=jlebar,smaug
authorChris Jones <jones.chris.g@gmail.com>
Wed, 30 Jan 2013 22:40:43 -0800
changeset 130321 d4d3b9cafc9e8494a989387448a13d0edb9ec052
parent 130320 afa64181c0dce00ea2309b71390f01ab8bff5b6a
child 130322 09b4d9d69c42458bf682640841b9bb68b9e1bb35
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar, smaug
bugs836593
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 836593: Add profiler labels to organize samples under FrameLoader::StartLoading(), IFrameElement::BindToTree(), and TabParent creation code. r=jlebar,smaug
content/base/src/nsFrameLoader.cpp
content/html/content/src/nsGenericHTMLFrameElement.cpp
--- a/content/base/src/nsFrameLoader.cpp
+++ b/content/base/src/nsFrameLoader.cpp
@@ -406,16 +406,18 @@ nsFrameLoader::ReallyStartLoading()
   return rv;
 }
 
 nsresult
 nsFrameLoader::ReallyStartLoadingInternal()
 {
   NS_ENSURE_STATE(mURIToLoad && mOwnerContent && mOwnerContent->IsInDoc());
 
+  SAMPLE_LABEL("nsFrameLoader", "ReallyStartLoading");
+
   nsresult rv = MaybeCreateDocShell();
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   if (mRemoteFrame) {
     if (!mRemoteBrowser) {
       TryRemoteBrowser();
@@ -2025,16 +2027,18 @@ nsFrameLoader::TryRemoteBrowser()
   nsCOMPtr<nsIXULWindow> window(do_GetInterface(parentOwner));
   if (!window) {
     return false;
   }
   if (NS_FAILED(window->GetChromeFlags(&chromeFlags))) {
     return false;
   }
 
+  SAMPLE_LABEL("nsFrameLoader", "CreateRemoteBrowser");
+
   MutableTabContext context;
   nsCOMPtr<mozIApplication> ownApp = GetOwnApp();
   nsCOMPtr<mozIApplication> containingApp = GetContainingApp();
   ScrollingBehavior scrollingBehavior = DEFAULT_SCROLLING;
   if (mOwnerContent->AttrValueIs(kNameSpaceID_None,
                                  nsGkAtoms::mozasyncpanzoom,
                                  nsGkAtoms::_true,
                                  eCaseMatters)) {
--- a/content/html/content/src/nsGenericHTMLFrameElement.cpp
+++ b/content/html/content/src/nsGenericHTMLFrameElement.cpp
@@ -8,16 +8,17 @@
 #include "nsGenericHTMLFrameElement.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsContentUtils.h"
 #include "mozilla/Preferences.h"
 #include "nsIAppsService.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIDOMApplicationRegistry.h"
 #include "nsIPermissionManager.h"
+#include "sampler.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsGenericHTMLFrameElement,
                                                   nsGenericHTMLElement)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mFrameLoader)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
@@ -174,16 +175,19 @@ nsGenericHTMLFrameElement::BindToTree(ns
   nsresult rv = nsGenericHTMLElement::BindToTree(aDocument, aParent,
                                                  aBindingParent,
                                                  aCompileEventHandlers);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (aDocument) {
     NS_ASSERTION(!nsContentUtils::IsSafeToRunScript(),
                  "Missing a script blocker!");
+
+    SAMPLE_LABEL("nsGenericHTMLFrameElement", "BindToTree");
+
     // We're in a document now.  Kick off the frame load.
     LoadSrc();
   }
 
   // We're now in document and scripts may move us, so clear
   // the mNetworkCreated flag.
   mNetworkCreated = false;
   return rv;