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 <limits.h> | 7 #include <limits.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #include "base/atomicops.h" | 10 #include "base/atomicops.h" |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 // static | 734 // static |
735 TrackedTime ThreadData::Now() { | 735 TrackedTime ThreadData::Now() { |
736 if (now_function_for_testing_) | 736 if (now_function_for_testing_) |
737 return TrackedTime::FromMilliseconds((*now_function_for_testing_)()); | 737 return TrackedTime::FromMilliseconds((*now_function_for_testing_)()); |
738 if (IsProfilerTimingEnabled() && TrackingStatus()) | 738 if (IsProfilerTimingEnabled() && TrackingStatus()) |
739 return TrackedTime::Now(); | 739 return TrackedTime::Now(); |
740 return TrackedTime(); // Super fast when disabled, or not compiled. | 740 return TrackedTime(); // Super fast when disabled, or not compiled. |
741 } | 741 } |
742 | 742 |
743 // static | 743 // static |
744 void ThreadData::EnsureCleanupWasCalled(int major_threads_shutdown_count) { | 744 void ThreadData::EnsureCleanupWasCalled( |
| 745 int /* major_threads_shutdown_count */) { |
745 base::AutoLock lock(*list_lock_.Pointer()); | 746 base::AutoLock lock(*list_lock_.Pointer()); |
746 if (worker_thread_data_creation_count_ == 0) | 747 if (worker_thread_data_creation_count_ == 0) |
747 return; // We haven't really run much, and couldn't have leaked. | 748 return; // We haven't really run much, and couldn't have leaked. |
748 | 749 |
749 // TODO(jar): until this is working on XP, don't run the real test. | 750 // TODO(jar): until this is working on XP, don't run the real test. |
750 #if 0 | 751 #if 0 |
751 // Verify that we've at least shutdown/cleanup the major namesd threads. The | 752 // Verify that we've at least shutdown/cleanup the major namesd threads. The |
752 // caller should tell us how many thread shutdowns should have taken place by | 753 // caller should tell us how many thread shutdowns should have taken place by |
753 // now. | 754 // now. |
754 CHECK_GT(cleanup_count_, major_threads_shutdown_count); | 755 CHECK_GT(cleanup_count_, major_threads_shutdown_count); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 #endif | 969 #endif |
969 } | 970 } |
970 | 971 |
971 ProcessDataSnapshot::ProcessDataSnapshot(const ProcessDataSnapshot& other) = | 972 ProcessDataSnapshot::ProcessDataSnapshot(const ProcessDataSnapshot& other) = |
972 default; | 973 default; |
973 | 974 |
974 ProcessDataSnapshot::~ProcessDataSnapshot() { | 975 ProcessDataSnapshot::~ProcessDataSnapshot() { |
975 } | 976 } |
976 | 977 |
977 } // namespace tracked_objects | 978 } // namespace tracked_objects |
OLD | NEW |