RFR: 8152845: Improve PackageEntry and ModuleEntry print methods for future logging
Coleen Phillimore
coleen.phillimore at oracle.com
Wed Apr 13 19:03:39 UTC 2016
On 4/13/16 10:57 AM, Rachel Protacio wrote:
> On 4/12/2016 5:33 PM, Coleen Phillimore wrote:
>>
>> 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();
>> }
>> }
>> }
>>
> I missed the print() at the end, thanks for noticing! New webrev:
> http://cr.openjdk.java.net/~rprotacio/8152845.01/
>
>> Which functions weren't declared as const?
>>
> table_size() and number_of_entries() from hashtable.hpp both aren't
> const. And neither is ModuleEntryTable::bucket().
Ok. Someone should fix these non-const functions in hashtable.hpp some
time.
Reviewed!
Coleen
>
> Rachel
>> 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