Lines Matching refs:new_cpus
52 static struct cpu_info old_total_cpu, new_total_cpu, *old_cpus, *new_cpus; variable
112 new_cpus = malloc(sizeof(struct cpu_info) * cpu_count); in main()
113 if (!new_cpus) die("Could not allocate struct cpu_info\n"); in main()
118 old_cpus[i].freq_count = new_cpus[i].freq_count = freq_count; in main()
119 new_cpus[i].freqs = malloc(sizeof(struct freq_info) * new_cpus[i].freq_count); in main()
120 if (!new_cpus[i].freqs) die("Could not allocate struct freq_info\n"); in main()
130 old_total_cpu.freq_count = new_total_cpu.freq_count = new_cpus[0].freq_count; in main()
147 old_cpus = new_cpus; in main()
148 new_cpus = tmp_cpus; in main()
161 free(new_cpus[i].freqs); in main()
164 free(new_cpus); in main()
255 fscanf(file, scanline, &new_cpus[i].utime, &new_cpus[i].ntime, &new_cpus[i].stime, in read_stats()
256 &new_cpus[i].itime, &new_cpus[i].iowtime, &new_cpus[i].irqtime, in read_stats()
257 &new_cpus[i].sirqtime); in read_stats()
273 for (i = 0; i < new_cpus[cpu].freq_count; i++) { in read_freq_stats()
275 fscanf(file, "%u %lu\n", &new_cpus[cpu].freqs[i].freq, in read_freq_stats()
276 &new_cpus[cpu].freqs[i].time); in read_freq_stats()
279 new_cpus[cpu].freqs[i].freq = old_cpus[cpu].freqs[i].freq; in read_freq_stats()
280 new_cpus[cpu].freqs[i].time = old_cpus[cpu].freqs[i].time; in read_freq_stats()
283 new_total_cpu.freqs[i].freq = new_cpus[cpu].freqs[i].freq; in read_freq_stats()
284 new_total_cpu.freqs[i].time += new_cpus[cpu].freqs[i].time; in read_freq_stats()
312 print_cpu_stats(label, &new_cpus[i], &old_cpus[i], print_freq); in print_stats()
395 for (j = 0; j < new_cpus[i].freq_count; j++) { in should_print_freq_stats()
396 if (new_cpus[i].freqs[j].time - old_cpus[i].freqs[j].time != in should_print_freq_stats()
397 new_cpus[0].freqs[j].time - old_cpus[0].freqs[j].time) { in should_print_freq_stats()
416 if (new_cpus[i].freq_count != new_cpus[0].freq_count) { in should_aggregate_freq_stats()
419 for (j = 0; j < new_cpus[i].freq_count; j++) { in should_aggregate_freq_stats()
420 if (new_cpus[i].freqs[j].freq != new_cpus[0].freqs[j].freq) { in should_aggregate_freq_stats()