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

Small fixes to DumpAllocStat::print_stats

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • hotspot
    • b24

      When looking at CDS code in the context of Lilliput, I had to spend some time in DumpAllocStat::print(). I noticed two small things which can be fixed independently:

      - the divide-by-zero check at lines 45ff are not needed, since `percent_of` does this already. It also can cause the asserts at the end of the function to fire wrongly.

      - About those asserts, it makes sense to flush the debug message before scope end, otherwise we won't see the debug message if the asserts fire. If they fire, the debug message would be helpful.

          Loading...
          Uploaded image for project: 'JDK'
          1. JDK
          2. JDK-8276983

          Small fixes to DumpAllocStat::print_stats

            • Icon: Bug Bug
            • Resolution: Fixed
            • Icon: P4 P4
            • 18
            • 18
            • hotspot
            • b24

              When looking at CDS code in the context of Lilliput, I had to spend some time in DumpAllocStat::print(). I noticed two small things which can be fixed independently:

              - the divide-by-zero check at lines 45ff are not needed, since `percent_of` does this already. It also can cause the asserts at the end of the function to fire wrongly.

              - About those asserts, it makes sense to flush the debug message before scope end, otherwise we won't see the debug message if the asserts fire. If they fire, the debug message would be helpful.

                    stuefe Thomas Stuefe
                    stuefe Thomas Stuefe
                    Votes:
                    0 Vote for this issue
                    Watchers:
                    3 Start watching this issue

                      Created:
                      Updated:
                      Resolved:

                        stuefe Thomas Stuefe
                        stuefe Thomas Stuefe
                        Votes:
                        0 Vote for this issue
                        Watchers:
                        3 Start watching this issue

                          Created:
                          Updated:
                          Resolved: