зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1337189 (part 4) - #include platform-*.cc from platform.cpp. r=mstange.
platform-*.cc and platform.cpp belong together conceptually, and combining them into a single compilation unit makes it easier to share things and avoids the need for some declarations in headers. The patch also removes old_sigsave_signal_handler_ which is a long-dead field that clang now detects and complains about. --HG-- extra : rebase_source : 092a7ca608415b888607dba38ad5296787af824e
This commit is contained in:
Родитель
4b5d7166d9
Коммит
b20ef2d766
|
@ -63,18 +63,12 @@
|
|||
#include <strings.h> // index
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "prenv.h"
|
||||
#include "platform.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/LinuxSignal.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "ProfileEntry.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "ThreadInfo.h"
|
||||
#include "ThreadResponsiveness.h"
|
||||
|
||||
#if defined(__ARM_EABI__) && defined(ANDROID)
|
||||
// Should also work on other Android and ARM Linux, but not tested there yet.
|
||||
|
|
|
@ -29,15 +29,9 @@
|
|||
#include <errno.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "ThreadResponsiveness.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
// Memory profile
|
||||
#include "nsMemoryReporterManager.h"
|
||||
|
||||
#include "platform.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
|
||||
using mozilla::TimeStamp;
|
||||
using mozilla::TimeDuration;
|
||||
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#include <process.h>
|
||||
#include "platform.h"
|
||||
#include "ProfileEntry.h"
|
||||
#include "ThreadInfo.h"
|
||||
#include "ThreadResponsiveness.h"
|
||||
|
||||
// Memory profile
|
||||
#include "nsMemoryReporterManager.h"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/Sprintf.h"
|
||||
#include "PseudoStack.h"
|
||||
#include "ThreadInfo.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsDirectoryServiceUtils.h"
|
||||
#include "nsDirectoryServiceDefs.h"
|
||||
|
@ -1252,3 +1253,16 @@ profiler_add_marker(const char *aMarker, ProfilerMarkerPayload *aPayload)
|
|||
|
||||
// END externally visible functions
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// We #include these files directly because it means those files can use
|
||||
// declarations from this file trivially.
|
||||
#if defined(SPS_OS_windows)
|
||||
# include "platform-win32.cc"
|
||||
#elif defined(SPS_OS_darwin)
|
||||
# include "platform-macos.cc"
|
||||
#elif defined(SPS_OS_linux) || defined(SPS_OS_android)
|
||||
# include "platform-linux.cc"
|
||||
#else
|
||||
# error "bad platform"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -373,7 +373,6 @@ private:
|
|||
#if defined(SPS_OS_linux) || defined(SPS_OS_android)
|
||||
bool signal_handler_installed_;
|
||||
struct sigaction old_sigprof_signal_handler_;
|
||||
struct sigaction old_sigsave_signal_handler_;
|
||||
bool signal_sender_launched_;
|
||||
pthread_t signal_sender_thread_;
|
||||
#endif
|
||||
|
|
|
@ -60,7 +60,6 @@ if CONFIG['MOZ_GECKO_PROFILER']:
|
|||
]
|
||||
# These files cannot be built in unified mode because of name clashes with mozglue headers on Android.
|
||||
SOURCES += [
|
||||
'core/platform-linux.cc',
|
||||
'core/shared-libraries-linux.cc',
|
||||
]
|
||||
if not CONFIG['MOZ_CRASHREPORTER']:
|
||||
|
@ -77,12 +76,10 @@ if CONFIG['MOZ_GECKO_PROFILER']:
|
|||
]
|
||||
elif CONFIG['OS_TARGET'] == 'Darwin':
|
||||
UNIFIED_SOURCES += [
|
||||
'core/platform-macos.cc',
|
||||
'core/shared-libraries-macos.cc',
|
||||
]
|
||||
elif CONFIG['OS_TARGET'] == 'WINNT':
|
||||
SOURCES += [
|
||||
'core/platform-win32.cc',
|
||||
'core/shared-libraries-win32.cc',
|
||||
]
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче