[runtime] New profiler API.
[mono.git] / mono / mini / mini-windows.c
index 9983e27d1b3b5913a0c5eb28b21bc3b3f289c477..3852baf81f1268a1862a32274c4d3a67c4ea3ff6 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-posix.c: POSIX signal handling support for Mono.
+/**
+ * \file
+ * POSIX signal handling support for Mono.
  *
  * Authors:
  *   Mono Team (mono-list@lists.ximian.com)
@@ -270,11 +271,15 @@ thread_timer_expired (HANDLE thread)
 
        context.ContextFlags = CONTEXT_CONTROL;
        if (GetThreadContext (thread, &context)) {
+               guchar *ip;
+
 #ifdef _WIN64
-               mono_profiler_stat_hit ((guchar *) context.Rip, &context);
+               ip = (guchar *) context.Rip;
 #else
-               mono_profiler_stat_hit ((guchar *) context.Eip, &context);
+               ip = (guchar *) context.Eip;
 #endif
+
+               MONO_PROFILER_RAISE (sample_hit, (ip, &context));
        }
 }