You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/05/31 21:16:25 UTC

svn commit: r1344871 - in /incubator/mesos/trunk/src/linux: proc.cpp proc.hpp

Author: benh
Date: Thu May 31 19:16:25 2012
New Revision: 1344871

URL: http://svn.apache.org/viewvc?rev=1344871&view=rev
Log:
Removed /proc/[pid]/stat entries from newer kernels (https://reviews.apache.org/r/5311).

Modified:
    incubator/mesos/trunk/src/linux/proc.cpp
    incubator/mesos/trunk/src/linux/proc.hpp

Modified: incubator/mesos/trunk/src/linux/proc.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/linux/proc.cpp?rev=1344871&r1=1344870&r2=1344871&view=diff
==============================================================================
--- incubator/mesos/trunk/src/linux/proc.cpp (original)
+++ incubator/mesos/trunk/src/linux/proc.cpp Thu May 31 19:16:25 2012
@@ -131,9 +131,7 @@ Try<ProcessStatistics> stat(pid_t pid)
        >> utime >> stime >> cutime >> cstime >> priority >> nice
        >> num_threads >> itrealvalue >> starttime >> vsize >> rss
        >> rsslim >> startcode >> endcode >> startstack >> kstkeip
-       >> signal >> blocked >> sigcatch >> wchan >> nswap >> cnswap
-       >> exit_signal >> processor >> rt_priority >> policy
-       >> delayacct_blkio_ticks >> guest_time >> cguest_time;
+       >> signal >> blocked >> sigcatch >> wchan >> nswap >> cnswap;
 
   // Check for any read/parse errors.
   if (file.fail() && !file.eof()) {
@@ -148,9 +146,7 @@ Try<ProcessStatistics> stat(pid_t pid)
                            utime, stime, cutime, cstime, priority, nice,
                            num_threads, itrealvalue, starttime, vsize, rss,
                            rsslim, startcode, endcode, startstack, kstkeip,
-                           signal, blocked, sigcatch, wchan, nswap, cnswap,
-                           exit_signal, processor, rt_priority, policy,
-                           delayacct_blkio_ticks, guest_time, cguest_time);
+                           signal, blocked, sigcatch, wchan, nswap, cnswap);
 }
 
 } // namespace proc {

Modified: incubator/mesos/trunk/src/linux/proc.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/linux/proc.hpp?rev=1344871&r1=1344870&r2=1344871&view=diff
==============================================================================
--- incubator/mesos/trunk/src/linux/proc.hpp (original)
+++ incubator/mesos/trunk/src/linux/proc.hpp Thu May 31 19:16:25 2012
@@ -21,17 +21,11 @@
 
 #include <sys/types.h> // For pid_t.
 
-#include <linux/version.h>
-
 #include <set>
 #include <string>
 
 #include "common/try.hpp"
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-#error "Expecting Linux version >= 2.6.27"
-#endif
-
 namespace mesos {
 namespace internal {
 namespace proc {
@@ -101,14 +95,7 @@ struct ProcessStatistics
       unsigned long _sigcatch,
       unsigned long _wchan,
       unsigned long _nswap,
-      unsigned long _cnswap,
-      int _exit_signal, // Since Linux 2.1.22.
-      int _processor, // Since Linux 2.2.8.
-      unsigned int _rt_priority, // Since Linux 2.5.19.
-      unsigned int _policy, // Since Linux 2.5.19.
-      unsigned long long _delayacct_blkio_ticks, // Since Linux 2.6.18.
-      unsigned long _guest_time, // Since Linux 2.6.24.
-      unsigned int _cguest_time) // Since Linux 2.6.24.
+      unsigned long _cnswap)
   : pid(_pid),
     comm(_comm),
     state(_state),
@@ -143,14 +130,7 @@ struct ProcessStatistics
     sigcatch(_sigcatch),
     wchan(_wchan),
     nswap(_nswap),
-    cnswap(_cnswap),
-    exit_signal(_exit_signal),
-    processor(_processor),
-    rt_priority(_rt_priority),
-    policy(_policy),
-    delayacct_blkio_ticks(_delayacct_blkio_ticks),
-    guest_time(_guest_time),
-    cguest_time(_cguest_time)
+    cnswap(_cnswap)
   {}
 
   const pid_t pid;
@@ -188,13 +168,6 @@ struct ProcessStatistics
   const unsigned long wchan;
   const unsigned long nswap;
   const unsigned long cnswap;
-  const int exit_signal;
-  const int processor;
-  const unsigned int rt_priority;
-  const unsigned int policy;
-  const unsigned long long delayacct_blkio_ticks;
-  const unsigned long guest_time;
-  const unsigned int cguest_time;
 };
 
 } // namespace proc {