Lines Matching defs:cache
1065 static int cpu_cache_level__read(struct cpu_cache_level *cache, u32 cpu, u16 level)
1071 scnprintf(path, PATH_MAX, "devices/system/cpu/cpu%d/cache/index%d/", cpu, level);
1078 if (sysfs__read_int(file, (int *) &cache->level))
1082 if (sysfs__read_int(file, (int *) &cache->line_size))
1086 if (sysfs__read_int(file, (int *) &cache->sets))
1090 if (sysfs__read_int(file, (int *) &cache->ways))
1094 if (sysfs__read_str(file, &cache->type, &len))
1097 cache->type[len] = 0;
1098 cache->type = strim(cache->type);
1101 if (sysfs__read_str(file, &cache->size, &len)) {
1102 zfree(&cache->type);
1106 cache->size[len] = 0;
1107 cache->size = strim(cache->size);
1110 if (sysfs__read_str(file, &cache->map, &len)) {
1111 zfree(&cache->size);
1112 zfree(&cache->type);
1116 cache->map[len] = 0;
1117 cache->map = strim(cache->map);
1907 fprintf(fp, "# CPU cache info:\n");
3118 FEAT_OPN(CACHE, cache, true),