turbostat: Add support of reporting GPU power on SKL in turbostat
authorGordon Kelly <gordon.kelly@intel.com>
Thu, 7 Dec 2017 17:08:14 +0000 (12:08 -0500)
committerGordon Kelly <gordon.kelly@intel.com>
Thu, 7 Dec 2017 17:08:51 +0000 (12:08 -0500)
Change-Id: Icb57cf5ab116069b1e4d9580e248af1207e3282b

src/turbostat.c

index e4419b8..85f7d87 100644 (file)
@@ -586,7 +586,8 @@ static int submit_counters(struct thread_data *t, struct core_data *c,
   /* If not using logical core numbering, set core id */
   if (!config_lcn) {
     if (topology.num_packages > 1)
-      snprintf(name, sizeof(name), "pkg%02d-core%02d", p->package_id, c->core_id);
+      snprintf(name, sizeof(name), "pkg%02d-core%02d", p->package_id,
+               c->core_id);
     else
       snprintf(name, sizeof(name), "core%02d", c->core_id);
   }
@@ -977,6 +978,7 @@ static int __attribute__((warn_unused_result)) probe_cpu(void) {
     case 0x45: /* HSW */
     case 0x46: /* HSW */
     case 0x3D: /* BDW */
+    case 0x5E: /* SKL */
       do_rapl = RAPL_PKG | RAPL_CORES | RAPL_GFX;
       break;
     case 0x3F: /* HSX */