* Dietmar Maurer (dietmar@ximian.com)
*
* (C) 2002 Ximian, Inc.
+ * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
*/
#include <config.h>
#include <mono/utils/mono-time.h>
#include "trace.h"
+#if defined (PLATFORM_ANDROID) || (defined (TARGET_IOS) && defined (TARGET_IOS))
+# undef printf
+# define printf(...) g_log("mono", G_LOG_LEVEL_MESSAGE, __VA_ARGS__)
+# undef fprintf
+# define fprintf(__ignore, ...) g_log ("mono-gc", G_LOG_LEVEL_MESSAGE, __VA_ARGS__)
+#endif
+
static MonoTraceSpec trace_spec;
gboolean
case MONO_TRACEOP_PROGRAM:
if (trace_spec.assembly && (method->klass->image == mono_assembly_get_image (trace_spec.assembly)))
inc = 1; break;
+ case MONO_TRACEOP_WRAPPER:
+ if ((method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) ||
+ (method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE))
+ inc = 1; break;
case MONO_TRACEOP_METHOD:
if (mono_method_desc_full_match ((MonoMethodDesc *) op->data, method))
inc = 1; break;
TOKEN_PROGRAM,
TOKEN_EXCEPTION,
TOKEN_NAMESPACE,
+ TOKEN_WRAPPER,
TOKEN_STRING,
TOKEN_EXCLUDE,
TOKEN_DISABLED,
return TOKEN_ALL;
if (strcmp (value, "program") == 0)
return TOKEN_PROGRAM;
+ if (strcmp (value, "wrapper") == 0)
+ return TOKEN_WRAPPER;
if (strcmp (value, "disabled") == 0)
return TOKEN_DISABLED;
return TOKEN_STRING;
trace_spec.ops [*last].op = MONO_TRACEOP_ALL;
else if (token == TOKEN_PROGRAM)
trace_spec.ops [*last].op = MONO_TRACEOP_PROGRAM;
+ else if (token == TOKEN_WRAPPER)
+ trace_spec.ops [*last].op = MONO_TRACEOP_WRAPPER;
else if (token == TOKEN_NAMESPACE){
trace_spec.ops [*last].op = MONO_TRACEOP_NAMESPACE;
trace_spec.ops [*last].data = g_strdup (value);
arg_info = alloca (sizeof (MonoJitArgumentInfo) * (sig->param_count + 1));
- mono_arch_get_argument_info (sig, sig->param_count, arg_info);
+ mono_arch_get_argument_info (NULL, sig, sig->param_count, arg_info);
if (MONO_TYPE_ISSTRUCT (mono_method_signature (method)->ret)) {
g_assert (!mono_method_signature (method)->ret->byref);