Commit aeae1e92 authored by Len Brown's avatar Len Brown
Browse files

tools/power turbostat: less verbose debugging

dump only the counters which are active

Signed-off-by: default avatarLen Brown <>
parent 9508d805
......@@ -162,19 +162,21 @@ void print_header(void)
void dump_cnt(struct counters *cnt)
fprintf(stderr, "package: %d ", cnt->pkg);
fprintf(stderr, "core:: %d ", cnt->core);
fprintf(stderr, "CPU: %d ", cnt->cpu);
fprintf(stderr, "TSC: %016llX\n", cnt->tsc);
fprintf(stderr, "c3: %016llX\n", cnt->c3);
fprintf(stderr, "c6: %016llX\n", cnt->c6);
fprintf(stderr, "c7: %016llX\n", cnt->c7);
fprintf(stderr, "aperf: %016llX\n", cnt->aperf);
fprintf(stderr, "pc2: %016llX\n", cnt->pc2);
fprintf(stderr, "pc3: %016llX\n", cnt->pc3);
fprintf(stderr, "pc6: %016llX\n", cnt->pc6);
fprintf(stderr, "pc7: %016llX\n", cnt->pc7);
fprintf(stderr, "msr0x%x: %016llX\n", extra_msr_offset, cnt->extra_msr);
if (!cnt)
if (cnt->pkg) fprintf(stderr, "package: %d ", cnt->pkg);
if (cnt->core) fprintf(stderr, "core:: %d ", cnt->core);
if (cnt->cpu) fprintf(stderr, "CPU: %d ", cnt->cpu);
if (cnt->tsc) fprintf(stderr, "TSC: %016llX\n", cnt->tsc);
if (cnt->c3) fprintf(stderr, "c3: %016llX\n", cnt->c3);
if (cnt->c6) fprintf(stderr, "c6: %016llX\n", cnt->c6);
if (cnt->c7) fprintf(stderr, "c7: %016llX\n", cnt->c7);
if (cnt->aperf) fprintf(stderr, "aperf: %016llX\n", cnt->aperf);
if (cnt->pc2) fprintf(stderr, "pc2: %016llX\n", cnt->pc2);
if (cnt->pc3) fprintf(stderr, "pc3: %016llX\n", cnt->pc3);
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)
Supports Markdown
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