aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/power/x86/turbostat/turbostat.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 42273019da10..0049154929f0 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -485,6 +485,7 @@ struct msr_counter bic[] = {
485#define BIC_Any_c0 (1ULL << 42) 485#define BIC_Any_c0 (1ULL << 42)
486#define BIC_GFX_c0 (1ULL << 43) 486#define BIC_GFX_c0 (1ULL << 43)
487#define BIC_CPUGFX (1ULL << 44) 487#define BIC_CPUGFX (1ULL << 44)
488#define BIC_Node (1ULL << 45)
488 489
489#define BIC_DISABLED_BY_DEFAULT (BIC_USEC | BIC_TOD) 490#define BIC_DISABLED_BY_DEFAULT (BIC_USEC | BIC_TOD)
490 491
@@ -594,6 +595,8 @@ void print_header(char *delim)
594 outp += sprintf(outp, "%sTime_Of_Day_Seconds", (printed++ ? delim : "")); 595 outp += sprintf(outp, "%sTime_Of_Day_Seconds", (printed++ ? delim : ""));
595 if (DO_BIC(BIC_Package)) 596 if (DO_BIC(BIC_Package))
596 outp += sprintf(outp, "%sPackage", (printed++ ? delim : "")); 597 outp += sprintf(outp, "%sPackage", (printed++ ? delim : ""));
598 if (DO_BIC(BIC_Node))
599 outp += sprintf(outp, "%sNode", (printed++ ? delim : ""));
597 if (DO_BIC(BIC_Core)) 600 if (DO_BIC(BIC_Core))
598 outp += sprintf(outp, "%sCore", (printed++ ? delim : "")); 601 outp += sprintf(outp, "%sCore", (printed++ ? delim : ""));
599 if (DO_BIC(BIC_CPU)) 602 if (DO_BIC(BIC_CPU))
@@ -871,6 +874,8 @@ int format_counters(struct thread_data *t, struct core_data *c,
871 if (t == &average.threads) { 874 if (t == &average.threads) {
872 if (DO_BIC(BIC_Package)) 875 if (DO_BIC(BIC_Package))
873 outp += sprintf(outp, "%s-", (printed++ ? delim : "")); 876 outp += sprintf(outp, "%s-", (printed++ ? delim : ""));
877 if (DO_BIC(BIC_Node))
878 outp += sprintf(outp, "%s-", (printed++ ? delim : ""));
874 if (DO_BIC(BIC_Core)) 879 if (DO_BIC(BIC_Core))
875 outp += sprintf(outp, "%s-", (printed++ ? delim : "")); 880 outp += sprintf(outp, "%s-", (printed++ ? delim : ""));
876 if (DO_BIC(BIC_CPU)) 881 if (DO_BIC(BIC_CPU))
@@ -882,6 +887,15 @@ int format_counters(struct thread_data *t, struct core_data *c,
882 else 887 else
883 outp += sprintf(outp, "%s-", (printed++ ? delim : "")); 888 outp += sprintf(outp, "%s-", (printed++ ? delim : ""));
884 } 889 }
890 if (DO_BIC(BIC_Node)) {
891 if (t)
892 outp += sprintf(outp, "%s%d",
893 (printed++ ? delim : ""),
894 cpus[t->cpu_id].physical_node_id);
895 else
896 outp += sprintf(outp, "%s-",
897 (printed++ ? delim : ""));
898 }
885 if (DO_BIC(BIC_Core)) { 899 if (DO_BIC(BIC_Core)) {
886 if (c) 900 if (c)
887 outp += sprintf(outp, "%s%d", (printed++ ? delim : ""), c->core_id); 901 outp += sprintf(outp, "%s%d", (printed++ ? delim : ""), c->core_id);
@@ -4770,6 +4784,8 @@ void topology_probe()
4770 set_node_data(); 4784 set_node_data();
4771 if (debug > 1) 4785 if (debug > 1)
4772 fprintf(outf, "nodes_per_pkg %d\n", topo.nodes_per_pkg); 4786 fprintf(outf, "nodes_per_pkg %d\n", topo.nodes_per_pkg);
4787 if (!summary_only && topo.nodes_per_pkg > 1)
4788 BIC_PRESENT(BIC_Node);
4773 4789
4774 topo.threads_per_core = max_siblings; 4790 topo.threads_per_core = max_siblings;
4775 if (debug > 1) 4791 if (debug > 1)