x86: interrupt return path checks kmsgs
[akaros.git] / kern / arch / i686 / perfmon.h
index c03c59d..051f336 100644 (file)
 
 
 static __inline uint64_t
-read_pmc(void)
-{
+read_pmc(uint32_t index)
+{                                                                                                    
     uint64_t pmc;
-    __asm __volatile("rdpmc" : "=A" (pmc));
-    return pmc;
+
+    __asm __volatile("rdpmc" : "=A" (pmc) : "c" (index)); 
+    return pmc;                                                                                      
 }
 
 void perfmon_init();