fdbserver: update headers
This commit is contained in:
parent
98a6979f5b
commit
98639645b1
|
@ -60,7 +60,7 @@
|
|||
|
||||
#include "fdbmonitor/SimpleIni.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#include <execinfo.h>
|
||||
#include <signal.h>
|
||||
#ifdef ALLOC_INSTRUMENTATION
|
||||
|
@ -75,6 +75,7 @@
|
|||
#endif
|
||||
|
||||
#include "flow/SimpleOpt.h"
|
||||
#include <fstream>
|
||||
#include "flow/actorcompiler.h" // This must be the last #include.
|
||||
|
||||
// clang-format off
|
||||
|
@ -291,7 +292,7 @@ public:
|
|||
throw platform_error();
|
||||
}
|
||||
permission.set_permissions( &sa );
|
||||
#elif (defined(__linux__) || defined(__APPLE__))
|
||||
#elif (defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__))
|
||||
// There is nothing to do here, since the default permissions are fine
|
||||
#else
|
||||
#error Port me!
|
||||
|
@ -301,7 +302,7 @@ public:
|
|||
virtual ~WorldReadablePermissions() {
|
||||
#ifdef _WIN32
|
||||
LocalFree( sa.lpSecurityDescriptor );
|
||||
#elif (defined(__linux__) || defined(__APPLE__))
|
||||
#elif (defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__))
|
||||
// There is nothing to do here, since the default permissions are fine
|
||||
#else
|
||||
#error Port me!
|
||||
|
|
|
@ -48,6 +48,8 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
#ifdef USE_GPERFTOOLS
|
||||
#include "gperftools/profiler.h"
|
||||
#include "gperftools/heap-profiler.h"
|
||||
|
@ -526,7 +528,7 @@ ACTOR Future<Void> registrationClient(
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__linux__) && defined(USE_GPERFTOOLS)
|
||||
#if (defined(__linux__) || defined(__FreeBSD__)) && defined(USE_GPERFTOOLS)
|
||||
//A set of threads that should be profiled
|
||||
std::set<std::thread::id> profiledThreads;
|
||||
|
||||
|
@ -538,7 +540,7 @@ int filter_in_thread(void *arg) {
|
|||
|
||||
//Enables the calling thread to be profiled
|
||||
void registerThreadForProfiling() {
|
||||
#if defined(__linux__) && defined(USE_GPERFTOOLS)
|
||||
#if (defined(__linux__) || defined(__FreeBSD__)) && defined(USE_GPERFTOOLS)
|
||||
//Not sure if this is actually needed, but a call to backtrace was advised here:
|
||||
//http://groups.google.com/group/google-perftools/browse_thread/thread/0dfd74532e038eb8/2686d9f24ac4365f?pli=1
|
||||
profiledThreads.insert(std::this_thread::get_id());
|
||||
|
@ -552,7 +554,7 @@ void registerThreadForProfiling() {
|
|||
void updateCpuProfiler(ProfilerRequest req) {
|
||||
switch (req.type) {
|
||||
case ProfilerRequest::Type::GPROF:
|
||||
#if defined(__linux__) && defined(USE_GPERFTOOLS) && !defined(VALGRIND)
|
||||
#if (defined(__linux__) || defined(__FreeBSD__)) && defined(USE_GPERFTOOLS) && !defined(VALGRIND)
|
||||
switch (req.action) {
|
||||
case ProfilerRequest::Action::ENABLE: {
|
||||
const char *path = (const char*)req.outputFile.begin();
|
||||
|
|
Loading…
Reference in New Issue