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

Support dump all phases and print nodes in ascending order of index

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • b17
    • generic
    • generic

      C2 enhanced node::dump() and supported a variety of options (JDK-8283775). One interesting option is "S: sort displayed nodes by node idx". I think it's good idea to upgrade root()->dump(9999) with it.

      - root()->dump(9999);
      + // Print out all nodes in ascending order of index.
      + root()->dump_bfs(MaxNodeLimit, nullptr, "+S$");

      The IR becomes much easier to read and we can compare 2 phases using diff. I remember Andrew Dinn introduced this idea in mailing list before. At that time, we have to rely on external program 'sort' .
       
      In addition, COMPILER_PHASES has one flag 'DEBUG' not in use. I think we can use it to dump all phases like GCC does.

      eg.
       -XX:CompileCommand=PrintIdealPhase,java.lang.String::length,DEBUG

            xliu Xin Liu
            xliu Xin Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: