Skip to content

Commit

Permalink
turbostat: Increase output buffer size to accommodate C8-C10
Browse files Browse the repository at this point in the history
On platforms with C8-C10 support, the additional C-states cause
turbostat to overrun its output buffer of 128 bytes per CPU.  Increase
this to 256 bytes per CPU.

[ As a bugfix, this should go into 3.10; however, since the C8-C10
  support didn't go in until after 3.9, this need not go into any stable
  kernel. ]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Cc: Len Brown <len.brown@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Josh Triplett authored and Linus Torvalds committed Jun 13, 2013
1 parent 26e0446 commit b844db3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/power/x86/turbostat/turbostat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2191,7 +2191,7 @@ int initialize_counters(int cpu_id)

void allocate_output_buffer()
{
output_buffer = calloc(1, (1 + topo.num_cpus) * 128);
output_buffer = calloc(1, (1 + topo.num_cpus) * 256);
outp = output_buffer;
if (outp == NULL) {
perror("calloc");
Expand Down

0 comments on commit b844db3

Please sign in to comment.