Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[cascardo/linux.git] / tools / perf / util / svghelper.c
index a778fd0..856655d 100644 (file)
@@ -28,7 +28,7 @@ static u64 turbo_frequency, max_freq;
 
 int svg_page_width = 1000;
 
-#define MIN_TEXT_SIZE 0.001
+#define MIN_TEXT_SIZE 0.01
 
 static u64 total_height;
 static FILE *svgfile;
@@ -217,6 +217,18 @@ static char *cpu_model(void)
                }
                fclose(file);
        }
+
+       /* CPU type */
+       file = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies", "r");
+       if (file) {
+               while (fgets(buf, 255, file)) {
+                       unsigned int freq;
+                       freq = strtoull(buf, NULL, 10);
+                       if (freq > max_freq)
+                               max_freq = freq;
+               }
+               fclose(file);
+       }
        return cpu_m;
 }