diff --git a/tools/profiler/Makefile.in b/tools/profiler/Makefile.in index 9b430997d788..55381a9a6bc9 100644 --- a/tools/profiler/Makefile.in +++ b/tools/profiler/Makefile.in @@ -78,7 +78,7 @@ EXTRA_JS_MODULES = \ Profiler.jsm \ $(NULL) -ifneq (,$(filter Android Linux,$(OS_TARGET))) +ifeq ($(OS_TARGET),Android) DEFINES += -DMOZ_ENABLE_PROFILER_SPS diff --git a/tools/profiler/sampler.h b/tools/profiler/sampler.h index e6d5bce8ec67..786d9b86d512 100644 --- a/tools/profiler/sampler.h +++ b/tools/profiler/sampler.h @@ -86,7 +86,7 @@ #endif // Redefine the macros for platforms where SPS is supported. -#if defined(ANDROID) || defined(XP_LINUX) || defined(XP_MACOSX) || defined(XP_WIN) +#if defined(ANDROID) || defined(XP_MACOSX) || defined(XP_WIN) #include "sps_sampler.h" @@ -106,7 +106,6 @@ #define SAMPLER_GET_RESPONSIVENESS() NULL #define SAMPLE_LABEL(name_space, info) #define SAMPLE_MARKER(info) - #endif -#endif // ifndef SAMPLER_H +#endif diff --git a/tools/profiler/sps/platform-linux.cc b/tools/profiler/sps/platform-linux.cc index 8d4b4d855d1a..7793e5b04dcd 100644 --- a/tools/profiler/sps/platform-linux.cc +++ b/tools/profiler/sps/platform-linux.cc @@ -47,15 +47,6 @@ #define PATH_MAX_TOSTRING(x) #x #define PATH_MAX_STRING(x) PATH_MAX_TOSTRING(x) -#if defined(__GLIBC__) -// glibc doesn't implement gettid(2). -#include -pid_t gettid() -{ - return (pid_t) syscall(SYS_gettid); -} -#endif - #ifdef ENABLE_SPS_LEAF_DATA /* a crapy version of getline, because it's not included in bionic */ static ssize_t getline(char **lineptr, size_t *n, FILE *stream) @@ -203,6 +194,7 @@ class Sampler::PlatformData : public Malloced { : sampler_(sampler), signal_handler_installed_(false), vm_tgid_(getpid()), + // Glibc doesn't provide a wrapper for gettid(2). vm_tid_(gettid()), signal_sender_launched_(false) { } diff --git a/tools/profiler/sps/sps_sampler.h b/tools/profiler/sps/sps_sampler.h index 14ae75ef51d8..c3842706636a 100644 --- a/tools/profiler/sps/sps_sampler.h +++ b/tools/profiler/sps/sps_sampler.h @@ -37,9 +37,6 @@ * ***** END LICENSE BLOCK ***** */ #include -#include -#include -#include "base/atomicops.h" #include "thread_helper.h" #include "nscore.h" #include "mozilla/TimeStamp.h"