提交 25cc2142 编写于 作者: M Mantas Puida

Merge branch 'Mono2.6.x-Unity3.x' of github.com:Unity-Technologies/mono into Mono2.6.x-Unity3.x

......@@ -39,6 +39,7 @@ void mono_profiler_stat_hit (guchar *ip, void *context) MONO_INTERNAL;
void mono_profiler_stat_call_chain (int call_chain_depth, guchar **ips, void *context) MONO_INTERNAL;
#define MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH 16
int mono_profiler_stat_get_call_chain_depth (void) MONO_INTERNAL;
MonoProfilerCallChainStrategy mono_profiler_stat_get_call_chain_strategy (void) MONO_INTERNAL;
void mono_profiler_thread_start (gsize tid) MONO_INTERNAL;
void mono_profiler_thread_end (gsize tid) MONO_INTERNAL;
......@@ -58,11 +59,14 @@ void mono_profiler_class_loaded (MonoClass *klass, int result) MONO_INTERNAL;
void mono_profiler_appdomain_event (MonoDomain *domain, int code) MONO_INTERNAL;
void mono_profiler_appdomain_loaded (MonoDomain *domain, int result) MONO_INTERNAL;
void mono_profiler_iomap (char *report, const char *pathname, const char *new_pathname) MONO_INTERNAL;
MonoProfileCoverageInfo* mono_profiler_coverage_alloc (MonoMethod *method, int entries) MONO_INTERNAL;
void mono_profiler_coverage_free (MonoMethod *method) MONO_INTERNAL;
void mono_profiler_gc_event (MonoGCEvent e, int generation) MONO_INTERNAL;
void mono_profiler_gc_heap_resize (gint64 new_size) MONO_INTERNAL;
void mono_profiler_gc_moves (void **objects, int num) MONO_INTERNAL;
void mono_profiler_code_chunk_new (gpointer chunk, int size) MONO_INTERNAL;
void mono_profiler_code_chunk_destroy (gpointer chunk) MONO_INTERNAL;
......
此差异已折叠。
......@@ -25,7 +25,9 @@ typedef enum {
MONO_PROFILE_INS_COVERAGE = 1 << 14,
MONO_PROFILE_STATISTICAL = 1 << 15,
MONO_PROFILE_METHOD_EVENTS = 1 << 16,
MONO_PROFILE_MONITOR_EVENTS = 1 << 17
MONO_PROFILE_MONITOR_EVENTS = 1 << 17,
MONO_PROFILE_IOMAP_EVENTS = 1 << 18, /* this should likely be removed, too */
MONO_PROFILE_GC_MOVES = 1 << 19
} MonoProfileFlags;
typedef enum {
......@@ -71,6 +73,14 @@ typedef enum {
MONO_PROFILER_MONITOR_FAIL = 3
} MonoProfilerMonitorEvent;
typedef enum {
MONO_PROFILER_CALL_CHAIN_NONE = 0,
MONO_PROFILER_CALL_CHAIN_NATIVE = 1,
MONO_PROFILER_CALL_CHAIN_GLIBC = 2,
MONO_PROFILER_CALL_CHAIN_MANAGED = 3,
MONO_PROFILER_CALL_CHAIN_INVALID = 4
} MonoProfilerCallChainStrategy;
/*
* Functions that the runtime will call on the profiler.
*/
......@@ -101,8 +111,11 @@ typedef void (*MonoProfileAllocFunc) (MonoProfiler *prof, MonoObject *obj,
typedef void (*MonoProfileStatFunc) (MonoProfiler *prof, guchar *ip, void *context);
typedef void (*MonoProfileStatCallChainFunc) (MonoProfiler *prof, int call_chain_depth, guchar **ip, void *context);
typedef void (*MonoProfileGCFunc) (MonoProfiler *prof, MonoGCEvent event, int generation);
typedef void (*MonoProfileGCMoveFunc) (MonoProfiler *prof, void **objects, int num);
typedef void (*MonoProfileGCResizeFunc) (MonoProfiler *prof, gint64 new_size);
typedef void (*MonoProfileIomapFunc) (MonoProfiler *prof, const char *report, const char *pathname, const char *new_pathname);
typedef gboolean (*MonoProfileCoverageFilterFunc) (MonoProfiler *prof, MonoMethod *method);
typedef void (*MonoProfileCoverageFunc) (MonoProfiler *prof, const MonoProfileCoverageEntry *entry);
......@@ -139,13 +152,16 @@ void mono_profiler_install_transition (MonoProfileMethodResult callback);
void mono_profiler_install_allocation (MonoProfileAllocFunc callback);
void mono_profiler_install_monitor (MonoProfileMonitorFunc callback);
void mono_profiler_install_statistical (MonoProfileStatFunc callback);
void mono_profiler_install_statistical_call_chain (MonoProfileStatCallChainFunc callback, int call_chain_depth);
void mono_profiler_install_statistical_call_chain (MonoProfileStatCallChainFunc callback, int call_chain_depth, MonoProfilerCallChainStrategy call_chain_strategy);
void mono_profiler_install_exception (MonoProfileExceptionFunc throw_callback, MonoProfileMethodFunc exc_method_leave, MonoProfileExceptionClauseFunc clause_callback);
void mono_profiler_install_coverage_filter (MonoProfileCoverageFilterFunc callback);
void mono_profiler_coverage_get (MonoProfiler *prof, MonoMethod *method, MonoProfileCoverageFunc func);
void mono_profiler_install_gc (MonoProfileGCFunc callback, MonoProfileGCResizeFunc heap_resize_callback);
void mono_profiler_install_gc_moves (MonoProfileGCMoveFunc callback);
void mono_profiler_install_runtime_initialized (MonoProfileFunc runtime_initialized_callback);
void mono_profiler_install_iomap (MonoProfileIomapFunc callback);
void mono_profiler_install_code_chunk_new (MonoProfilerCodeChunkNew callback);
void mono_profiler_install_code_chunk_destroy (MonoProfilerCodeChunkDestroy callback);
void mono_profiler_install_code_buffer_new (MonoProfilerCodeBufferNew callback);
......
......@@ -5848,7 +5848,7 @@ mono_profiler_startup (const char *desc)
mono_profiler_install_allocation (object_allocated);
mono_profiler_install_monitor (monitor_event);
mono_profiler_install_statistical (statistical_hit);
mono_profiler_install_statistical_call_chain (statistical_call_chain, profiler->statistical_call_chain_depth);
mono_profiler_install_statistical_call_chain (statistical_call_chain, profiler->statistical_call_chain_depth, MONO_PROFILER_CALL_CHAIN_MANAGED);
mono_profiler_install_gc (gc_event, gc_resize);
mono_profiler_install_runtime_initialized (runtime_initialized);
#if (HAS_OPROFILE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册