#include "mono-mmap.h"
#include "mono-counters.h"
#include "dlmalloc.h"
-#include <mono/metadata/class-internals.h>
+#include <mono/io-layer/io-layer.h>
#include <mono/metadata/profiler-private.h>
#ifdef HAVE_VALGRIND_MEMCHECK_H
#include <valgrind/memcheck.h>
#endif
static uintptr_t code_memory_used = 0;
+static size_t dynamic_code_alloc_count;
+static size_t dynamic_code_bytes_count;
+static size_t dynamic_code_frees_count;
/*
* AMD64 processors maintain icache coherency only for pages which are
#define MIN_PAGES 16
-#if defined(__ia64__) || defined(__x86_64__)
+#if defined(__ia64__) || defined(__x86_64__) || defined (_WIN64)
/*
* We require 16 byte alignment on amd64 so the fp literals embedded in the code are
* properly aligned for SSE2.
void
mono_code_manager_init (void)
{
+ mono_counters_register ("Dynamic code allocs", MONO_COUNTER_JIT | MONO_COUNTER_WORD, &dynamic_code_alloc_count);
+ mono_counters_register ("Dynamic code bytes", MONO_COUNTER_JIT | MONO_COUNTER_WORD, &dynamic_code_bytes_count);
+ mono_counters_register ("Dynamic code frees", MONO_COUNTER_JIT | MONO_COUNTER_WORD, &dynamic_code_frees_count);
}
void
#if defined(__arm__)
#define BIND_ROOM 8
#endif
+#if defined(TARGET_ARM64)
+#define BIND_ROOM 8
+#endif
static CodeChunk*
new_codechunk (CodeChunk *last, int dynamic, int size)
g_assert (alignment <= MIN_ALIGN);
if (cman->dynamic) {
- ++mono_stats.dynamic_code_alloc_count;
- mono_stats.dynamic_code_bytes_count += size;
+ ++dynamic_code_alloc_count;
+ dynamic_code_bytes_count += size;
}
if (!cman->current) {