Bug 718440. Add more sampler labels to various places. r=bgirard

This shows the problems described in bug 710068.
This commit is contained in:
Jeff Muizelaar
2012-01-17 15:33:04 -05:00
parent e88c1896d8
commit 0e918c271b
20 changed files with 64 additions and 13 deletions

View File

@@ -2017,6 +2017,7 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
NS_IMETHODIMP NS_IMETHODIMP
nsXMLHttpRequest::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult status) nsXMLHttpRequest::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult status)
{ {
SAMPLE_LABEL("content", "nsXMLHttpRequest::OnStopRequest");
if (!IsSameOrBaseChannel(request, mChannel)) { if (!IsSameOrBaseChannel(request, mChannel)) {
return NS_OK; return NS_OK;
} }

View File

@@ -65,6 +65,7 @@
#include "nsDOMProgressEvent.h" #include "nsDOMProgressEvent.h"
#include "nsDOMEventTargetWrapperCache.h" #include "nsDOMEventTargetWrapperCache.h"
#include "nsContentUtils.h" #include "nsContentUtils.h"
#include "sampler.h"
class nsILoadGroup; class nsILoadGroup;
class AsyncVerifyRedirectCallbackForwarder; class AsyncVerifyRedirectCallbackForwarder;

View File

@@ -47,6 +47,7 @@
#include "gfxFailure.h" #include "gfxFailure.h"
#include "prenv.h" #include "prenv.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
#include "sampler.h"
namespace mozilla { namespace mozilla {
namespace gl { namespace gl {
@@ -195,6 +196,7 @@ public:
bool SwapBuffers() bool SwapBuffers()
{ {
SAMPLE_LABEL("GLContext", "SwapBuffers");
[mContext flushBuffer]; [mContext flushBuffer];
return true; return true;
} }

View File

@@ -64,6 +64,8 @@
#include "gfxCrashReporterUtils.h" #include "gfxCrashReporterUtils.h"
#include "sampler.h"
namespace mozilla { namespace mozilla {
namespace layers { namespace layers {
@@ -758,6 +760,7 @@ LayerManagerOGL::BindAndDrawQuadWithTextureRect(LayerProgram *aProg,
void void
LayerManagerOGL::Render() LayerManagerOGL::Render()
{ {
SAMPLE_LABEL("LayerManagerOGL", "Render");
if (mDestroyed) { if (mDestroyed) {
NS_WARNING("Call on destroyed layer manager"); NS_WARNING("Call on destroyed layer manager");
return; return;

View File

@@ -49,6 +49,7 @@
static bool gDisableOptimize = false; static bool gDisableOptimize = false;
#include "cairo.h" #include "cairo.h"
#include "sampler.h"
#if defined(XP_WIN) #if defined(XP_WIN)
@@ -435,6 +436,7 @@ void imgFrame::Draw(gfxContext *aContext, gfxPattern::GraphicsFilter aFilter,
const gfxMatrix &aUserSpaceToImageSpace, const gfxRect& aFill, const gfxMatrix &aUserSpaceToImageSpace, const gfxRect& aFill,
const nsIntMargin &aPadding, const nsIntRect &aSubimage) const nsIntMargin &aPadding, const nsIntRect &aSubimage)
{ {
SAMPLE_LABEL("image", "imgFrame::Draw");
NS_ASSERTION(!aFill.IsEmpty(), "zero dest size --- fix caller"); NS_ASSERTION(!aFill.IsEmpty(), "zero dest size --- fix caller");
NS_ASSERTION(!aSubimage.IsEmpty(), "zero source size --- fix caller"); NS_ASSERTION(!aSubimage.IsEmpty(), "zero source size --- fix caller");
NS_ASSERTION(!mPalettedImageData, "Directly drawing a paletted image!"); NS_ASSERTION(!mPalettedImageData, "Directly drawing a paletted image!");

View File

@@ -116,6 +116,8 @@
#include "nsXULPopupManager.h" #include "nsXULPopupManager.h"
#endif #endif
#include "sampler.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::layers; using namespace mozilla::layers;
using namespace mozilla::dom; using namespace mozilla::dom;
@@ -3630,6 +3632,7 @@ nsLayoutUtils::DrawBackgroundImage(nsRenderingContext* aRenderingContext,
const nsRect& aDirty, const nsRect& aDirty,
PRUint32 aImageFlags) PRUint32 aImageFlags)
{ {
SAMPLE_LABEL("layout", "nsLayoutUtils::DrawBackgroundImage");
return DrawImageInternal(aRenderingContext, aImage, aGraphicsFilter, return DrawImageInternal(aRenderingContext, aImage, aGraphicsFilter,
aDest, aFill, aAnchor, aDirty, aDest, aFill, aAnchor, aDirty,
aImageSize, aImageFlags); aImageSize, aImageFlags);

View File

@@ -111,6 +111,7 @@
#include "nsIObserverService.h" #include "nsIObserverService.h"
#include "nsIScrollableFrame.h" #include "nsIScrollableFrame.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
#include "sampler.h"
// headers for plugin scriptability // headers for plugin scriptability
#include "nsIScriptGlobalObject.h" #include "nsIScriptGlobalObject.h"
@@ -698,6 +699,7 @@ nsObjectFrame::InstantiatePlugin(nsPluginHost* aPluginHost,
const char* aMimeType, const char* aMimeType,
nsIURI* aURI) nsIURI* aURI)
{ {
SAMPLE_LABEL("nsObjectFrame", "InstantiatePlugin");
NS_ASSERTION(mPreventInstantiation, NS_ASSERTION(mPreventInstantiation,
"Instantiation should be prevented here!"); "Instantiation should be prevented here!");
@@ -2150,6 +2152,7 @@ nsObjectFrame::PrepareInstanceOwner()
nsresult nsresult
nsObjectFrame::Instantiate(nsIChannel* aChannel, nsIStreamListener** aStreamListener) nsObjectFrame::Instantiate(nsIChannel* aChannel, nsIStreamListener** aStreamListener)
{ {
SAMPLE_LABEL("plugin", "nsObjectFrame::Instantiate");
if (mPreventInstantiation) { if (mPreventInstantiation) {
return NS_OK; return NS_OK;
} }
@@ -2200,6 +2203,7 @@ nsObjectFrame::Instantiate(nsIChannel* aChannel, nsIStreamListener** aStreamList
nsresult nsresult
nsObjectFrame::Instantiate(const char* aMimeType, nsIURI* aURI) nsObjectFrame::Instantiate(const char* aMimeType, nsIURI* aURI)
{ {
SAMPLE_LABEL("plugin", "nsObjectFrame::Instantiate");
PR_LOG(nsObjectFrameLM, PR_LOG_DEBUG, PR_LOG(nsObjectFrameLM, PR_LOG_DEBUG,
("nsObjectFrame::Instantiate(%s) called on frame %p\n", aMimeType, ("nsObjectFrame::Instantiate(%s) called on frame %p\n", aMimeType,
this)); this));
@@ -2348,6 +2352,7 @@ DoDelayedStop(nsPluginInstanceOwner *aInstanceOwner, bool aDelayedStop)
static void static void
DoStopPlugin(nsPluginInstanceOwner *aInstanceOwner, bool aDelayedStop) DoStopPlugin(nsPluginInstanceOwner *aInstanceOwner, bool aDelayedStop)
{ {
SAMPLE_LABEL("plugin", "DoStopPlugin");
nsRefPtr<nsNPAPIPluginInstance> inst; nsRefPtr<nsNPAPIPluginInstance> inst;
aInstanceOwner->GetInstance(getter_AddRefs(inst)); aInstanceOwner->GetInstance(getter_AddRefs(inst));
if (inst) { if (inst) {
@@ -2390,6 +2395,7 @@ nsStopPluginRunnable::Notify(nsITimer *aTimer)
NS_IMETHODIMP NS_IMETHODIMP
nsStopPluginRunnable::Run() nsStopPluginRunnable::Run()
{ {
SAMPLE_LABEL("plugin", "nsStopPluginRunnable::Run");
// InitWithCallback calls Release before AddRef so we need to hold a // InitWithCallback calls Release before AddRef so we need to hold a
// strong ref on 'this' since we fall through to this scope if it fails. // strong ref on 'this' since we fall through to this scope if it fails.
nsCOMPtr<nsITimerCallback> kungFuDeathGrip = this; nsCOMPtr<nsITimerCallback> kungFuDeathGrip = this;

View File

@@ -383,7 +383,7 @@ nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream *stream)
{ {
LOG(("nsInputStreamPump::OnInputStreamReady [this=%x]\n", this)); LOG(("nsInputStreamPump::OnInputStreamReady [this=%x]\n", this));
SAMPLE_LABEL("Input", "OnInputStreamReady"); SAMPLE_LABEL("Input", "nsInputStreamPump::OnInputStreamReady");
// this function has been called from a PLEvent, so we can safely call // this function has been called from a PLEvent, so we can safely call
// any listener or progress sink methods directly from here. // any listener or progress sink methods directly from here.
@@ -426,6 +426,7 @@ nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream *stream)
PRUint32 PRUint32
nsInputStreamPump::OnStateStart() nsInputStreamPump::OnStateStart()
{ {
SAMPLE_LABEL("nsInputStreamPump", "OnStateStart");
LOG((" OnStateStart [this=%x]\n", this)); LOG((" OnStateStart [this=%x]\n", this));
nsresult rv; nsresult rv;
@@ -453,6 +454,7 @@ nsInputStreamPump::OnStateStart()
PRUint32 PRUint32
nsInputStreamPump::OnStateTransfer() nsInputStreamPump::OnStateTransfer()
{ {
SAMPLE_LABEL("Input", "nsInputStreamPump::OnStateTransfer");
LOG((" OnStateTransfer [this=%x]\n", this)); LOG((" OnStateTransfer [this=%x]\n", this));
// if canceled, go directly to STATE_STOP... // if canceled, go directly to STATE_STOP...
@@ -562,6 +564,7 @@ nsInputStreamPump::OnStateTransfer()
PRUint32 PRUint32
nsInputStreamPump::OnStateStop() nsInputStreamPump::OnStateStop()
{ {
SAMPLE_LABEL("Input", "nsInputStreamPump::OnStateTransfer");
LOG((" OnStateStop [this=%x status=%x]\n", this, mStatus)); LOG((" OnStateStop [this=%x status=%x]\n", this, mStatus));
// if an error occurred, we must be sure to pass the error onto the async // if an error occurred, we must be sure to pass the error onto the async

View File

@@ -39,6 +39,7 @@
#include "nsIInputStream.h" #include "nsIInputStream.h"
#include "nsIChannel.h" #include "nsIChannel.h"
#include "nsNetError.h" #include "nsNetError.h"
#include "sampler.h"
nsStreamLoader::nsStreamLoader() nsStreamLoader::nsStreamLoader()
: mData(nsnull), : mData(nsnull),
@@ -118,6 +119,7 @@ NS_IMETHODIMP
nsStreamLoader::OnStopRequest(nsIRequest* request, nsISupports *ctxt, nsStreamLoader::OnStopRequest(nsIRequest* request, nsISupports *ctxt,
nsresult aStatus) nsresult aStatus)
{ {
SAMPLE_LABEL("network", "nsStreamLoader::OnStopRequest");
if (mObserver) { if (mObserver) {
// provide nsIStreamLoader::request during call to OnStreamComplete // provide nsIStreamLoader::request during call to OnStreamComplete
mRequest = request; mRequest = request;

View File

@@ -69,6 +69,7 @@
#include "mozilla/Telemetry.h" #include "mozilla/Telemetry.h"
#include "nsDOMError.h" #include "nsDOMError.h"
#include "nsAlgorithm.h" #include "nsAlgorithm.h"
#include "sampler.h"
using namespace mozilla; using namespace mozilla;
@@ -4213,6 +4214,7 @@ nsHttpChannel::ContinueOnStartRequest3(nsresult result)
NS_IMETHODIMP NS_IMETHODIMP
nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult status) nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult status)
{ {
SAMPLE_LABEL("network", "nsHttpChannel::OnStopRequest");
LOG(("nsHttpChannel::OnStopRequest [this=%p request=%p status=%x]\n", LOG(("nsHttpChannel::OnStopRequest [this=%p request=%p status=%x]\n",
this, request, status)); this, request, status));
@@ -4388,6 +4390,7 @@ nsHttpChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
nsIInputStream *input, nsIInputStream *input,
PRUint32 offset, PRUint32 count) PRUint32 offset, PRUint32 count)
{ {
SAMPLE_LABEL("network", "nsHttpChannel::OnDataAvailable");
LOG(("nsHttpChannel::OnDataAvailable [this=%p request=%p offset=%u count=%u]\n", LOG(("nsHttpChannel::OnDataAvailable [this=%p request=%p offset=%u count=%u]\n",
this, request, offset, count)); this, request, offset, count));

View File

@@ -59,6 +59,7 @@
#include "nsHtml5StreamParser.h" #include "nsHtml5StreamParser.h"
#include "mozilla/css/Loader.h" #include "mozilla/css/Loader.h"
#include "mozilla/Util.h" // DebugOnly #include "mozilla/Util.h" // DebugOnly
#include "sampler.h"
using namespace mozilla; using namespace mozilla;
@@ -426,6 +427,7 @@ class nsHtml5FlushLoopGuard
void void
nsHtml5TreeOpExecutor::RunFlushLoop() nsHtml5TreeOpExecutor::RunFlushLoop()
{ {
SAMPLE_LABEL("html5", "RunFlushLoop");
if (mRunFlushLoopOnStack) { if (mRunFlushLoopOnStack) {
// There's already a RunFlushLoop() on the call stack. // There's already a RunFlushLoop() on the call stack.
return; return;

View File

@@ -71,6 +71,7 @@
#include "SQLCollations.h" #include "SQLCollations.h"
#include "FileSystemModule.h" #include "FileSystemModule.h"
#include "mozStorageHelper.h" #include "mozStorageHelper.h"
#include "sampler.h"
#include "prlog.h" #include "prlog.h"
#include "prprf.h" #include "prprf.h"
@@ -608,6 +609,7 @@ Connection::initialize(nsIFile *aDatabaseFile,
const char* aVFSName) const char* aVFSName)
{ {
NS_ASSERTION (!mDBConn, "Initialize called on already opened database!"); NS_ASSERTION (!mDBConn, "Initialize called on already opened database!");
SAMPLE_LABEL("storage", "Connection::initialize");
int srv; int srv;
nsresult rv; nsresult rv;
@@ -1028,6 +1030,7 @@ NS_IMETHODIMP
Connection::Clone(bool aReadOnly, Connection::Clone(bool aReadOnly,
mozIStorageConnection **_connection) mozIStorageConnection **_connection)
{ {
SAMPLE_LABEL("storage", "Connection::Clone");
if (!mDBConn) if (!mDBConn)
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;
if (!mDatabaseFile) if (!mDatabaseFile)

View File

@@ -58,6 +58,7 @@
#include "mozStorageStatementParams.h" #include "mozStorageStatementParams.h"
#include "mozStorageStatementRow.h" #include "mozStorageStatementRow.h"
#include "mozStorageStatement.h" #include "mozStorageStatement.h"
#include "sampler.h"
#include "prlog.h" #include "prlog.h"
@@ -587,6 +588,7 @@ Statement::Execute()
NS_IMETHODIMP NS_IMETHODIMP
Statement::ExecuteStep(bool *_moreResults) Statement::ExecuteStep(bool *_moreResults)
{ {
SAMPLE_LABEL("storage", "Statement::ExecuteStep");
if (!mDBStatement) if (!mDBStatement)
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;

View File

@@ -54,6 +54,8 @@
#include "nsVariant.h" #include "nsVariant.h"
#include "mozilla/storage.h" #include "mozilla/storage.h"
#include "sampler.h"
using namespace mozilla; using namespace mozilla;
#define ENSURE_ANNO_TYPE(_type, _statement) \ #define ENSURE_ANNO_TYPE(_type, _statement) \
@@ -236,6 +238,7 @@ nsAnnotationService::SetItemAnnotation(PRInt64 aItemId,
PRInt32 aFlags, PRInt32 aFlags,
PRUint16 aExpiration) PRUint16 aExpiration)
{ {
SAMPLE_LABEL("AnnotationService", "SetItemAnnotation");
NS_ENSURE_ARG_MIN(aItemId, 1); NS_ENSURE_ARG_MIN(aItemId, 1);
NS_ENSURE_ARG(aValue); NS_ENSURE_ARG(aValue);

View File

@@ -57,6 +57,8 @@
#include "mozilla/FunctionTimer.h" #include "mozilla/FunctionTimer.h"
#include "mozilla/Util.h" #include "mozilla/Util.h"
#include "sampler.h"
#define BOOKMARKS_TO_KEYWORDS_INITIAL_CACHE_SIZE 64 #define BOOKMARKS_TO_KEYWORDS_INITIAL_CACHE_SIZE 64
#define RECENT_BOOKMARKS_INITIAL_CACHE_SIZE 10 #define RECENT_BOOKMARKS_INITIAL_CACHE_SIZE 10
// Threashold to expire old bookmarks if the initial cache size is exceeded. // Threashold to expire old bookmarks if the initial cache size is exceeded.
@@ -681,6 +683,7 @@ nsNavBookmarks::InsertBookmark(PRInt64 aFolder,
NS_IMETHODIMP NS_IMETHODIMP
nsNavBookmarks::RemoveItem(PRInt64 aItemId) nsNavBookmarks::RemoveItem(PRInt64 aItemId)
{ {
SAMPLE_LABEL("bookmarks", "RemoveItem");
NS_ENSURE_ARG(aItemId != mRoot); NS_ENSURE_ARG(aItemId != mRoot);
BookmarkData bookmark; BookmarkData bookmark;
@@ -1132,6 +1135,7 @@ nsNavBookmarks::GetDescendantChildren(PRInt64 aFolderId,
NS_IMETHODIMP NS_IMETHODIMP
nsNavBookmarks::RemoveFolderChildren(PRInt64 aFolderId) nsNavBookmarks::RemoveFolderChildren(PRInt64 aFolderId)
{ {
SAMPLE_LABEL("bookmarks", "RemoveFolderChilder");
NS_ENSURE_ARG_MIN(aFolderId, 1); NS_ENSURE_ARG_MIN(aFolderId, 1);
BookmarkData folder; BookmarkData folder;
@@ -2751,6 +2755,7 @@ nsNavBookmarks::EnsureKeywordsHash() {
NS_IMETHODIMP NS_IMETHODIMP
nsNavBookmarks::RunInBatchMode(nsINavHistoryBatchCallback* aCallback, nsNavBookmarks::RunInBatchMode(nsINavHistoryBatchCallback* aCallback,
nsISupports* aUserData) { nsISupports* aUserData) {
SAMPLE_LABEL("bookmarks", "RunInBatchMode");
NS_ENSURE_ARG(aCallback); NS_ENSURE_ARG(aCallback);
mBatching = true; mBatching = true;

View File

@@ -77,14 +77,6 @@
#ifndef SAMPLER_H #ifndef SAMPLER_H
#define SAMPLER_H #define SAMPLER_H
#if defined(_MSC_VER)
#define FULLFUNCTION __FUNCSIG__
#elif (__GNUC__ >= 4)
#define FULLFUNCTION __PRETTY_FUNCTION__
#else
#define FULLFUNCTION __FUNCTION__
#endif
// Redefine the macros for platforms where SPS is supported. // Redefine the macros for platforms where SPS is supported.
#if defined(ANDROID) || defined(__linux__) || defined(XP_MACOSX) || defined(XP_WIN) #if defined(ANDROID) || defined(__linux__) || defined(XP_MACOSX) || defined(XP_WIN)
@@ -106,6 +98,7 @@
#define SAMPLER_GET_RESPONSIVENESS() NULL #define SAMPLER_GET_RESPONSIVENESS() NULL
#define SAMPLER_GET_FEATURES() NULL #define SAMPLER_GET_FEATURES() NULL
#define SAMPLE_LABEL(name_space, info) #define SAMPLE_LABEL(name_space, info)
#define SAMPLE_LABEL_FN(name_space, info)
#define SAMPLE_MARKER(info) #define SAMPLE_MARKER(info)
#endif #endif

View File

@@ -49,6 +49,16 @@ extern mozilla::tls::key pkey_stack;
extern mozilla::tls::key pkey_ticker; extern mozilla::tls::key pkey_ticker;
extern bool stack_key_initialized; extern bool stack_key_initialized;
#ifndef SAMPLE_FUNCTION_NAME
# ifdef __GNUC__
# define SAMPLE_FUNCTION_NAME __FUNCTION__
# elif defined(_MSC_VER)
# define SAMPLE_FUNCTION_NAME __FUNCTION__
# else
# define SAMPLE_FUNCTION_NAME __func__ // defined in C99, supported in various C++ compilers. Just raw function name.
# endif
#endif
#define SAMPLER_INIT() mozilla_sampler_init() #define SAMPLER_INIT() mozilla_sampler_init()
#define SAMPLER_DEINIT() mozilla_sampler_deinit() #define SAMPLER_DEINIT() mozilla_sampler_deinit()
#define SAMPLER_START(entries, interval, features, featureCount) mozilla_sampler_start(entries, interval, features, featureCount) #define SAMPLER_START(entries, interval, features, featureCount) mozilla_sampler_start(entries, interval, features, featureCount)
@@ -59,7 +69,9 @@ extern bool stack_key_initialized;
#define SAMPLER_SAVE() mozilla_sampler_save() #define SAMPLER_SAVE() mozilla_sampler_save()
#define SAMPLER_GET_PROFILE() mozilla_sampler_get_profile() #define SAMPLER_GET_PROFILE() mozilla_sampler_get_profile()
#define SAMPLER_GET_FEATURES() mozilla_sampler_get_features() #define SAMPLER_GET_FEATURES() mozilla_sampler_get_features()
#define SAMPLE_LABEL(name_space, info) mozilla::SamplerStackFrameRAII only_one_sampleraii_per_scope(FULLFUNCTION, name_space "::" info) // we want the class and function name but can't easily get that using preprocessor macros
// __func__ doesn't have the class name and __PRETTY_FUNCTION__ has the parameters
#define SAMPLE_LABEL(name_space, info) mozilla::SamplerStackFrameRAII only_one_sampleraii_per_scope(name_space "::" info)
#define SAMPLE_MARKER(info) mozilla_sampler_add_marker(info) #define SAMPLE_MARKER(info) mozilla_sampler_add_marker(info)
/* we duplicate this code here to avoid header dependencies /* we duplicate this code here to avoid header dependencies
@@ -129,7 +141,8 @@ namespace mozilla {
class NS_STACK_CLASS SamplerStackFrameRAII { class NS_STACK_CLASS SamplerStackFrameRAII {
public: public:
SamplerStackFrameRAII(const char *aFuncName, const char *aInfo) { // we only copy the strings at save time, so to take multiple parameters we'd need to copy them then.
SamplerStackFrameRAII(const char *aInfo) {
mHandle = mozilla_sampler_call_enter(aInfo); mHandle = mozilla_sampler_call_enter(aInfo);
} }
~SamplerStackFrameRAII() { ~SamplerStackFrameRAII() {

View File

@@ -664,7 +664,7 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent,
NS_ASSERTION(!aView || static_cast<nsView*>(aView)->GetViewManager() == this, NS_ASSERTION(!aView || static_cast<nsView*>(aView)->GetViewManager() == this,
"wrong view manager"); "wrong view manager");
SAMPLE_LABEL("event", "DispatchEvent"); SAMPLE_LABEL("event", "nsViewManager::DispatchEvent");
*aStatus = nsEventStatus_eIgnore; *aStatus = nsEventStatus_eIgnore;

View File

@@ -63,6 +63,7 @@
#include "nsToolkit.h" #include "nsToolkit.h"
#include "TextInputHandler.h" #include "TextInputHandler.h"
#include "mozilla/HangMonitor.h" #include "mozilla/HangMonitor.h"
#include "sampler.h"
#include "npapi.h" #include "npapi.h"
@@ -405,7 +406,7 @@ void
nsAppShell::ProcessGeckoEvents(void* aInfo) nsAppShell::ProcessGeckoEvents(void* aInfo)
{ {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK; NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
SAMPLE_LABEL("Events", "ProcessGeckoEvents");
nsAppShell* self = static_cast<nsAppShell*> (aInfo); nsAppShell* self = static_cast<nsAppShell*> (aInfo);
if (self->mRunningEventLoop) { if (self->mRunningEventLoop) {

View File

@@ -94,6 +94,8 @@
#include <ApplicationServices/ApplicationServices.h> #include <ApplicationServices/ApplicationServices.h>
#include "sampler.h"
using namespace mozilla; using namespace mozilla;
using namespace mozilla::layers; using namespace mozilla::layers;
using namespace mozilla::gl; using namespace mozilla::gl;
@@ -2477,6 +2479,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
- (void)drawRect:(NSRect)aRect inContext:(CGContextRef)aContext - (void)drawRect:(NSRect)aRect inContext:(CGContextRef)aContext
{ {
SAMPLE_LABEL("widget", "ChildView::drawRect");
bool isVisible; bool isVisible;
if (!mGeckoChild || NS_FAILED(mGeckoChild->IsVisible(isVisible)) || if (!mGeckoChild || NS_FAILED(mGeckoChild->IsVisible(isVisible)) ||
!isVisible) !isVisible)