Lines Matching defs:topo

232 	  topo.nodes_per_pkg * topo.cores_per_node * topo.threads_per_core) + \
233 ((node_no) * topo.cores_per_node * topo.threads_per_core) + \
234 ((core_no) * topo.threads_per_core) + \
239 ((pkg_no) * topo.nodes_per_pkg * topo.cores_per_node) + \
240 ((node_no) * topo.cores_per_node) + \
411 } topo;
438 for (pkg_no = 0; pkg_no < topo.num_packages; ++pkg_no) {
439 for (node_no = 0; node_no < topo.nodes_per_pkg; node_no++) {
440 for (core_no = 0; core_no < topo.cores_per_node; ++core_no) {
442 topo.threads_per_core; ++thread_no) {
1042 /* topo columns, print blanks on 1st (average) line */
1711 average.threads.tsc /= topo.num_cpus;
1712 average.threads.aperf /= topo.num_cpus;
1713 average.threads.mperf /= topo.num_cpus;
1714 average.threads.c1 /= topo.num_cpus;
1719 average.cores.c3 /= topo.num_cores;
1720 average.cores.c6 /= topo.num_cores;
1721 average.cores.c7 /= topo.num_cores;
1722 average.cores.mc6_us /= topo.num_cores;
1725 average.packages.pkg_wtd_core_c0 /= topo.num_packages;
1727 average.packages.pkg_any_core_c0 /= topo.num_packages;
1729 average.packages.pkg_any_gfxe_c0 /= topo.num_packages;
1731 average.packages.pkg_both_core_gfxe_c0 /= topo.num_packages;
1733 average.packages.pc2 /= topo.num_packages;
1735 average.packages.pc3 /= topo.num_packages;
1737 average.packages.pc6 /= topo.num_packages;
1739 average.packages.pc7 /= topo.num_packages;
1741 average.packages.pc8 /= topo.num_packages;
1742 average.packages.pc9 /= topo.num_packages;
1743 average.packages.pc10 /= topo.num_packages;
1753 average.threads.counter[i] /= topo.num_cpus;
1762 average.cores.counter[i] /= topo.num_cores;
1771 average.packages.counter[i] /= topo.num_packages;
2588 for (i = 0; i < topo.max_cpu_num + 1; ++i) {
2633 for (i = 0; i <= topo.max_cpu_num; ++i) {
2695 for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu)
2699 for (pkg = 0; pkg < topo.num_packages; pkg++) {
2701 for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu) {
2714 for (cpux = cpu; cpux <= topo.max_cpu_num; cpux++) {
2722 if (lnode > topo.nodes_per_pkg)
2723 topo.nodes_per_pkg = lnode;
2725 if (cpu_count >= topo.max_cpu_num)
2737 for (i = 0; i <= topo.max_cpu_num; i++) {
2756 int offset = topo.max_cpu_num + 1;
2760 thiscpu->put_ids = CPU_ALLOC((topo.max_cpu_num + 1));
2766 size = CPU_ALLOC_SIZE((topo.max_cpu_num + 1));
2814 for (pkg_no = 0; pkg_no < topo.num_packages; ++pkg_no) {
2815 for (node_no = 0; node_no < topo.nodes_per_pkg; ++node_no) {
2816 for (core_no = 0; core_no < topo.cores_per_node;
2819 topo.threads_per_core; ++thread_no) {
2889 fprintf(outf, "turbostat: re-initialized with num_cpus %d\n", topo.num_cpus);
2907 topo.max_cpu_num = 0;
2909 topo.max_cpu_num += BITMASK_SIZE;
2911 topo.max_cpu_num--; /* 0 based */
2920 topo.num_cpus++;
2953 for (column = 0; column < topo.num_cpus; ++column) {
2960 if (cpu_number > topo.max_cpu_num) {
2961 warn("/proc/interrupts: cpu%d: > %d", cpu_number, topo.max_cpu_num);
2979 for (column = 0; column < topo.num_cpus; ++column) {
3286 per_cpu_msr_sum = calloc(topo.max_cpu_num + 1, sizeof(struct msr_sum_array));
5364 topo.num_cpus = 0;
5366 if (!summary_only && topo.num_cpus > 1)
5370 fprintf(outf, "num_cpus %d max_cpu_num %d\n", topo.num_cpus, topo.max_cpu_num);
5372 cpus = calloc(1, (topo.max_cpu_num + 1) * sizeof(struct cpu_topology));
5379 cpu_present_set = CPU_ALLOC((topo.max_cpu_num + 1));
5382 cpu_present_setsize = CPU_ALLOC_SIZE((topo.max_cpu_num + 1));
5398 cpu_affinity_set = CPU_ALLOC((topo.max_cpu_num + 1));
5401 cpu_affinity_setsize = CPU_ALLOC_SIZE((topo.max_cpu_num + 1));
5410 for (i = 0; i <= topo.max_cpu_num; ++i) {
5433 if (cpus[i].physical_node_id > topo.max_node_num)
5434 topo.max_node_num = cpus[i].physical_node_id;
5446 topo.num_cores++;
5449 topo.cores_per_node = max_core_id + 1;
5452 max_core_id, topo.cores_per_node);
5453 if (!summary_only && topo.cores_per_node > 1)
5456 topo.num_die = max_die_id + 1;
5459 max_die_id, topo.num_die);
5460 if (!summary_only && topo.num_die > 1)
5463 topo.num_packages = max_package_id + 1;
5466 max_package_id, topo.num_packages);
5467 if (!summary_only && topo.num_packages > 1)
5472 fprintf(outf, "nodes_per_pkg %d\n", topo.nodes_per_pkg);
5473 if (!summary_only && topo.nodes_per_pkg > 1)
5476 topo.threads_per_core = max_siblings;
5483 for (i = 0; i <= topo.max_cpu_num; ++i) {
5502 int num_cores = topo.cores_per_node * topo.nodes_per_pkg *
5503 topo.num_packages;
5504 int num_threads = topo.threads_per_core * num_cores;
5520 *p = calloc(topo.num_packages, sizeof(struct pkg_data));
5524 for (i = 0; i < topo.num_packages; i++)
5549 * and logical_node_id==(-1 - topo.num_cpus)
5579 output_buffer = calloc(1, (1 + topo.num_cpus) * 2048);
5586 fd_percpu = calloc(topo.max_cpu_num + 1, sizeof(int));
5592 irq_column_2_cpu = calloc(topo.num_cpus, sizeof(int));
5594 err(-1, "calloc %d", topo.num_cpus);
5596 irqs_per_cpu = calloc(topo.max_cpu_num + 1, sizeof(int));
5598 err(-1, "calloc %d", topo.max_cpu_num + 1);