11 extern unsigned int pcounters[PCNT_CNT];
12 extern unsigned int pcounter_starts[PCNT_CNT];
14 #define pcnt_start(id) \
15 pcounter_starts[id] = pcnt_get()
17 #define pcnt_end(id) \
18 pcounters[id] += pcnt_get() - pcounter_starts[id]
20 void pcnt_hook_plugins(void);
22 static inline void pcnt_print(float fps)
24 unsigned int total, gpu, spu, rem;
27 for (i = 0; i < PCNT_CNT; i++)
30 total = pcounters[PCNT_ALL];
31 gpu = pcounters[PCNT_GPU];
32 spu = pcounters[PCNT_SPU];
33 rem = total - gpu - spu;
37 printf("%2.1f %6u %6u %6u (%2d %2d %2d)\n", fps, gpu, spu, rem,
38 gpu * 100 / total, spu * 100 / total, rem * 100 / total);
40 memset(pcounters, 0, sizeof(pcounters));
43 static inline unsigned int pcnt_get(void)
46 #ifdef __ARM_ARCH_7A__
47 __asm__ volatile("mrc p15, 0, %0, c9, c13, 0"
57 #define pcnt_start(id)
59 #define pcnt_hook_plugins()
60 #define pcnt_print(fps)