btrace2fio: use percentage_random and add filename option
[fio.git] / arch / arch-x86-common.h
index 78fd40c03d40c71f9f915bf615e1cc06dce6a97a..31aa79f1b573841f68575f49788a0cbbee9d1f0c 100644 (file)
@@ -3,15 +3,6 @@
 
 #include <string.h>
 
-static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
-                           unsigned int *ecx, unsigned int *edx)
-{
-       asm volatile("cpuid"
-               : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
-               : "0" (*eax), "2" (*ecx)
-               : "memory");
-}
-
 static inline void cpuid(unsigned int op,
                         unsigned int *eax, unsigned int *ebx,
                         unsigned int *ecx, unsigned int *edx)
@@ -63,12 +54,13 @@ static inline int arch_init_amd(unsigned int level)
 static inline int arch_init(char *envp[])
 {
        unsigned int level;
-       char str[12];
+       char str[13];
 
        cpuid(0, &level, (unsigned int *) &str[0],
                         (unsigned int *) &str[8],
                         (unsigned int *) &str[4]);
 
+       str[12] = '\0';
        if (!strcmp(str, "GenuineIntel"))
                tsc_reliable = arch_init_intel(level);
        else if (!strcmp(str, "AuthenticAMD"))