Index: src/platform.h |
diff --git a/src/platform.h b/src/platform.h |
index a0186d580fe32c6573d7dc3031011bd0244b0ea8..691c42a468d6f23e5f8ca10f5f784c1546b35881 100644 |
--- a/src/platform.h |
+++ b/src/platform.h |
@@ -256,6 +256,20 @@ class OS { |
// using --never-compact) if accurate profiling is desired. |
static void SignalCodeMovingGC(); |
+ // Support for profilers that change the return address for functions under |
+ // profiling. The input is a pointer to a return address on the stack, and the |
+ // return value is either that same pointer, or a pointer to the location |
+ // where the profiler has stashed the actual return address. |
+ // This is implemented only for the Syzygy instrumenting performance profiler |
+ // on Win32 at present. |
+#ifdef _WIN32 |
+ static Address* ResolveReturnAddressLocation(Address* pc_address); |
+#else |
+ static Address* ResolveReturnAddressLocation(Address* pc_address) { |
+ return pc_address; |
+ } |
+#endif |
+ |
// The return value indicates the CPU features we are sure of because of the |
// OS. For example MacOSX doesn't run on any x86 CPUs that don't have SSE2 |
// instructions. |