First cut of the new log profiler and report generator.
[mono.git] / mono / profiler / utils.h
1 #ifndef __MONO_MPLOG_UTILS_H__
2 #define __MONO_MPLOG_UTILS_H__
3
4 #include <inttypes.h>
5
6 void utils_init (int fast_time);
7 uint64_t current_time (void);
8 void* alloc_buffer (int size);
9 void free_buffer (void *buf, int size);
10 void take_lock (void);
11 void release_lock (void);
12 uintptr_t thread_id (void);
13
14 void encode_uleb128 (uint64_t value, uint8_t *buf, uint8_t **endbuf);
15 void encode_sleb128 (intptr_t value, uint8_t *buf, uint8_t **endbuf);
16 uint64_t decode_uleb128 (uint8_t *buf, uint8_t **endbuf);
17 intptr_t decode_sleb128 (uint8_t *buf, uint8_t **endbuf);
18
19
20 #endif /* __MONO_MPLOG_UTILS_H__ */
21