This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Incorrect hist_log on 32 bit system


On 10/19/2009 01:24 AM, Wenji Huang wrote:
Hi,

I got odd error for latest source on 32 bit system, like RHEL5 and FC11.
[...]
The reason is the following line on _stp_stat_print_histogram_buf

HIST_PRINTF("%*lld\n", HIST_WIDTH - v + 1 + cnt_space, sd->histogram[i]);

It seems that we need to do explicit type cast for the width so as
to eliminate the possibility of uncertain value generated by
delay calculation and ## macro.

Yes, you're right. The field width must be an int, but the "v" in that expression is making it an int64_t. Your patch looks good to me.


Josh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]