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

Side by Side Diff: base/process_util.h

Issue 774001: BSD port changes for base/ (OS_POSIX/GTK instead of OS_LINUX... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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_posix.cc ('k') | base/process_util_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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file/namespace contains utility functions for enumerating, ending and 5 // This file/namespace contains utility functions for enumerating, ending and
6 // computing statistics of processes. 6 // computing statistics of processes.
7 7
8 #ifndef BASE_PROCESS_UTIL_H_ 8 #ifndef BASE_PROCESS_UTIL_H_
9 #define BASE_PROCESS_UTIL_H_ 9 #define BASE_PROCESS_UTIL_H_
10 10
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 471
472 ProcessHandle process_; 472 ProcessHandle process_;
473 473
474 int processor_count_; 474 int processor_count_;
475 475
476 // Used to store the previous times and CPU usage counts so we can 476 // Used to store the previous times and CPU usage counts so we can
477 // compute the CPU usage between calls. 477 // compute the CPU usage between calls.
478 int64 last_time_; 478 int64 last_time_;
479 int64 last_system_time_; 479 int64 last_system_time_;
480 480
481 #if defined(OS_LINUX)
482 // Jiffie count at the last_time_ we updated.
483 int last_cpu_;
484 #endif
485
486 #if defined(OS_MACOSX) 481 #if defined(OS_MACOSX)
487 // Queries the port provider if it's set. 482 // Queries the port provider if it's set.
488 mach_port_t TaskForPid(ProcessHandle process) const; 483 mach_port_t TaskForPid(ProcessHandle process) const;
489 484
490 PortProvider* port_provider_; 485 PortProvider* port_provider_;
486 #elif defined(OS_POSIX)
487 // Jiffie count at the last_time_ we updated.
488 int last_cpu_;
491 #endif 489 #endif
492 490
493 DISALLOW_EVIL_CONSTRUCTORS(ProcessMetrics); 491 DISALLOW_EVIL_CONSTRUCTORS(ProcessMetrics);
494 }; 492 };
495 493
496 // Returns the memory commited by the system in KBytes. 494 // Returns the memory commited by the system in KBytes.
497 // Returns 0 if it can't compute the commit charge. 495 // Returns 0 if it can't compute the commit charge.
498 size_t GetSystemCommitCharge(); 496 size_t GetSystemCommitCharge();
499 497
500 // Enables low fragmentation heap (LFH) for every heaps of this process. This 498 // Enables low fragmentation heap (LFH) for every heaps of this process. This
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // instance running inside the parent. The parent's Breakpad instance should 531 // instance running inside the parent. The parent's Breakpad instance should
534 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler 532 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler
535 // in the child after forking will restore the standard exception handler. 533 // in the child after forking will restore the standard exception handler.
536 // See http://crbug.com/20371/ for more details. 534 // See http://crbug.com/20371/ for more details.
537 void RestoreDefaultExceptionHandler(); 535 void RestoreDefaultExceptionHandler();
538 #endif 536 #endif
539 537
540 } // namespace base 538 } // namespace base
541 539
542 #endif // BASE_PROCESS_UTIL_H_ 540 #endif // BASE_PROCESS_UTIL_H_
OLDNEW
« no previous file with comments | « base/process_posix.cc ('k') | base/process_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698