return NULL;
}
+// For backwards compatibility.
+enum {
+ SAMPLE_CYCLES = 1,
+ SAMPLE_INSTRUCTIONS,
+ SAMPLE_CACHE_MISSES,
+ SAMPLE_CACHE_REFS,
+ SAMPLE_BRANCHES,
+ SAMPLE_BRANCH_MISSES,
+};
+
+enum {
+ MONO_GC_EVENT_MARK_START = 1,
+ MONO_GC_EVENT_MARK_END = 2,
+ MONO_GC_EVENT_RECLAIM_START = 3,
+ MONO_GC_EVENT_RECLAIM_END = 4,
+};
+
static const char*
sample_type_name (int type)
{
}
obj = hs->objects_hash [oi];
cd = obj->hklass;
- if (hs->roots_types [i] & MONO_PROFILE_GC_ROOT_PINNING)
+ if (hs->roots_types [i] & MONO_PROFILER_GC_ROOT_PINNING)
cd->pinned_references++;
cd->root_references++;
}
static const char*
get_root_name (int rtype)
{
- switch (rtype & MONO_PROFILE_GC_ROOT_TYPEMASK) {
- case MONO_PROFILE_GC_ROOT_STACK: return "stack";
- case MONO_PROFILE_GC_ROOT_FINALIZER: return "finalizer";
- case MONO_PROFILE_GC_ROOT_HANDLE: return "handle";
- case MONO_PROFILE_GC_ROOT_OTHER: return "other";
- case MONO_PROFILE_GC_ROOT_MISC: return "misc";
+ switch (rtype & MONO_PROFILER_GC_ROOT_TYPEMASK) {
+ case MONO_PROFILER_GC_ROOT_STACK: return "stack";
+ case MONO_PROFILER_GC_ROOT_FINALIZER: return "finalizer";
+ case MONO_PROFILER_GC_ROOT_HANDLE: return "handle";
+ case MONO_PROFILER_GC_ROOT_OTHER: return "other";
+ case MONO_PROFILER_GC_ROOT_MISC: return "misc";
default: return "unknown";
}
}
for (i = 0; i < num; ++i) {
intptr_t objdiff = decode_sleb128 (p, &p);
int root_type;
- if (ctx->data_version > 12)
+ if (ctx->data_version == 13)
root_type = *p++;
else
root_type = decode_uleb128 (p, &p);
uint64_t tdiff = decode_uleb128 (p + 1, &p);
LOG_TIME (time_base, tdiff);
time_base += tdiff;
- sample_type = *p++;
+ if (ctx->data_version < 14)
+ sample_type = *p++;
+ else
+ sample_type = SAMPLE_CYCLES;
tstamp = time_base;
} else {
sample_type = decode_uleb128 (p + 1, &p);