RFR(trivial): 8231024: Improve the debug info when the output is truncated

Jie Fu fujie at loongson.cn
Mon Sep 16 07:09:28 UTC 2019

Hi David,

Sorry for the confusion.

On 2019/9/16 下午2:40, David Holmes wrote:
> Okay I'm confused. I had assumed that the passed in buffer size must 
> be different in each case because of the 2014/2032/2050 values in the 
> message, but in fact they are all sized at 2000. 
According to the source code, the buffer size can be either 
2000(O_BUFLEN) [1] or 2048(BUFLEN) [2].
So it isn't always 2000.

> That makes no sense
I think it makes sense.
It is still unclear which one (O_BUFLEN or BUFLEN?) should be increased 
if the current buffer size wasn't printed.

> - how can we have written e.g. 2014 bytes to a buffer of only 2000 bytes? 

The output is truncated since the current buffer size is too small 
(e.g., 2000 < 2014).

> Do we have a bug in os::vsnprintf?

I don't think so.

Thanks a lot.
Best regards,


More information about the hotspot-dev mailing list