Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / metadata / mono-perfcounters.h
1 /**
2  * \file
3  */
4
5 #ifndef __MONO_PERFCOUNTERS_H__
6 #define __MONO_PERFCOUNTERS_H__
7
8 #include <glib.h>
9 #include <mono/metadata/object.h>
10 #include <mono/utils/mono-compiler.h>
11
12 typedef struct _MonoCounterSample MonoCounterSample;
13
14 void* mono_perfcounter_get_impl (MonoString* category, MonoString* counter, MonoString* instance,
15                 MonoString* machine, int *type, MonoBoolean *custom);
16
17 MonoBoolean mono_perfcounter_get_sample (void *impl, MonoBoolean only_value, MonoCounterSample *sample);
18
19 gint64 mono_perfcounter_update_value    (void *impl, MonoBoolean do_incr, gint64 value);
20 void   mono_perfcounter_free_data       (void *impl);
21
22 /* Category icalls */
23 MonoBoolean mono_perfcounter_category_del    (MonoString *name);
24 MonoString* mono_perfcounter_category_help   (MonoString *category, MonoString *machine);
25 MonoBoolean mono_perfcounter_category_exists (MonoString *counter, MonoString *category, MonoString *machine);
26 MonoBoolean mono_perfcounter_create          (MonoString *category, MonoString *help, int type, MonoArray *items);
27 int         mono_perfcounter_instance_exists (MonoString *instance, MonoString *category, MonoString *machine);
28 MonoArray*  mono_perfcounter_category_names  (MonoString *machine);
29 MonoArray*  mono_perfcounter_counter_names   (MonoString *category, MonoString *machine);
30 MonoArray*  mono_perfcounter_instance_names  (MonoString *category, MonoString *machine);
31
32 typedef gboolean (*PerfCounterEnumCallback) (char *category_name, char *name, unsigned char type, gint64 value, gpointer user_data);
33 MONO_API void mono_perfcounter_foreach (PerfCounterEnumCallback cb, gpointer user_data);
34
35 #endif /* __MONO_PERFCOUNTERS_H__ */
36