зеркало из https://github.com/mozilla/gecko-dev.git
Bug 937201 - Fix Windows builds without MOZ_ENABLE_PROFILER_SPS. r=BenWa
This commit is contained in:
Родитель
17e2d2f2aa
Коммит
fe4fda82a5
|
@ -2128,8 +2128,7 @@ RecordShutdownEndTimeStamp() {
|
||||||
// calling _exit, but on a debug build or when the user forces a full
|
// calling _exit, but on a debug build or when the user forces a full
|
||||||
// shutdown this is called as late as possible, so we have to
|
// shutdown this is called as late as possible, so we have to
|
||||||
// white list this write as write poisoning will be enabled.
|
// white list this write as write poisoning will be enabled.
|
||||||
int fd = fileno(f);
|
MozillaRegisterDebugFILE(f);
|
||||||
MozillaRegisterDebugFD(fd);
|
|
||||||
|
|
||||||
TimeStamp now = TimeStamp::Now();
|
TimeStamp now = TimeStamp::Now();
|
||||||
MOZ_ASSERT(now >= gRecordedShutdownStartTime);
|
MOZ_ASSERT(now >= gRecordedShutdownStartTime);
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
#include "mozilla/Types.h"
|
#include "mozilla/Types.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if defined(MOZ_ENABLE_PROFILER_SPS) && (defined(XP_WIN) || defined(XP_MACOSX))
|
|
||||||
|
|
||||||
MOZ_BEGIN_EXTERN_C
|
MOZ_BEGIN_EXTERN_C
|
||||||
|
|
||||||
/** Register file descriptor to be ignored by poisoning IO interposer */
|
/** Register file descriptor to be ignored by poisoning IO interposer */
|
||||||
|
@ -28,6 +26,8 @@ void MozillaUnRegisterDebugFILE(FILE *f);
|
||||||
|
|
||||||
MOZ_END_EXTERN_C
|
MOZ_END_EXTERN_C
|
||||||
|
|
||||||
|
#if defined(MOZ_ENABLE_PROFILER_SPS) && (defined(XP_WIN) || defined(XP_MACOSX))
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
@ -65,13 +65,6 @@ void ClearPoisonIOInterposer();
|
||||||
|
|
||||||
#else /* MOZ_ENABLE_PROFILER_SPS && (XP_WIN || XP_MACOSX) */
|
#else /* MOZ_ENABLE_PROFILER_SPS && (XP_WIN || XP_MACOSX) */
|
||||||
|
|
||||||
MOZ_BEGIN_EXTERN_C
|
|
||||||
inline void MozillaRegisterDebugFD(int fd){}
|
|
||||||
inline void MozillaRegisterDebugFILE(FILE *f){}
|
|
||||||
inline void MozillaUnRegisterDebugFD(int fd){}
|
|
||||||
inline void MozillaUnRegisterDebugFILE(FILE *f){}
|
|
||||||
MOZ_END_EXTERN_C
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
inline bool IsDebugFile(intptr_t aFileID){ return true; }
|
inline bool IsDebugFile(intptr_t aFileID){ return true; }
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
|
/* vim:set ts=2 sw=2 sts=2 ci et: */
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
// Define empty implementations so we can compile when
|
||||||
|
// MOZ_ENABLE_PROFILER_SPS is undefined
|
||||||
|
void MozillaRegisterDebugFD(int fd) {}
|
||||||
|
void MozillaRegisterDebugFILE(FILE *f) {}
|
||||||
|
void MozillaUnRegisterDebugFD(int fd) {}
|
||||||
|
void MozillaUnRegisterDebugFILE(FILE *f) {}
|
||||||
|
|
||||||
|
}
|
|
@ -27,17 +27,22 @@ EXPORTS.mozilla += [
|
||||||
|
|
||||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||||
EXPORTS.mozilla += ['perfprobe.h']
|
EXPORTS.mozilla += ['perfprobe.h']
|
||||||
SOURCES += [
|
SOURCES += ['perfprobe.cpp']
|
||||||
'perfprobe.cpp',
|
if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
|
||||||
'PoisonIOInterposerBase.cpp',
|
SOURCES += [
|
||||||
'PoisonIOInterposerWin.cpp',
|
'PoisonIOInterposerBase.cpp',
|
||||||
]
|
'PoisonIOInterposerWin.cpp',
|
||||||
elif CONFIG['OS_ARCH'] == 'Darwin':
|
]
|
||||||
|
else:
|
||||||
|
SOURCES += ['PoisonIOInterposerStub.cpp']
|
||||||
|
elif CONFIG['OS_ARCH'] == 'Darwin' and CONFIG['MOZ_ENABLE_PROFILER_SPS']:
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
'mach_override.c',
|
'mach_override.c',
|
||||||
'PoisonIOInterposerBase.cpp',
|
'PoisonIOInterposerBase.cpp',
|
||||||
'PoisonIOInterposerMac.cpp',
|
'PoisonIOInterposerMac.cpp',
|
||||||
]
|
]
|
||||||
|
else:
|
||||||
|
SOURCES += ['PoisonIOInterposerStub.cpp']
|
||||||
|
|
||||||
include('../glue/objs.mozbuild')
|
include('../glue/objs.mozbuild')
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче