if (!has_target)
g_free (buff);
}
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL);
return start;
}
/* Load the vtable */
amd64_mov_reg_membase (code, AMD64_RAX, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoObject, vtable), 8);
amd64_jump_membase (code, AMD64_RAX, offset);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL);
return start;
}
g_assert (code - start <= size);
nacl_domain_code_validate(domain, &start, size, &code);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_IMT_TRAMPOLINE, NULL);
return start;
}
#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
+#include <mono/metadata/profiler-private.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/utils/mono-mmap.h>
#include <mono/utils/mono-hwcap-arm.h>
mono_arch_flush_icache (start, size);
}
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL);
if (code_size)
*code_size = code - start;
ARM_LDM (code, ARMREG_IP, 0xffff);
mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
return start;
}
#endif
mono_arch_flush_icache ((guint8*)start, size);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_IMT_TRAMPOLINE, NULL);
mono_stats.imt_thunks_size += code - start;
g_assert (DISTANCE (start, code) <= size);
}
nacl_domain_code_validate (domain, &start, size, &code);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_IMT_TRAMPOLINE, NULL);
return start;
}
if (!has_target)
g_free (buff);
}
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL);
return start;
}
/* Load the vtable */
x86_mov_reg_membase (code, X86_EAX, X86_ECX, MONO_STRUCT_OFFSET (MonoObject, vtable), 4);
x86_jump_membase (code, X86_EAX, offset);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_DELEGATE_INVOKE, NULL);
return start;
}
#include <mono/metadata/tabledefs.h>
#include <mono/metadata/mono-debug-debugger.h>
#include <mono/metadata/monitor.h>
-#include <mono/metadata/monitor.h>
+#include <mono/metadata/profiler-private.h>
#include <mono/metadata/gc-internal.h>
#include <mono/arch/amd64/amd64-codegen.h>
nacl_domain_code_validate (domain, &start, size, &code);
mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_UNBOX_TRAMPOLINE, m);
return start;
}
nacl_domain_code_validate (domain, &start, buf_len, &code);
mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
return start;
}
nacl_domain_code_validate (domain, &start, buf_len, &code);
mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_IMT_TRAMPOLINE, NULL);
return start;
}
addr = thunk_start;
g_assert ((((guint64)(addr)) >> 32) == 0);
mono_arch_flush_icache (thunk_start, thunk_code - thunk_start);
+ mono_profiler_code_buffer_new (thunk_start, thunk_code - thunk_start, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
#endif
}
if (can_write) {
*(guint64*)thunk_code = (guint64)addr;
addr = thunk_start;
mono_arch_flush_icache (thunk_start, thunk_code - thunk_start);
+ mono_profiler_code_buffer_new (thunk_start, thunk_code - thunk_start, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
return addr;
}
nacl_global_codeman_validate (&buf, kMaxCodeSize, &code);
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
if (info) {
tramp_name = mono_get_generic_trampoline_name (tramp_type);
nacl_global_codeman_validate(&buf, size, &code);
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
if (info)
*info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
nacl_domain_code_validate(domain, &buf, size, &code);
mono_arch_flush_icache (buf, size);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE, mono_get_generic_trampoline_simple_name (tramp_type));
return buf;
}
nacl_global_codeman_validate (&buf, tramp_size, &code);
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
g_assert (code - buf <= tramp_size);
nacl_global_codeman_validate (&buf, tramp_size, &code);
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
g_assert (code - buf <= tramp_size);
nacl_global_codeman_validate (&buf, tramp_size, &code);
mono_arch_flush_icache (code, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_MONITOR, NULL);
g_assert (code - buf <= tramp_size);
if (info)
nacl_global_codeman_validate (&buf, tramp_size, &code);
mono_arch_flush_icache (code, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_MONITOR, NULL);
g_assert (code - buf <= tramp_size);
if (info)
}
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
g_assert (code - buf <= tramp_size);
if (info)
#include <mono/metadata/appdomain.h>
#include <mono/metadata/marshal.h>
#include <mono/metadata/tabledefs.h>
+#include <mono/metadata/profiler-private.h>
#include <mono/arch/arm/arm-codegen.h>
#include <mono/arch/arm/arm-vfp-codegen.h>
/* Flush instruction cache, since we've generated code */
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
/* Sanity check */
g_assert ((code - buf) <= buf_len);
code = emit_bx (code, ARMREG_LR);
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
if (info)
*info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
/* Flush instruction cache, since we've generated code */
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE, mono_get_generic_trampoline_simple_name (tramp_type));
g_assert ((code - buf) <= size);
code += 4;
#endif
mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_UNBOX_TRAMPOLINE, m);
g_assert ((code - start) <= size);
/*g_print ("unbox trampoline at %d for %s:%s\n", this_pos, m->klass->name, m->name);
g_print ("unbox code is at %p for method at %p\n", start, addr);*/
g_assert ((code - start) <= buf_len);
mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
return start;
}
}
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
g_assert (code - buf <= tramp_size);
code = emit_bx (code, ARMREG_R1);
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
g_assert (code - buf <= tramp_size);
}
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
g_assert (code - buf <= tramp_size);
code += 4;
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
g_assert (code - buf <= tramp_size);
if (info)
nacl_domain_code_validate (domain, &start, buf_len, &code);
mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_GENERICS_TRAMPOLINE, NULL);
return start;
}
#include <mono/metadata/mono-debug.h>
#include <mono/metadata/mono-debug-debugger.h>
#include <mono/metadata/monitor.h>
+#include <mono/metadata/profiler-private.h>
#include <mono/metadata/gc-internal.h>
#include <mono/arch/x86/x86-codegen.h>
g_assert ((code - start) < size);
nacl_domain_code_validate (domain, &start, size, &code);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_UNBOX_TRAMPOLINE, m);
return start;
}
nacl_domain_code_validate (domain, &start, buf_len, &code);
mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
return start;
}
nacl_domain_code_validate (domain, &start, buf_len, &code);
mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_IMT_TRAMPOLINE, NULL);
return start;
}
nacl_global_codeman_validate (&buf, 256, &code);
g_assert ((code - buf) <= 256);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
if (info) {
tramp_name = mono_get_generic_trampoline_name (tramp_type);
nacl_global_codeman_validate (&buf, tramp_size, &code);
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
if (info)
*info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
nacl_domain_code_validate (domain, &code, NACL_SIZE (4, kNaClAlignment), &buf);
mono_arch_flush_icache (code, buf - code);
+ mono_profiler_code_buffer_new (code, buf - code, MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE, mono_get_generic_trampoline_simple_name (tramp_type));
if (code_len)
*code_len = buf - code;
nacl_global_codeman_validate (&buf, tramp_size, &code);
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
g_assert (code - buf <= tramp_size);
nacl_global_codeman_validate (&buf, tramp_size, &code);
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
g_assert (code - buf <= tramp_size);
#endif
nacl_global_codeman_validate (&buf, tramp_size, &code);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
if (info)
*info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
g_assert (code - buf <= tramp_size);
nacl_global_codeman_validate (&buf, tramp_size, &code);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_MONITOR, NULL);
if (info)
*info = mono_tramp_info_create ("monitor_enter_trampoline", buf, code - buf, ji, unwind_ops);
mono_arch_flush_icache (buf, code - buf);
g_assert (code - buf <= tramp_size);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_MONITOR, NULL);
if (info)
*info = mono_tramp_info_create ("monitor_exit_trampoline", buf, code - buf, ji, unwind_ops);
nacl_global_codeman_validate (&buf, tramp_size, &code);
mono_arch_flush_icache (buf, code - buf);
+ mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
g_assert (code - buf <= tramp_size);
if (info)
nacl_domain_code_validate (domain, &start, buf_len, &code);
mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
return start;
}