Chromium Code Reviews| Index: base/debug/profiler.h |
| diff --git a/base/debug/profiler.h b/base/debug/profiler.h |
| index d703876b4df5d0151bf0c05ca021de33cc66c12a..973e4f221887e4416c7eaf590550155825fd6902 100644 |
| --- a/base/debug/profiler.h |
| +++ b/base/debug/profiler.h |
| @@ -55,11 +55,32 @@ BASE_EXPORT bool IsBinaryInstrumented(); |
| typedef uintptr_t (*ReturnAddressLocationResolver)( |
| uintptr_t return_addr_location); |
| -// If this binary is instrumented and the instrumentation supplies a return |
| -// address resolution function, finds and returns the address resolution |
| -// function. Otherwise returns NULL. |
| -BASE_EXPORT ReturnAddressLocationResolver |
| - GetProfilerReturnAddrResolutionFunc(); |
| +// This type declaration must match V8's FunctionEntryHook. |
| +typedef void (*DynamicFunctionEntryHook)(uintptr_t function, |
| + uintptr_t return_addr_location); |
| + |
| +// The functions below here are to support profiling V8-generated code. |
| +// V8 has provisions for generating a call to an entry hook for newly generated |
| +// JIT code, and it can push symbol information on code generation and advise |
| +// when the garbage collector moves code. The functions declarations below here |
| +// make glue between V8's facilities and a profiler. |
| + |
| +// This type declaration must match V8's FunctionEntryHook. |
| +typedef void (*DynamicFunctionEntryHook)(uintptr_t function, |
| + uintptr_t return_addr_location); |
| + |
| +typedef void (*AddDynamicSymbol)( |
| + const void* address, size_t length, const char* name, size_t name_len); |
|
jar (doing other things)
2013/06/22 00:38:14
nit: Chromium style guide suggests that for declar
Sigurður Ásgeirsson
2013/06/27 17:42:35
Done.
|
| +typedef void (*MoveDynamicSymbol)(const void* address, const void* new_address); |
| + |
| + |
| +// If this binary is instrumented and the instrumentation supplies a function |
| +// for each of those purposes, find and return the the function in question. |
| +// Otherwise returns NULL. |
| +BASE_EXPORT ReturnAddressLocationResolver GetProfilerReturnAddrResolutionFunc(); |
| +BASE_EXPORT DynamicFunctionEntryHook GetProfilerDynamicFunctionEntryHookFunc(); |
| +BASE_EXPORT AddDynamicSymbol GetProfilerAddDynamicSymbolFunc(); |
| +BASE_EXPORT MoveDynamicSymbol GetProfilerMoveDynamicSymbolFunc(); |
| } // namespace debug |
| } // namespace base |