| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tracked_objects.h" | 5 #include "base/tracked_objects.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <limits.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/debug/leak_annotations.h" | 11 #include "base/debug/leak_annotations.h" |
| 12 #include "base/format_macros.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 #include "base/port.h" | |
| 15 #include "base/process/process_handle.h" | 13 #include "base/process/process_handle.h" |
| 16 #include "base/profiler/alternate_timer.h" | 14 #include "base/profiler/alternate_timer.h" |
| 17 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 18 #include "base/third_party/valgrind/memcheck.h" | 16 #include "base/third_party/valgrind/memcheck.h" |
| 19 #include "base/threading/thread_restrictions.h" | 17 #include "base/tracking_info.h" |
| 20 | 18 |
| 21 using base::TimeDelta; | 19 using base::TimeDelta; |
| 22 | 20 |
| 21 namespace base { |
| 22 class TimeDelta; |
| 23 } |
| 24 |
| 23 namespace tracked_objects { | 25 namespace tracked_objects { |
| 24 | 26 |
| 25 namespace { | 27 namespace { |
| 26 // Flag to compile out almost all of the task tracking code. | 28 // Flag to compile out almost all of the task tracking code. |
| 27 const bool kTrackAllTaskObjects = true; | 29 const bool kTrackAllTaskObjects = true; |
| 28 | 30 |
| 29 // TODO(jar): Evaluate the perf impact of enabling this. If the perf impact is | 31 // TODO(jar): Evaluate the perf impact of enabling this. If the perf impact is |
| 30 // negligible, enable by default. | 32 // negligible, enable by default. |
| 31 // Flag to compile out parent-child link recording. | 33 // Flag to compile out parent-child link recording. |
| 32 const bool kTrackParentChildLinks = false; | 34 const bool kTrackParentChildLinks = false; |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 : process_id(base::GetCurrentProcId()) { | 863 : process_id(base::GetCurrentProcId()) { |
| 862 #else | 864 #else |
| 863 : process_id(0) { | 865 : process_id(0) { |
| 864 #endif | 866 #endif |
| 865 } | 867 } |
| 866 | 868 |
| 867 ProcessDataSnapshot::~ProcessDataSnapshot() { | 869 ProcessDataSnapshot::~ProcessDataSnapshot() { |
| 868 } | 870 } |
| 869 | 871 |
| 870 } // namespace tracked_objects | 872 } // namespace tracked_objects |
| OLD | NEW |