RFR: 8152845: Improve PackageEntry and ModuleEntry print methods for future logging

Coleen Phillimore coleen.phillimore at oracle.com
Tue Apr 12 21:33:02 UTC 2016


But in these functions, the print is going to print to tty rather than 
to the outputStream* st:

+void ModuleEntryTable::print(outputStream* st) {
+ st->print_cr("Module Entry Table (table_size=%d, entries=%d)",
                  table_size(), number_of_entries());
    for (int i = 0; i < table_size(); i++) {
      for (ModuleEntry* probe = bucket(i);
                                probe != NULL;
                                probe = probe->next()) {
        probe->print();
      }
    }
  }

Which functions weren't declared as const?

Coleen


On 4/12/16 10:39 AM, Rachel Protacio wrote:
> Hello,
>
> Please review this fix, moving the jigsaw PackageEntry and ModuleEntry 
> print methods to product mode and making them able to take an 
> outputStream. This way, we can use them for Unified Logging in the 
> future.
>
> Note: I changed the signature to take an optional stream rather than 
> following the "print_on" scheme because the print_on function that 
> these classes inherit is declared as 'const', which is incompatible 
> with the non-const function calls within the print function.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8152845
> Open webrev: http://cr.openjdk.java.net/~rprotacio/8152845.00/
>
> Tested with JPRT and RBT quick and non-colo tests.
>
> Thanks,
> Rachel



More information about the hotspot-runtime-dev mailing list