Skip to content

Commit

Permalink
tools/power turbostat: less verbose debugging
Browse files Browse the repository at this point in the history
dump only the counters which are active

Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Len Brown committed Jul 4, 2011
1 parent 9508d80 commit aeae1e9
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions tools/power/x86/turbostat/turbostat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
return;
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)
Expand Down

0 comments on commit aeae1e9

Please sign in to comment.