OpenSolaris

Printable Version Enter a New Search
Bug ID 6830631
Synopsis PowerTOP needs to clear c-state information between intervals
State 10-Fix Delivered (Fix available in build)
Category:Subcategory utility:powertop
Keywords powertop
Responsible Engineer Rafael Vanoni
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_114
Fixed In snv_114
Release Fixed solaris_nevada(snv_114)
Related Bugs 6713863
Submit Date 15-April-2009
Last Update Date 6-May-2009
Description
usr/src/cmd/powertop/common/powertop.c has a typo in one of the calls to memset(3C):

    268 		(void) memset(g_cstate_info, NSTATES
    269 		    * sizeof (state_info_t), 0);

This call has the second and third arguments inverted, as the memset(3C) routine has the following definition:

void *memset(void *s, int c, size_t n);

This causes the c-state information not to be cleared at every interval, accumulating data from the previous iterations of the main program loop.
Work Around
N/A
Comments
N/A