Lines Matching defs:cache
1152 static int cpu_cache_level__read(struct cpu_cache_level *cache, u32 cpu, u16 level)
1158 scnprintf(path, PATH_MAX, "devices/system/cpu/cpu%d/cache/index%d/", cpu, level);
1165 if (sysfs__read_int(file, (int *) &cache->level))
1169 if (sysfs__read_int(file, (int *) &cache->line_size))
1173 if (sysfs__read_int(file, (int *) &cache->sets))
1177 if (sysfs__read_int(file, (int *) &cache->ways))
1181 if (sysfs__read_str(file, &cache->type, &len))
1184 cache->type[len] = 0;
1185 cache->type = strim(cache->type);
1188 if (sysfs__read_str(file, &cache->size, &len)) {
1189 zfree(&cache->type);
1193 cache->size[len] = 0;
1194 cache->size = strim(cache->size);
1197 if (sysfs__read_str(file, &cache->map, &len)) {
1198 zfree(&cache->size);
1199 zfree(&cache->type);
1203 cache->map[len] = 0;
1204 cache->map = strim(cache->map);
1215 * /sys/devices/system/cpu/cpu<cpu>/cache/
1216 * The cache level data is stored in caches[] from index at
2102 fprintf(fp, "# CPU cache info:\n");
3431 FEAT_OPN(CACHE, cache, true),