Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: base/process/process_metrics_linux.cc

Issue 19064002: Split ProcessHandle and its related routines into base/process/process_handle.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/process/process_metrics_ios.cc ('k') | base/process/process_metrics_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/process/process_metrics.h" 5 #include "base/process/process_metrics.h"
6 6
7 #include <dirent.h> 7 #include <dirent.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #include <sys/time.h> 10 #include <sys/time.h>
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 int num_res = sscanf(mali_memory_data.c_str(), "%lld bytes", &mali_size); 489 int num_res = sscanf(mali_memory_data.c_str(), "%lld bytes", &mali_size);
490 if (num_res == 1) 490 if (num_res == 1)
491 meminfo->gem_size += mali_size; 491 meminfo->gem_size += mali_size;
492 } 492 }
493 #endif // defined(ARCH_CPU_ARM_FAMILY) 493 #endif // defined(ARCH_CPU_ARM_FAMILY)
494 #endif // defined(OS_CHROMEOS) 494 #endif // defined(OS_CHROMEOS)
495 495
496 return true; 496 return true;
497 } 497 }
498 498
499 const char kProcSelfExe[] = "/proc/self/exe";
500
501 int GetNumberOfThreads(ProcessHandle process) {
502 return internal::ReadProcStatsAndGetFieldAsInt(process,
503 internal::VM_NUMTHREADS);
504 }
505
499 } // namespace base 506 } // namespace base
OLDNEW
« no previous file with comments | « base/process/process_metrics_ios.cc ('k') | base/process/process_metrics_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698