Fixed the non-POD global variable in perf sampler.

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


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

Branch: refs/heads/master
Commit: d66d30c8bbdcc988f52449c149b7a9c309ceee33
Parents: 00318fc
Author: Jie Yu <[email protected]>
Authored: Thu Apr 2 12:16:01 2015 -0700
Committer: Jie Yu <[email protected]>
Committed: Fri Apr 3 14:33:59 2015 -0700

----------------------------------------------------------------------
 src/linux/perf.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d66d30c8/src/linux/perf.cpp
----------------------------------------------------------------------
diff --git a/src/linux/perf.cpp b/src/linux/perf.cpp
index cad6c80..8d9a373 100644
--- a/src/linux/perf.cpp
+++ b/src/linux/perf.cpp
@@ -31,22 +31,22 @@
 
 #include "linux/perf.hpp"
 
+using namespace process;
+
 using std::list;
 using std::ostringstream;
 using std::set;
 using std::string;
 using std::vector;
 
-using namespace process;
-
 namespace perf {
 
 // Delimiter for fields in perf stat output.
-const string PERF_DELIMITER = ",";
+static const char PERF_DELIMITER[] = ",";
 
 // Use an empty string as the key for the parse output when sampling a
 // set of pids. No valid cgroup can be an empty string.
-const string PIDS_KEY = "";
+static const char PIDS_KEY[] = "";
 
 namespace internal {
 
@@ -202,8 +202,8 @@ private:
     // Start reading from stdout and stderr now. We don't use stderr
     // but must read from it to avoid the subprocess blocking on the
     // pipe.
-    output.push_back(process::io::read(perf.get().out().get()));
-    output.push_back(process::io::read(perf.get().err().get()));
+    output.push_back(io::read(perf.get().out().get()));
+    output.push_back(io::read(perf.get().err().get()));
 
     // Wait for the process to exit.
     perf.get().status()

Reply via email to