Commit aeae1e92 authored by Len Brown's avatar Len Brown

tools/power turbostat: less verbose debugging

dump only the counters which are active
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 9508d805
...@@ -162,19 +162,21 @@ void print_header(void) ...@@ -162,19 +162,21 @@ void print_header(void)
void dump_cnt(struct counters *cnt) void dump_cnt(struct counters *cnt)
{ {
fprintf(stderr, "package: %d ", cnt->pkg); if (!cnt)
fprintf(stderr, "core:: %d ", cnt->core); return;
fprintf(stderr, "CPU: %d ", cnt->cpu); if (cnt->pkg) fprintf(stderr, "package: %d ", cnt->pkg);
fprintf(stderr, "TSC: %016llX\n", cnt->tsc); if (cnt->core) fprintf(stderr, "core:: %d ", cnt->core);
fprintf(stderr, "c3: %016llX\n", cnt->c3); if (cnt->cpu) fprintf(stderr, "CPU: %d ", cnt->cpu);
fprintf(stderr, "c6: %016llX\n", cnt->c6); if (cnt->tsc) fprintf(stderr, "TSC: %016llX\n", cnt->tsc);
fprintf(stderr, "c7: %016llX\n", cnt->c7); if (cnt->c3) fprintf(stderr, "c3: %016llX\n", cnt->c3);
fprintf(stderr, "aperf: %016llX\n", cnt->aperf); if (cnt->c6) fprintf(stderr, "c6: %016llX\n", cnt->c6);
fprintf(stderr, "pc2: %016llX\n", cnt->pc2); if (cnt->c7) fprintf(stderr, "c7: %016llX\n", cnt->c7);
fprintf(stderr, "pc3: %016llX\n", cnt->pc3); if (cnt->aperf) fprintf(stderr, "aperf: %016llX\n", cnt->aperf);
fprintf(stderr, "pc6: %016llX\n", cnt->pc6); if (cnt->pc2) fprintf(stderr, "pc2: %016llX\n", cnt->pc2);
fprintf(stderr, "pc7: %016llX\n", cnt->pc7); if (cnt->pc3) fprintf(stderr, "pc3: %016llX\n", cnt->pc3);
fprintf(stderr, "msr0x%x: %016llX\n", extra_msr_offset, cnt->extra_msr); if (cnt->pc6) fprintf(stderr, "pc6: %016llX\n", cnt->pc6);
if (cnt->pc7) fprintf(stderr, "pc7: %016llX\n", cnt->pc7);
if (cnt->extra_msr) fprintf(stderr, "msr0x%x: %016llX\n", extra_msr_offset, cnt->extra_msr);
} }
void dump_list(struct counters *cnt) void dump_list(struct counters *cnt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment