Thu Feb 25 11:59:22 CET 2010 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / profiler / mono-profiler-logging.c
index 404a95196d0f9e7f2888352c56f5ed3d1121155b..9ed3cb8cde298fd011036322b3b09cf45922b004 100644 (file)
@@ -9,6 +9,7 @@
 #include <config.h>
 #include <mono/metadata/profiler.h>
 #include <mono/metadata/class.h>
+#include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/class-internals.h>
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/loader.h>
@@ -133,7 +134,7 @@ typedef enum {
 
 static gboolean use_fast_timer = FALSE;
 
-#if (defined(__i386__) || defined(__x86_64__)) && ! defined(PLATFORM_WIN32)
+#if (defined(__i386__) || defined(__x86_64__)) && ! defined(HOST_WIN32)
 
 #if defined(__i386__)
 static const guchar cpuid_impl [] = {
@@ -674,7 +675,7 @@ typedef struct _ProfilerExecutableFiles {
 #define CLEANUP_WRITER_THREAD() do {profiler->writer_thread_terminated = TRUE;} while (0)
 #define CHECK_WRITER_THREAD() (! profiler->writer_thread_terminated)
 
-#ifndef PLATFORM_WIN32
+#ifndef HOST_WIN32
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/stat.h>
@@ -838,7 +839,7 @@ static __thread ProfilerPerThreadData * tls_profiler_per_thread_data;
 #define PROFILER_FILE_WRITE_BUFFER_SIZE (profiler->write_buffer_size)
 typedef struct _ProfilerFileWriteBuffer {
        struct _ProfilerFileWriteBuffer *next;
-       guint8 buffer [];
+       guint8 buffer [MONO_ZERO_LEN_ARRAY];
 } ProfilerFileWriteBuffer;
 
 #define CHECK_PROFILER_ENABLED() do {\
@@ -4462,7 +4463,7 @@ method_free (MonoProfiler *profiler, MonoMethod *method) {
 }
 
 static void
-thread_start (MonoProfiler *profiler, gsize tid) {
+thread_start (MonoProfiler *profiler, intptr_t tid) {
        ProfilerPerThreadData *data;
        ProfilerEventData *event;
        GET_PROFILER_THREAD_DATA (data);
@@ -4471,7 +4472,7 @@ thread_start (MonoProfiler *profiler, gsize tid) {
        COMMIT_RESERVED_EVENTS (data);
 }
 static void
-thread_end (MonoProfiler *profiler, gsize tid) {
+thread_end (MonoProfiler *profiler, intptr_t tid) {
        ProfilerPerThreadData *data;
        ProfilerEventData *event;
        GET_PROFILER_THREAD_DATA (data);