Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8048703

ReplacedNodes dumps it's content to tty

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b25

      Backports

        Description

        ReplacedNodes::dump prints it's content to tty instead of stream passed by caller.

          Activity

          Hide
          vlivanov Vladimir Ivanov added a comment -
          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(",");
                 }
               }
             }
          Show
          vlivanov Vladimir Ivanov added a comment - 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(",");        }      }    }
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/18d4d4c8beea
          User: vlivanov
          Date: 2014-07-16 13:38:32 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/18d4d4c8beea User: vlivanov Date: 2014-07-16 13:38:32 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/18d4d4c8beea
          User: lana
          Date: 2014-07-30 19:22:33 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/18d4d4c8beea User: lana Date: 2014-07-30 19:22:33 +0000

            People

            • Assignee:
              vlivanov Vladimir Ivanov
              Reporter:
              vlivanov Vladimir Ivanov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: