You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/04/25 23:32:43 UTC

[50/50] mesos git commit: Fixed non-linux build involving glog drop_log_meory flag.

Fixed non-linux build involving glog drop_log_meory flag.

The variable "FLAGS_drop_log_memory" is available only on Linux.

Review: https://reviews.apache.org/r/42704


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a041e3a3
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a041e3a3
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a041e3a3

Branch: refs/heads/0.26.x
Commit: a041e3a35db6d3c3dea57b4f0033eebced6d55ad
Parents: 276dfac
Author: Kapil Arya <ka...@mesosphere.io>
Authored: Mon Jan 25 00:41:17 2016 -0500
Committer: Michael Park <mp...@apache.org>
Committed: Fri Apr 1 18:02:20 2016 -0700

----------------------------------------------------------------------
 src/logging/logging.cpp | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a041e3a3/src/logging/logging.cpp
----------------------------------------------------------------------
diff --git a/src/logging/logging.cpp b/src/logging/logging.cpp
index 4639157..d651e15 100644
--- a/src/logging/logging.cpp
+++ b/src/logging/logging.cpp
@@ -37,12 +37,14 @@
 
 #include "logging/logging.hpp"
 
+#ifdef __linux__
 // Declare FLAGS_drop_log_memory flag for glog. This declaration is based on the
 // the DECLARE_XXX macros from glog/logging.h.
 namespace fLB {
   extern GOOGLE_GLOG_DLL_DECL bool FLAGS_drop_log_memory;
 }
 using fLB::FLAGS_drop_log_memory;
+#endif
 
 using process::Once;
 
@@ -171,6 +173,7 @@ void initialize(
 
   FLAGS_logbufsecs = flags.logbufsecs;
 
+#ifdef __linux__
   // Do not drop in-memory buffers of log contents. When set to true, this flag
   // can significantly slow down the master. The slow down is attributed to
   // several hundred `posix_fadvise(..., POSIX_FADV_DONTNEED)` calls per second
@@ -180,6 +183,7 @@ void initialize(
   if (os::getenv("GLOG_drop_log_memory").isNone()) {
     FLAGS_drop_log_memory = false;
   }
+#endif
 
   google::InitGoogleLogging(argv0.c_str());
   if (flags.log_dir.isSome()) {