OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef BASE_DEBUG_PROFILER_H | 5 #ifndef BASE_DEBUG_PROFILER_H |
6 #define BASE_DEBUG_PROFILER_H | 6 #define BASE_DEBUG_PROFILER_H |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... | |
27 | 27 |
28 // Force data to be written to file. | 28 // Force data to be written to file. |
29 BASE_EXPORT void FlushProfiling(); | 29 BASE_EXPORT void FlushProfiling(); |
30 | 30 |
31 // Returns true if process is being profiled. | 31 // Returns true if process is being profiled. |
32 BASE_EXPORT bool BeingProfiled(); | 32 BASE_EXPORT bool BeingProfiled(); |
33 | 33 |
34 // Reset profiling after a fork, which disables timers. | 34 // Reset profiling after a fork, which disables timers. |
35 BASE_EXPORT void RestartProfilingAfterFork(); | 35 BASE_EXPORT void RestartProfilingAfterFork(); |
36 | 36 |
37 // Returns true iff this executable is instrumented with the Syzygy profiler. | |
38 BASE_EXPORT bool IsBinaryInstrumented(); | |
39 | |
40 // A return address resolution function is used to resolve the location | |
41 // on stack where a return address originally resided, to the location where | |
42 // the profiler stashed the original return address. | |
jar (doing other things)
2012/02/27 22:44:10
I couldn't understand this comment. Specifically,
Sigurður Ásgeirsson
2012/02/28 16:31:40
Reworked comment with a lot more detail.
| |
43 // This is necessary for V8 and any other code that looks at the return address | |
44 // to see where a call originated and/or rewrites the return address. V8 looks | |
45 // at the return address to identify the JavaScript function that invoked it, | |
46 // and may rewrite return addresses when it garbage collects or optimizes the | |
47 // JIT code. | |
48 typedef uintptr_t (*ReturnAddressLocationResolver)( | |
49 uintptr_t return_addr_location); | |
50 | |
51 // If this binary is instrumented and the instrumentation supplies a return | |
52 // address resolution function, finds and returns the address resolution | |
53 // function. Otherwise returns NULL. | |
54 BASE_EXPORT ReturnAddressLocationResolver | |
55 GetProfilerReturnAddrResolutionFunc(); | |
56 | |
37 } // namespace debug | 57 } // namespace debug |
38 } // namespace base | 58 } // namespace base |
39 | 59 |
40 #endif // BASE_DEBUG_DEBUGGER_H | 60 #endif // BASE_DEBUG_DEBUGGER_H |
OLD | NEW |