Back out 88733ce1bef3 (bug 718440) because of Windows build failure

This commit is contained in:
Matt Brubeck 2012-01-17 15:15:47 -08:00
parent 38a826cf58
commit 2e1e2ae3c5
20 changed files with 13 additions and 64 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -77,6 +77,14 @@
#ifndef 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.
#if defined(ANDROID) || defined(__linux__) || defined(XP_MACOSX) || defined(XP_WIN)
@ -98,7 +106,6 @@
#define SAMPLER_GET_RESPONSIVENESS() NULL
#define SAMPLER_GET_FEATURES() NULL
#define SAMPLE_LABEL(name_space, info)
#define SAMPLE_LABEL_FN(name_space, info)
#define SAMPLE_MARKER(info)
#endif

View File

@ -49,16 +49,6 @@ extern mozilla::tls::key pkey_stack;
extern mozilla::tls::key pkey_ticker;
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_DEINIT() mozilla_sampler_deinit()
#define SAMPLER_START(entries, interval, features, featureCount) mozilla_sampler_start(entries, interval, features, featureCount)
@ -69,9 +59,7 @@ extern bool stack_key_initialized;
#define SAMPLER_SAVE() mozilla_sampler_save()
#define SAMPLER_GET_PROFILE() mozilla_sampler_get_profile()
#define SAMPLER_GET_FEATURES() mozilla_sampler_get_features()
// 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_LABEL(name_space, info) mozilla::SamplerStackFrameRAII only_one_sampleraii_per_scope(FULLFUNCTION, name_space "::" info)
#define SAMPLE_MARKER(info) mozilla_sampler_add_marker(info)
/* we duplicate this code here to avoid header dependencies
@ -141,8 +129,7 @@ namespace mozilla {
class NS_STACK_CLASS SamplerStackFrameRAII {
public:
// we only copy the strings at save time, so to take multiple parameters we'd need to copy them then.
SamplerStackFrameRAII(const char *aInfo) {
SamplerStackFrameRAII(const char *aFuncName, const char *aInfo) {
mHandle = mozilla_sampler_call_enter(aInfo);
}
~SamplerStackFrameRAII() {

View File

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

View File

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

View File

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