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/debug/profiler.h" | 5 #include "base/debug/profiler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/debug/debugging_flags.h" | 9 #include "base/debug/debugging_flags.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 bool BeingProfiled() { | 51 bool BeingProfiled() { |
52 return ProfilingIsEnabledForAllThreads(); | 52 return ProfilingIsEnabledForAllThreads(); |
53 } | 53 } |
54 | 54 |
55 void RestartProfilingAfterFork() { | 55 void RestartProfilingAfterFork() { |
56 ProfilerRegisterThread(); | 56 ProfilerRegisterThread(); |
57 } | 57 } |
58 | 58 |
| 59 bool IsProfilingSupported() { |
| 60 return true; |
| 61 } |
| 62 |
59 #else | 63 #else |
60 | 64 |
61 void StartProfiling(const std::string& name) { | 65 void StartProfiling(const std::string& name) { |
62 } | 66 } |
63 | 67 |
64 void StopProfiling() { | 68 void StopProfiling() { |
65 } | 69 } |
66 | 70 |
67 void FlushProfiling() { | 71 void FlushProfiling() { |
68 } | 72 } |
69 | 73 |
70 bool BeingProfiled() { | 74 bool BeingProfiled() { |
71 return false; | 75 return false; |
72 } | 76 } |
73 | 77 |
74 void RestartProfilingAfterFork() { | 78 void RestartProfilingAfterFork() { |
75 } | 79 } |
76 | 80 |
| 81 bool IsProfilingSupported() { |
| 82 return false; |
| 83 } |
| 84 |
77 #endif | 85 #endif |
78 | 86 |
79 #if !defined(OS_WIN) | 87 #if !defined(OS_WIN) |
80 | 88 |
81 bool IsBinaryInstrumented() { | 89 bool IsBinaryInstrumented() { |
82 return false; | 90 return false; |
83 } | 91 } |
84 | 92 |
85 ReturnAddressLocationResolver GetProfilerReturnAddrResolutionFunc() { | 93 ReturnAddressLocationResolver GetProfilerReturnAddrResolutionFunc() { |
86 return NULL; | 94 return NULL; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 220 |
213 MoveDynamicSymbol GetProfilerMoveDynamicSymbolFunc() { | 221 MoveDynamicSymbol GetProfilerMoveDynamicSymbolFunc() { |
214 return FindFunctionInImports<MoveDynamicSymbol>( | 222 return FindFunctionInImports<MoveDynamicSymbol>( |
215 "MoveDynamicSymbol"); | 223 "MoveDynamicSymbol"); |
216 } | 224 } |
217 | 225 |
218 #endif // defined(OS_WIN) | 226 #endif // defined(OS_WIN) |
219 | 227 |
220 } // namespace debug | 228 } // namespace debug |
221 } // namespace base | 229 } // namespace base |
OLD | NEW |