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

Side by Side Diff: base/process_util.h

Issue 339024: Move console stack dumping code to a function so it can be reused in test_she... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « no previous file | 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 }; 413 };
414 414
415 // Enables low fragmentation heap (LFH) for every heaps of this process. This 415 // Enables low fragmentation heap (LFH) for every heaps of this process. This
416 // won't have any effect on heaps created after this function call. It will not 416 // won't have any effect on heaps created after this function call. It will not
417 // modify data allocated in the heaps before calling this function. So it is 417 // modify data allocated in the heaps before calling this function. So it is
418 // better to call this function early in initialization and again before 418 // better to call this function early in initialization and again before
419 // entering the main loop. 419 // entering the main loop.
420 // Note: Returns true on Windows 2000 without doing anything. 420 // Note: Returns true on Windows 2000 without doing anything.
421 bool EnableLowFragmentationHeap(); 421 bool EnableLowFragmentationHeap();
422 422
423 // Enable 'terminate on heap corruption' flag. Helps protect against heap 423 // Enables 'terminate on heap corruption' flag. Helps protect against heap
424 // overflow. Has no effect if the OS doesn't provide the necessary facility. 424 // overflow. Has no effect if the OS doesn't provide the necessary facility.
425 void EnableTerminationOnHeapCorruption(); 425 void EnableTerminationOnHeapCorruption();
426 426
427 #if defined(UNIT_TEST)
428 // Enables stack dump to console output on exception and signals.
429 // When enabled, the process will quit immediately. This is meant to be used in
430 // unit_tests only!
431 bool EnableInProcessStackDumping();
432 #endif // defined(UNIT_TEST)
433
427 // If supported on the platform, and the user has sufficent rights, increase 434 // If supported on the platform, and the user has sufficent rights, increase
428 // the current process's scheduling priority to a high priority. 435 // the current process's scheduling priority to a high priority.
429 void RaiseProcessToHighPriority(); 436 void RaiseProcessToHighPriority();
430 437
431 #if defined(OS_MACOSX) 438 #if defined(OS_MACOSX)
432 // Restore the default exception handler, setting it to Apple Crash Reporter 439 // Restore the default exception handler, setting it to Apple Crash Reporter
433 // (ReportCrash). When forking and execing a new process, the child will 440 // (ReportCrash). When forking and execing a new process, the child will
434 // inherit the parent's exception ports, which may be set to the Breakpad 441 // inherit the parent's exception ports, which may be set to the Breakpad
435 // instance running inside the parent. The parent's Breakpad instance should 442 // instance running inside the parent. The parent's Breakpad instance should
436 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler 443 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler
437 // in the child after forking will restore the standard exception handler. 444 // in the child after forking will restore the standard exception handler.
438 // See http://crbug.com/20371/ for more details. 445 // See http://crbug.com/20371/ for more details.
439 void RestoreDefaultExceptionHandler(); 446 void RestoreDefaultExceptionHandler();
440 #endif 447 #endif
441 448
442 } // namespace base 449 } // namespace base
443 450
444 #endif // BASE_PROCESS_UTIL_H_ 451 #endif // BASE_PROCESS_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/process_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698