JDK-8048703 : ReplacedNodes dumps it's content to tty
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-06-30
  • Updated: 2017-09-05
  • Resolved: 2014-07-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9 Other
8u40Fixed 9 b25Fixed openjdk7uFixed
Description
ReplacedNodes::dump prints it's content to tty instead of stream passed by caller.
Comments
Suggested fix: diff --git a/src/share/vm/opto/replacednodes.cpp b/src/share/vm/opto/replacednodes.cpp --- a/src/share/vm/opto/replacednodes.cpp +++ b/src/share/vm/opto/replacednodes.cpp @@ -185,11 +185,11 @@ void ReplacedNodes::dump(outputStream *st) const { if (!is_empty()) { - tty->print("replaced nodes: "); + st->print("replaced nodes: "); for (int i = 0; i < _replaced_nodes->length(); i++) { - tty->print("%d->%d", _replaced_nodes->at(i).initial()->_idx, _replaced_nodes->at(i).improved()->_idx); + st->print("%d->%d", _replaced_nodes->at(i).initial()->_idx, _replaced_nodes->at(i).improved()->_idx); if (i < _replaced_nodes->length()-1) { - tty->print(","); + st->print(","); } } }
30-06-2014