Lines Matching refs:topo

410 	  topo.nodes_per_pkg * topo.cores_per_node * topo.threads_per_core) + \
411 ((node_no) * topo.cores_per_node * topo.threads_per_core) + \
412 ((core_no) * topo.threads_per_core) + \
417 ((pkg_no) * topo.nodes_per_pkg * topo.cores_per_node) + \
418 ((node_no) * topo.cores_per_node) + \
571 } topo;
599 for (pkg_no = 0; pkg_no < topo.num_packages; ++pkg_no) {
600 for (node_no = 0; node_no < topo.nodes_per_pkg; node_no++) {
601 for (core_no = 0; core_no < topo.cores_per_node; ++core_no) {
602 for (thread_no = 0; thread_no < topo.threads_per_core; ++thread_no) {
1136 /* topo columns, print blanks on 1st (average) line */
1837 average.threads.tsc /= topo.num_cpus;
1838 average.threads.aperf /= topo.num_cpus;
1839 average.threads.mperf /= topo.num_cpus;
1840 average.threads.instr_count /= topo.num_cpus;
1841 average.threads.c1 /= topo.num_cpus;
1846 average.cores.c3 /= topo.num_cores;
1847 average.cores.c6 /= topo.num_cores;
1848 average.cores.c7 /= topo.num_cores;
1849 average.cores.mc6_us /= topo.num_cores;
1852 average.packages.pkg_wtd_core_c0 /= topo.num_packages;
1854 average.packages.pkg_any_core_c0 /= topo.num_packages;
1856 average.packages.pkg_any_gfxe_c0 /= topo.num_packages;
1858 average.packages.pkg_both_core_gfxe_c0 /= topo.num_packages;
1860 average.packages.pc2 /= topo.num_packages;
1862 average.packages.pc3 /= topo.num_packages;
1864 average.packages.pc6 /= topo.num_packages;
1866 average.packages.pc7 /= topo.num_packages;
1868 average.packages.pc8 /= topo.num_packages;
1869 average.packages.pc9 /= topo.num_packages;
1870 average.packages.pc10 /= topo.num_packages;
1880 average.threads.counter[i] /= topo.num_cpus;
1889 average.cores.counter[i] /= topo.num_cores;
1898 average.packages.counter[i] /= topo.num_packages;
2772 for (i = 0; i < topo.max_cpu_num + 1; ++i) {
2817 for (i = 0; i <= topo.max_cpu_num; ++i) {
2878 for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu)
2882 for (pkg = 0; pkg < topo.num_packages; pkg++) {
2884 for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu) {
2897 for (cpux = cpu; cpux <= topo.max_cpu_num; cpux++) {
2904 if (lnode > topo.nodes_per_pkg)
2905 topo.nodes_per_pkg = lnode;
2907 if (cpu_count >= topo.max_cpu_num)
2919 for (i = 0; i <= topo.max_cpu_num; i++) {
2937 int offset = topo.max_cpu_num + 1;
2941 thiscpu->put_ids = CPU_ALLOC((topo.max_cpu_num + 1));
2947 size = CPU_ALLOC_SIZE((topo.max_cpu_num + 1));
2991 for (pkg_no = 0; pkg_no < topo.num_packages; ++pkg_no) {
2992 for (node_no = 0; node_no < topo.nodes_per_pkg; ++node_no) {
2993 for (core_no = 0; core_no < topo.cores_per_node; ++core_no) {
2994 for (thread_no = 0; thread_no < topo.threads_per_core; ++thread_no) {
3057 fprintf(outf, "turbostat: re-initialized with num_cpus %d\n", topo.num_cpus);
3073 topo.max_cpu_num = 0;
3075 topo.max_cpu_num += BITMASK_SIZE;
3077 topo.max_cpu_num--; /* 0 based */
3088 topo.num_cpus++;
3122 for (column = 0; column < topo.num_cpus; ++column) {
3129 if (cpu_number > topo.max_cpu_num) {
3130 warn("/proc/interrupts: cpu%d: > %d", cpu_number, topo.max_cpu_num);
3148 for (column = 0; column < topo.num_cpus; ++column) {
3461 per_cpu_msr_sum = calloc(topo.max_cpu_num + 1, sizeof(struct msr_sum_array));
4172 for (i = 0; i < topo.num_packages; ++i) {
4173 for (j = 0; j < topo.num_die; ++j) {
5506 fd_instr_count_percpu = calloc(topo.max_cpu_num + 1, sizeof(int));
5869 topo.num_cpus = 0;
5871 if (!summary_only && topo.num_cpus > 1)
5875 fprintf(outf, "num_cpus %d max_cpu_num %d\n", topo.num_cpus, topo.max_cpu_num);
5877 cpus = calloc(1, (topo.max_cpu_num + 1) * sizeof(struct cpu_topology));
5884 cpu_present_set = CPU_ALLOC((topo.max_cpu_num + 1));
5887 cpu_present_setsize = CPU_ALLOC_SIZE((topo.max_cpu_num + 1));
5903 cpu_affinity_set = CPU_ALLOC((topo.max_cpu_num + 1));
5906 cpu_affinity_setsize = CPU_ALLOC_SIZE((topo.max_cpu_num + 1));
5915 for (i = 0; i <= topo.max_cpu_num; ++i) {
5938 if (cpus[i].physical_node_id > topo.max_node_num)
5939 topo.max_node_num = cpus[i].physical_node_id;
5951 topo.num_cores++;
5954 topo.cores_per_node = max_core_id + 1;
5956 fprintf(outf, "max_core_id %d, sizing for %d cores per package\n", max_core_id, topo.cores_per_node);
5957 if (!summary_only && topo.cores_per_node > 1)
5960 topo.num_die = max_die_id + 1;
5962 fprintf(outf, "max_die_id %d, sizing for %d die\n", max_die_id, topo.num_die);
5963 if (!summary_only && topo.num_die > 1)
5966 topo.num_packages = max_package_id + 1;
5968 fprintf(outf, "max_package_id %d, sizing for %d packages\n", max_package_id, topo.num_packages);
5969 if (!summary_only && topo.num_packages > 1)
5974 fprintf(outf, "nodes_per_pkg %d\n", topo.nodes_per_pkg);
5975 if (!summary_only && topo.nodes_per_pkg > 1)
5978 topo.threads_per_core = max_siblings;
5985 for (i = 0; i <= topo.max_cpu_num; ++i) {
5999 int num_cores = topo.cores_per_node * topo.nodes_per_pkg * topo.num_packages;
6000 int num_threads = topo.threads_per_core * num_cores;
6016 *p = calloc(topo.num_packages, sizeof(struct pkg_data));
6020 for (i = 0; i < topo.num_packages; i++)
6044 * and logical_node_id==(-1 - topo.num_cpus)
6073 output_buffer = calloc(1, (1 + topo.num_cpus) * 2048);
6081 fd_percpu = calloc(topo.max_cpu_num + 1, sizeof(int));
6088 irq_column_2_cpu = calloc(topo.num_cpus, sizeof(int));
6090 err(-1, "calloc %d", topo.num_cpus);
6092 irqs_per_cpu = calloc(topo.max_cpu_num + 1, sizeof(int));
6094 err(-1, "calloc %d", topo.max_cpu_num + 1);