• Home
  • Raw
  • Download

Lines Matching refs:i

76     int i, freq_count;  in main()  local
83 for (i = 0; i < argc; i++) { in main()
84 if (!strcmp(argv[i], "-n")) { in main()
85 if (i + 1 >= argc) { in main()
90 iterations = atoi(argv[++i]); in main()
93 if (!strcmp(argv[i], "-d")) { in main()
94 if (i + 1 >= argc) { in main()
99 delay = atoi(argv[++i]); in main()
102 if (!strcmp(argv[i], "-m")) { in main()
105 if (!strcmp(argv[i], "-h")) { in main()
119 for (i = 0; i < cpu_count; i++) { in main()
120 freq_count = get_freq_scales_count(i); in main()
122 old_cpus[i].freq_count = new_cpus[i].freq_count = freq_count; in main()
123 new_cpus[i].freqs = malloc(sizeof(struct freq_info) * new_cpus[i].freq_count); in main()
124 if (!new_cpus[i].freqs) die("Could not allocate struct freq_info\n"); in main()
125 old_cpus[i].freqs = malloc(sizeof(struct freq_info) * old_cpus[i].freq_count); in main()
126 if (!old_cpus[i].freqs) die("Could not allocate struct freq_info\n"); in main()
164 for (i = 0; i < cpu_count; i++) { in main()
165 free(new_cpus[i].freqs); in main()
166 free(old_cpus[i].freqs); in main()
244 int i; in read_stats() local
252 for (i = 0; i < new_total_cpu.freq_count; i++) { in read_stats()
253 new_total_cpu.freqs[i].time = 0; in read_stats()
257 for (i = 0; i < cpu_count; i++) { in read_stats()
258 sprintf(scanline, "cpu%d %%lu %%lu %%lu %%lu %%lu %%lu %%lu %%*d %%*d %%*d\n", i); in read_stats()
259 fscanf(file, scanline, &new_cpus[i].utime, &new_cpus[i].ntime, &new_cpus[i].stime, in read_stats()
260 &new_cpus[i].itime, &new_cpus[i].iowtime, &new_cpus[i].irqtime, in read_stats()
261 &new_cpus[i].sirqtime); in read_stats()
262 read_freq_stats(i); in read_stats()
273 int i; in read_freq_stats() local
277 for (i = 0; i < new_cpus[cpu].freq_count; i++) { in read_freq_stats()
279 fscanf(file, "%u %lu\n", &new_cpus[cpu].freqs[i].freq, &new_cpus[cpu].freqs[i].time); in read_freq_stats()
282 new_cpus[cpu].freqs[i].freq = old_cpus[cpu].freqs[i].freq; in read_freq_stats()
283 new_cpus[cpu].freqs[i].time = old_cpus[cpu].freqs[i].time; in read_freq_stats()
286 new_total_cpu.freqs[i].freq = new_cpus[cpu].freqs[i].freq; in read_freq_stats()
287 new_total_cpu.freqs[i].time += new_cpus[cpu].freqs[i].time; in read_freq_stats()
306 int i; in print_stats() local
312 for (i = 0; i < cpu_count; i++) { in print_stats()
313 sprintf(label, "cpu%d", i); in print_stats()
314 print_cpu_stats(label, &new_cpus[i], &old_cpus[i], print_freq); in print_stats()
352 int i; in print_freq_stats() local
358 for (i = 0; i < new_cpu->freq_count; i++) { in print_freq_stats()
359 delta_time = new_cpu->freqs[i].time - old_cpu->freqs[i].time; in print_freq_stats()
361 printf("%ukHz %ld", new_cpu->freqs[i].freq, delta_time); in print_freq_stats()
362 if (i + 1 != new_cpu->freq_count) { in print_freq_stats()
370 for (i = 0; i < new_cpu->freq_count; i++) { in print_freq_stats()
371 printf(",%u,%ld", new_cpu->freqs[i].freq, in print_freq_stats()
372 new_cpu->freqs[i].time - old_cpu->freqs[i].time); in print_freq_stats()
386 int i, j; in should_print_freq_stats() local
388 for (i = 1; i < cpu_count; i++) { in should_print_freq_stats()
389 for (j = 0; j < new_cpus[i].freq_count; j++) { in should_print_freq_stats()
390 if (new_cpus[i].freqs[j].time - old_cpus[i].freqs[j].time != in should_print_freq_stats()
407 int i, j; in should_aggregate_freq_stats() local
409 for (i = 1; i < cpu_count; i++) { in should_aggregate_freq_stats()
410 if (new_cpus[i].freq_count != new_cpus[0].freq_count) { in should_aggregate_freq_stats()
413 for (j = 0; j < new_cpus[i].freq_count; j++) { in should_aggregate_freq_stats()
414 if (new_cpus[i].freqs[j].freq != new_cpus[0].freqs[j].freq) { in should_aggregate_freq_stats()