Backed out changeset 2eb7e93512b1 (bug 918825) for browser-chrome crashes
This commit is contained in:
@@ -165,7 +165,6 @@ ClientLayerManager::EndTransactionInternal(DrawThebesLayerCallback aCallback,
|
|||||||
MOZ_LAYERS_LOG((" ----- (beginning paint)"));
|
MOZ_LAYERS_LOG((" ----- (beginning paint)"));
|
||||||
Log();
|
Log();
|
||||||
#endif
|
#endif
|
||||||
profiler_tracing("Paint", "Rasterize", TRACING_INTERVAL_START);
|
|
||||||
|
|
||||||
NS_ASSERTION(InConstruction(), "Should be in construction phase");
|
NS_ASSERTION(InConstruction(), "Should be in construction phase");
|
||||||
mPhase = PHASE_DRAWING;
|
mPhase = PHASE_DRAWING;
|
||||||
|
|||||||
@@ -547,8 +547,6 @@ CompositorParent::Composite()
|
|||||||
15 + (int)(TimeStamp::Now() - mExpectedComposeTime).ToMilliseconds());
|
15 + (int)(TimeStamp::Now() - mExpectedComposeTime).ToMilliseconds());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
profiler_tracing("Paint", "Composite", TRACING_INTERVAL_END);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -187,7 +187,6 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
|||||||
const bool& isFirstPaint,
|
const bool& isFirstPaint,
|
||||||
InfallibleTArray<EditReply>* reply)
|
InfallibleTArray<EditReply>* reply)
|
||||||
{
|
{
|
||||||
profiler_tracing("Paint", "Composite", TRACING_INTERVAL_START);
|
|
||||||
PROFILER_LABEL("LayerTransactionParent", "RecvUpdate");
|
PROFILER_LABEL("LayerTransactionParent", "RecvUpdate");
|
||||||
#ifdef COMPOSITOR_PERFORMANCE_WARNING
|
#ifdef COMPOSITOR_PERFORMANCE_WARNING
|
||||||
TimeStamp updateStart = TimeStamp::Now();
|
TimeStamp updateStart = TimeStamp::Now();
|
||||||
|
|||||||
@@ -538,7 +538,6 @@ ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies)
|
|||||||
MOZ_LAYERS_LOG(("[LayersForwarder] syncing before send..."));
|
MOZ_LAYERS_LOG(("[LayersForwarder] syncing before send..."));
|
||||||
PlatformSyncBeforeUpdate();
|
PlatformSyncBeforeUpdate();
|
||||||
|
|
||||||
profiler_tracing("Paint", "Rasterize", TRACING_INTERVAL_END);
|
|
||||||
if (mTxn->mSwapRequired) {
|
if (mTxn->mSwapRequired) {
|
||||||
MOZ_LAYERS_LOG(("[LayersForwarder] sending transaction..."));
|
MOZ_LAYERS_LOG(("[LayersForwarder] sending transaction..."));
|
||||||
RenderTraceScope rendertrace3("Forward Transaction", "000093");
|
RenderTraceScope rendertrace3("Forward Transaction", "000093");
|
||||||
|
|||||||
@@ -1058,8 +1058,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
profiler_tracing("Paint", "RD", TRACING_INTERVAL_START);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The timer holds a reference to |this| while calling |Notify|.
|
* The timer holds a reference to |this| while calling |Notify|.
|
||||||
* However, implementations of |WillRefresh| are permitted to destroy
|
* However, implementations of |WillRefresh| are permitted to destroy
|
||||||
@@ -1074,7 +1072,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
|||||||
|
|
||||||
if (!mPresContext || !mPresContext->GetPresShell()) {
|
if (!mPresContext || !mPresContext->GetPresShell()) {
|
||||||
StopTimer();
|
StopTimer();
|
||||||
profiler_tracing("Paint", "RD", TRACING_INTERVAL_END);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1092,7 +1089,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
|||||||
// readded as needed.
|
// readded as needed.
|
||||||
mFrameRequestCallbackDocs.Clear();
|
mFrameRequestCallbackDocs.Clear();
|
||||||
|
|
||||||
profiler_tracing("Paint", "Scripts", TRACING_INTERVAL_START);
|
|
||||||
int64_t eventTime = aNowEpoch / PR_USEC_PER_MSEC;
|
int64_t eventTime = aNowEpoch / PR_USEC_PER_MSEC;
|
||||||
for (uint32_t i = 0; i < frameRequestCallbacks.Length(); ++i) {
|
for (uint32_t i = 0; i < frameRequestCallbacks.Length(); ++i) {
|
||||||
const DocumentFrameCallbacks& docCallbacks = frameRequestCallbacks[i];
|
const DocumentFrameCallbacks& docCallbacks = frameRequestCallbacks[i];
|
||||||
@@ -1119,7 +1115,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
profiler_tracing("Paint", "Scripts", TRACING_INTERVAL_END);
|
|
||||||
|
|
||||||
// This is the Flush_Style case.
|
// This is the Flush_Style case.
|
||||||
if (mPresContext && mPresContext->GetPresShell()) {
|
if (mPresContext && mPresContext->GetPresShell()) {
|
||||||
@@ -1218,7 +1213,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
|||||||
for (uint32_t i = 0; i < mPostRefreshObservers.Length(); ++i) {
|
for (uint32_t i = 0; i < mPostRefreshObservers.Length(); ++i) {
|
||||||
mPostRefreshObservers[i]->DidRefresh();
|
mPostRefreshObservers[i]->DidRefresh();
|
||||||
}
|
}
|
||||||
profiler_tracing("Paint", "RD", TRACING_INTERVAL_END);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ PLDHashOperator
|
/* static */ PLDHashOperator
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
// Profiler
|
// Profiler
|
||||||
#include "PlatformMacros.h"
|
#include "PlatformMacros.h"
|
||||||
#include "GeckoProfiler.h"
|
#include "GeckoProfilerImpl.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "nsXULAppAPI.h"
|
#include "nsXULAppAPI.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
|
|||||||
@@ -56,12 +56,6 @@ namespace mozilla {
|
|||||||
class TimeStamp;
|
class TimeStamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum TracingMetadata {
|
|
||||||
TRACING_DEFAULT,
|
|
||||||
TRACING_INTERVAL_START,
|
|
||||||
TRACING_INTERVAL_END
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifndef MOZ_ENABLE_PROFILER_SPS
|
#ifndef MOZ_ENABLE_PROFILER_SPS
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -88,9 +82,6 @@ enum TracingMetadata {
|
|||||||
#define PROFILER_MAIN_THREAD_LABEL(name_space, info) do {} while (0)
|
#define PROFILER_MAIN_THREAD_LABEL(name_space, info) do {} while (0)
|
||||||
#define PROFILER_MAIN_THREAD_LABEL_PRINTF(name_space, info, format, ...) do {} while (0)
|
#define PROFILER_MAIN_THREAD_LABEL_PRINTF(name_space, info, format, ...) do {} while (0)
|
||||||
|
|
||||||
static inline void profiler_tracing(const char* aCategory, const char* aInfo,
|
|
||||||
TracingMetadata metaData = TRACING_DEFAULT) {}
|
|
||||||
|
|
||||||
// Initilize the profiler TLS, signal handlers on linux. If MOZ_PROFILER_STARTUP
|
// Initilize the profiler TLS, signal handlers on linux. If MOZ_PROFILER_STARTUP
|
||||||
// is set the profiler will be started. This call must happen before any other
|
// is set the profiler will be started. This call must happen before any other
|
||||||
// sampler calls. Particularly sampler_label/sampler_marker.
|
// sampler calls. Particularly sampler_label/sampler_marker.
|
||||||
|
|||||||
@@ -78,8 +78,5 @@ double mozilla_sampler_time(const TimeStamp& aTime);
|
|||||||
/* Returns true if env var SPS_NEW is set to anything, else false. */
|
/* Returns true if env var SPS_NEW is set to anything, else false. */
|
||||||
extern bool sps_version2();
|
extern bool sps_version2();
|
||||||
|
|
||||||
void mozilla_sampler_tracing(const char* aCategory, const char* aInfo,
|
|
||||||
TracingMetadata aMetaData);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -201,21 +201,6 @@ bool profiler_in_privacy_mode()
|
|||||||
return stack->mPrivacyMode;
|
return stack->mPrivacyMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void profiler_tracing(const char* aCategory, const char* aInfo,
|
|
||||||
TracingMetadata aMetaData = TRACING_DEFAULT)
|
|
||||||
{
|
|
||||||
if (!stack_key_initialized)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Don't insert a marker if we're not profiling to avoid
|
|
||||||
// the heap copy (malloc).
|
|
||||||
if (!profiler_is_active()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mozilla_sampler_tracing(aCategory, aInfo, aMetaData);
|
|
||||||
}
|
|
||||||
|
|
||||||
// we want the class and function name but can't easily get that using preprocessor macros
|
// 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
|
// __func__ doesn't have the class name and __PRETTY_FUNCTION__ has the parameters
|
||||||
|
|
||||||
@@ -225,13 +210,11 @@ static inline void profiler_tracing(const char* aCategory, const char* aInfo,
|
|||||||
|
|
||||||
#define PROFILER_LABEL(name_space, info) mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__)
|
#define PROFILER_LABEL(name_space, info) mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__)
|
||||||
#define PROFILER_LABEL_PRINTF(name_space, info, ...) mozilla::SamplerStackFramePrintfRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__, __VA_ARGS__)
|
#define PROFILER_LABEL_PRINTF(name_space, info, ...) mozilla::SamplerStackFramePrintfRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
#define PROFILER_MARKER(info) mozilla_sampler_add_marker(info)
|
#define PROFILER_MARKER(info) mozilla_sampler_add_marker(info)
|
||||||
#define PROFILER_MARKER_PAYLOAD(info, payload) mozilla_sampler_add_marker(info, payload)
|
#define PROFILER_MARKER_PAYLOAD(info, payload) mozilla_sampler_add_marker(info, payload)
|
||||||
#define PROFILER_MAIN_THREAD_MARKER(info) MOZ_ASSERT(NS_IsMainThread(), "This can only be called on the main thread"); mozilla_sampler_add_marker(info)
|
|
||||||
|
|
||||||
#define PROFILER_MAIN_THREAD_LABEL(name_space, info) MOZ_ASSERT(NS_IsMainThread(), "This can only be called on the main thread"); mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__)
|
#define PROFILER_MAIN_THREAD_LABEL(name_space, info) MOZ_ASSERT(NS_IsMainThread(), "This can only be called on the main thread"); mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__)
|
||||||
#define PROFILER_MAIN_THREAD_LABEL_PRINTF(name_space, info, ...) MOZ_ASSERT(NS_IsMainThread(), "This can only be called on the main thread"); mozilla::SamplerStackFramePrintfRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__, __VA_ARGS__)
|
#define PROFILER_MAIN_THREAD_LABEL_PRINTF(name_space, info, ...) MOZ_ASSERT(NS_IsMainThread(), "This can only be called on the main thread"); mozilla::SamplerStackFramePrintfRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__, __VA_ARGS__)
|
||||||
|
#define PROFILER_MAIN_THREAD_MARKER(info) MOZ_ASSERT(NS_IsMainThread(), "This can only be called on the main thread"); mozilla_sampler_add_marker(info)
|
||||||
|
|
||||||
|
|
||||||
/* FIXME/bug 789667: memory constraints wouldn't much of a problem for
|
/* FIXME/bug 789667: memory constraints wouldn't much of a problem for
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
#include "GeckoProfilerImpl.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
#include "nsXULAppAPI.h"
|
#include "nsXULAppAPI.h"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#define MOZ_PROFILE_ENTRY_H
|
#define MOZ_PROFILE_ENTRY_H
|
||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include "GeckoProfiler.h"
|
#include "GeckoProfilerImpl.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "ProfilerBacktrace.h"
|
#include "ProfilerBacktrace.h"
|
||||||
#include "mozilla/Mutex.h"
|
#include "mozilla/Mutex.h"
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ ProfilerMarkerPayload::ProfilerMarkerPayload(ProfilerBacktrace* aStack)
|
|||||||
ProfilerMarkerPayload::ProfilerMarkerPayload(const mozilla::TimeStamp& aStartTime,
|
ProfilerMarkerPayload::ProfilerMarkerPayload(const mozilla::TimeStamp& aStartTime,
|
||||||
const mozilla::TimeStamp& aEndTime,
|
const mozilla::TimeStamp& aEndTime,
|
||||||
ProfilerBacktrace* aStack)
|
ProfilerBacktrace* aStack)
|
||||||
: mStartTime(aStartTime)
|
: mStartTime(aStartTime),
|
||||||
, mEndTime(aEndTime)
|
mEndTime(aEndTime),
|
||||||
, mStack(aStack)
|
mStack(aStack)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ProfilerMarkerPayload::~ProfilerMarkerPayload()
|
ProfilerMarkerPayload::~ProfilerMarkerPayload()
|
||||||
@@ -58,37 +58,6 @@ ProfilerMarkerPayload::prepareCommonProps<JSObjectBuilder>(
|
|||||||
JSObjectBuilder& b,
|
JSObjectBuilder& b,
|
||||||
JSObjectBuilder::ObjectHandle aObject);
|
JSObjectBuilder::ObjectHandle aObject);
|
||||||
|
|
||||||
ProfilerMarkerTracing::ProfilerMarkerTracing(const char* aCategory, TracingMetadata aMetaData)
|
|
||||||
: mCategory(aCategory)
|
|
||||||
, mMetaData(aMetaData)
|
|
||||||
{}
|
|
||||||
|
|
||||||
template<typename Builder>
|
|
||||||
typename Builder::Object
|
|
||||||
ProfilerMarkerTracing::preparePayloadImp(Builder& b)
|
|
||||||
{
|
|
||||||
typename Builder::RootedObject data(b.context(), b.CreateObject());
|
|
||||||
prepareCommonProps("tracing", b, data);
|
|
||||||
|
|
||||||
if (GetCategory()) {
|
|
||||||
b.DefineProperty(data, "category", GetCategory());
|
|
||||||
}
|
|
||||||
if (GetMetaData() != TRACING_DEFAULT) {
|
|
||||||
if (GetMetaData() == TRACING_INTERVAL_START) {
|
|
||||||
b.DefineProperty(data, "interval", "start");
|
|
||||||
} else if (GetMetaData() == TRACING_INTERVAL_END) {
|
|
||||||
b.DefineProperty(data, "interval", "end");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
template JSCustomObjectBuilder::Object
|
|
||||||
ProfilerMarkerTracing::preparePayloadImp<JSCustomObjectBuilder>(JSCustomObjectBuilder& b);
|
|
||||||
template JSObjectBuilder::Object
|
|
||||||
ProfilerMarkerTracing::preparePayloadImp<JSObjectBuilder>(JSObjectBuilder& b);
|
|
||||||
|
|
||||||
ProfilerMarkerImagePayload::ProfilerMarkerImagePayload(gfxASurface *aImg)
|
ProfilerMarkerImagePayload::ProfilerMarkerImagePayload(gfxASurface *aImg)
|
||||||
: mImg(aImg)
|
: mImg(aImg)
|
||||||
{}
|
{}
|
||||||
|
|||||||
@@ -74,30 +74,6 @@ private:
|
|||||||
ProfilerBacktrace* mStack;
|
ProfilerBacktrace* mStack;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ProfilerMarkerTracing : public ProfilerMarkerPayload
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ProfilerMarkerTracing(const char* aCategory, TracingMetadata aMetaData);
|
|
||||||
|
|
||||||
const char *GetCategory() const { return mCategory; }
|
|
||||||
TracingMetadata GetMetaData() const { return mMetaData; }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual JSCustomObjectBuilder::Object
|
|
||||||
preparePayload(JSCustomObjectBuilder& b) { return preparePayloadImp(b); }
|
|
||||||
virtual JSObjectBuilder::Object
|
|
||||||
preparePayload(JSObjectBuilder& b) { return preparePayloadImp(b); }
|
|
||||||
|
|
||||||
private:
|
|
||||||
template<typename Builder>
|
|
||||||
typename Builder::Object preparePayloadImp(Builder& b);
|
|
||||||
|
|
||||||
private:
|
|
||||||
const char *mCategory;
|
|
||||||
TracingMetadata mMetaData;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class gfxASurface;
|
class gfxASurface;
|
||||||
class ProfilerMarkerImagePayload : public ProfilerMarkerPayload
|
class ProfilerMarkerImagePayload : public ProfilerMarkerPayload
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "SaveProfileTask.h"
|
#include "SaveProfileTask.h"
|
||||||
#include "GeckoProfiler.h"
|
#include "GeckoProfilerImpl.h"
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
WriteCallback(const jschar *buf, uint32_t len, void *data)
|
WriteCallback(const jschar *buf, uint32_t len, void *data)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include "GeckoProfiler.h"
|
#include "GeckoProfilerImpl.h"
|
||||||
#include "SaveProfileTask.h"
|
#include "SaveProfileTask.h"
|
||||||
#include "ProfileEntry.h"
|
#include "ProfileEntry.h"
|
||||||
#include "SyncProfile.h"
|
#include "SyncProfile.h"
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "GeckoProfiler.h"
|
#include "GeckoProfilerImpl.h"
|
||||||
#include "mozilla/Mutex.h"
|
#include "mozilla/Mutex.h"
|
||||||
#include "mozilla/Atomics.h"
|
#include "mozilla/Atomics.h"
|
||||||
#include "ProfileEntry.h"
|
#include "ProfileEntry.h"
|
||||||
|
|||||||
@@ -788,12 +788,6 @@ void mozilla_sampler_free_backtrace(ProfilerBacktrace* aBacktrace)
|
|||||||
delete aBacktrace;
|
delete aBacktrace;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mozilla_sampler_tracing(const char* aCategory, const char* aInfo,
|
|
||||||
TracingMetadata aMetaData)
|
|
||||||
{
|
|
||||||
mozilla_sampler_add_marker(aInfo, new ProfilerMarkerTracing(aCategory, aMetaData));
|
|
||||||
}
|
|
||||||
|
|
||||||
// END externally visible functions
|
// END externally visible functions
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user