Output debug with printf?

Khanh Nguyen ktruong.nguyen at gmail.com
Sat Jan 9 04:50:57 UTC 2016


Hi everyone,

I am modifying OpenJDK7 to implement an algorithm. In the process of doing
this, I need to output debug information to the stdout. As I can see in the
code base, all printings are done by using outputStream*->print_cr(). I
wonder why printf() was not used at all?

The reason I'm asking this because I in fact used a lot of printf() calls.
And I have been seeing weird bugs such as random memory corruption and
random JVM crashing. Is there any chance that my printf() is the root
cause? (Assume that the logic is my code is bug-free of course)

Thank you,

Khanh Nguyen


More information about the hotspot-dev mailing list