RFR: 8149996: TraceLoaderConstraints has been converted to Unified Logging.

David Holmes david.holmes at oracle.com
Thu Mar 10 04:29:42 UTC 2016


On 10/03/2016 8:03 AM, Coleen Phillimore wrote:
>
> http://cr.openjdk.java.net/~mockner/8149996.02/src/share/vm/classfile/loaderConstraints.cpp.frames.html
>
>
> Why did you take out the ResourceMarks at line 130, 160, 231 and 244,
> 297, 308 and 357?

Yes these should all be of the form:

if (log_is_enabled(...)) {
   ResourceMark rm;
   // log stuff
}

> Unfortunately, we really need log_info_rm(tag)("String") call because
> all those places need a ResourceMark.
>
> Anytime we call name()->as_C_string() there needs to be a ResourceMark
> in the scope of the call.

Which means that a log_info_rm() call wouldn't help because we'd still 
be calling as_C_string in the caller. :(

David

>
> Coleen
>
> On 3/9/16 3:47 PM, Max Ockner wrote:
>> Hello again,
>>
>> Please review this change. TraceLoaderConstraints has been converted
>> to Unified Logging and can be accessed using
>> '-Xlog:loaderconstraints=info'. TraceLoaderConstraints has been added
>> to the logging alias table.
>>
>> There are 0 lines of output for java -version, and ~10 lines from
>> LoaderConstraintsTest.java
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8149996
>> webrev: http://cr.openjdk.java.net/~mockner/8149996.02/
>>
>> Testing: jtreg runtime. Added new test which triggers logging for
>> loaderconstraints by forcing class unloading. No other references to
>> TraceLoaderConstraints found in hotspot/test, jdk/test , or in the
>> noncolo tests.
>>
>> Thanks,
>> Max
>


More information about the hotspot-runtime-dev mailing list