[remoting] Pass correct object to invoke of IRemotingTypeInfo.CanCastTo
[mono.git] / mono / utils / mono-counters.h
index c590c64b095173e66cb987573a07ed59f0902ef6..991a4d9bd0d8092c27e0ec9658141e686844ada0 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_COUNTERS_H__
 #define __MONO_COUNTERS_H__
 
@@ -25,6 +29,8 @@ enum {
        MONO_COUNTER_SECURITY = 1 << 12,
        MONO_COUNTER_RUNTIME  = 1 << 13,
        MONO_COUNTER_SYSTEM   = 1 << 14,
+       MONO_COUNTER_PERFCOUNTERS = 1 << 15,
+       MONO_COUNTER_PROFILER = 1 << 16,
        MONO_COUNTER_LAST_SECTION,
 
        /* Unit, bits 24-27 (4 bits) */
@@ -46,8 +52,8 @@ enum {
 
 typedef struct _MonoCounter MonoCounter;
 
-
 MONO_API void mono_counters_enable (int section_mask);
+MONO_API void mono_counters_init (void);
 
 /* 
  * register addr as the address of a counter of type type.
@@ -55,6 +61,10 @@ MONO_API void mono_counters_enable (int section_mask);
  * the function should return the value and take no arguments.
  */
 MONO_API void mono_counters_register (const char* descr, int type, void *addr);
+MONO_API void mono_counters_register_with_size (const char *name, int type, void *addr, int size);
+
+typedef void (*MonoCounterRegisterCallback) (MonoCounter*);
+MONO_API void mono_counters_on_register (MonoCounterRegisterCallback callback);
 
 /* 
  * Create a readable dump of the counters for section_mask sections (ORed section values)
@@ -67,6 +77,15 @@ typedef mono_bool (*CountersEnumCallback) (MonoCounter *counter, void *user_data
 
 MONO_API void mono_counters_foreach (CountersEnumCallback cb, void *user_data);
 
+MONO_API int mono_counters_sample (MonoCounter *counter, void *buffer, int buffer_size);
+
+MONO_API const char* mono_counter_get_name (MonoCounter *name);
+MONO_API int mono_counter_get_type (MonoCounter *counter);
+MONO_API int mono_counter_get_section (MonoCounter *counter);
+MONO_API int mono_counter_get_unit (MonoCounter *counter);
+MONO_API int mono_counter_get_variance (MonoCounter *counter);
+MONO_API size_t mono_counter_get_size (MonoCounter *counter);
+
 typedef enum {
        MONO_RESOURCE_JIT_CODE, /* bytes */
        MONO_RESOURCE_METADATA, /* bytes */