未验证 提交 ab820d7a 编写于 作者: J Johan Lorensson 提交者: GitHub

Adapt more Mono profiler events into NativeRuntimeEvents. (#53677)

上级 e0671e7e
......@@ -23,6 +23,7 @@
#include <mono/metadata/w32file.h>
#include <mono/metadata/w32event.h>
#include <mono/metadata/environment-internals.h>
#include <mono/metadata/profiler.h>
#undef EP_ARRAY_SIZE
#define EP_ARRAY_SIZE(expr) G_N_ELEMENTS(expr)
......@@ -2165,9 +2166,50 @@ ep_rt_mono_write_event_method_load (
bool
ep_rt_mono_write_event_module_load (MonoImage *image);
bool
ep_rt_mono_write_event_module_unload (MonoImage *image);
bool
ep_rt_mono_write_event_assembly_load (MonoAssembly *assembly);
bool
ep_rt_mono_write_event_assembly_unload (MonoAssembly *assembly);
bool
ep_rt_mono_write_event_thread_created (ep_rt_thread_id_t tid);
bool
ep_rt_mono_write_event_thread_terminated (ep_rt_thread_id_t tid);
bool
ep_rt_mono_write_event_type_load_start (MonoType *type);
bool
ep_rt_mono_write_event_type_load_stop (MonoType *type);
bool
ep_rt_mono_write_event_exception_thrown (MonoObject *object);
bool
ep_rt_mono_write_event_exception_clause (
MonoMethod *method,
uint32_t clause_num,
MonoExceptionEnum clause_type,
MonoObject *obj);
bool
ep_rt_mono_write_event_monitor_contention_start (MonoObject *obj);
bool
ep_rt_mono_write_event_monitor_contention_stop (MonoObject *obj);
bool
ep_rt_mono_write_event_method_jit_memory_allocated_for_code (
const uint8_t *buffer,
uint64_t size,
MonoProfilerCodeBufferType type,
const void *data);
bool
ep_rt_write_event_threadpool_worker_thread_start (
uint32_t active_thread_count,
......
......@@ -3,22 +3,36 @@
AppDomainDCEnd_V1
AssemblyDCEnd_V1
AssemblyLoad_V1
AssemblyUnload_V1
ContentionStart_V1
ContentionStop
DCEndComplete_V1
DCEndInit_V1
DomainModuleDCEnd_V1
DomainModuleLoad_V1
EEStartupStart_V1
ExceptionCatchStart
ExceptionCatchStop
ExecutionCheckpointDCEnd
ExceptionFilterStart
ExceptionFilterStop
ExceptionFinallyStart
ExceptionFinallyStop
ExceptionThrown_V1
ExceptionThrownStop
MethodDCEndILToNativeMap
MethodDCEnd_V1
MethodDCEndVerbose_V1
MethodILToNativeMap
MethodJitMemoryAllocatedForCode
MethodJittingStarted_V1
MethodLoad_V1
MethodLoadVerbose_V1
ModuleDCEnd_V2
ModuleLoad_V2
ModuleUnload_V2
RuntimeInformationDCStart
ThreadCreated
ThreadPoolIODequeue
ThreadPoolIOEnqueue
ThreadPoolWorkerThreadAdjustmentAdjustment
......@@ -28,3 +42,6 @@ ThreadPoolWorkerThreadStart
ThreadPoolWorkerThreadStop
ThreadPoolWorkerThreadWait
ThreadPoolWorkingThreadCount
ThreadTerminated
TypeLoadStart
TypeLoadStop
......@@ -86,7 +86,7 @@ extern void mono_gc_set_stack_end (void *stack_end);
* Not exported in public headers, but can be linked to (unsupported).
*/
gboolean mono_object_is_alive (MonoObject* obj);
gboolean mono_gc_is_finalizer_thread (MonoThread *thread);
MONO_COMPONENT_API gboolean mono_gc_is_finalizer_thread (MonoThread *thread);
void mono_gchandle_set_target (MonoGCHandle gchandle, MonoObject *obj);
......
......@@ -1751,7 +1751,7 @@ mono_object_clone_checked (MonoObject *obj, MonoError *error);
MonoObjectHandle
mono_object_clone_handle (MonoObjectHandle obj, MonoError *error);
MonoObject *
MONO_COMPONENT_API MonoObject *
mono_object_isinst_checked (MonoObject *obj, MonoClass *klass, MonoError *error);
MonoObjectHandle
......
......@@ -157,6 +157,9 @@ mono_profiler_clauses_enabled (void)
return mono_profiler_state.clauses;
}
MONO_COMPONENT_API gboolean
mono_component_profiler_clauses_enabled (void);
#define _MONO_PROFILER_EVENT(name, ...) \
ICALL_EXPORT void mono_profiler_raise_ ## name (__VA_ARGS__);
#define MONO_PROFILER_EVENT_0(name, type) \
......
......@@ -595,6 +595,12 @@ mono_profiler_enable_clauses (void)
return mono_profiler_state.clauses = TRUE;
}
gboolean
mono_component_profiler_clauses_enabled (void)
{
return mono_profiler_clauses_enabled ();
}
/**
* mono_profiler_set_call_instrumentation_filter_callback:
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册