blob: d0c6bcc7fde561512b6068a7e4f469958675870e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef BASE_PROFILE_H
#define BASE_PROFILE_H
typedef struct Profile Profile;
struct Profile {
f32 start, end;
};
#if ARCH_x86_64
#define StartProfile(arena, callback) internal Profile *x86_start_profile(MemArena *arena, void *callback);
#define EndProfile(profile, scratch) internal void x86_end_profile(Profile *profile, ScratchArena *scratch);
/* #define GetCycles(high, low) do \ { \
asm volatile ("RDTSC\n\t" \
"mov %%edx, %0\n\t" \
"mov %%eax, %1\n\t": "=r" (cycles_high), "=r" (cycles_low):: “%eax”, “%edx”); \
while(0); */
#elif ARCH_ARM
#endif // ARCH
#endif // BASE_PROFILE_H
|