Fetch cache info from cpuid, instead of asking Linux (using /proc)

This commit is contained in:
Dr-Noob
2020-06-20 12:15:59 +02:00
parent e766f38884
commit 04a2fef2a2
6 changed files with 140 additions and 116 deletions

View File

@@ -8,10 +8,12 @@
typedef int VENDOR;
struct cache* get_cache_info();
struct cpuInfo* get_cpu_info();
VENDOR get_cpu_vendor(struct cpuInfo* cpu);
char* get_str_peak_performance(struct cpuInfo* cpu, long freq);
char* get_str_ncores(struct cpuInfo* cpu);
char* get_str_avx(struct cpuInfo* cpu);
char* get_str_sse(struct cpuInfo* cpu);
@@ -19,6 +21,14 @@ char* get_str_fma(struct cpuInfo* cpu);
char* get_str_aes(struct cpuInfo* cpu);
char* get_str_sha(struct cpuInfo* cpu);
char* get_str_l1(struct cache* cach);
char* get_str_l2(struct cache* cach);
char* get_str_l3(struct cache* cach);
void free_cpuinfo_struct(struct cpuInfo* cpu);
void free_cache_struct(struct cache* cach);
void debug_cpu_info(struct cpuInfo* cpu);
void debugCache(struct cache* cach);
#endif