RFR: 8281195: Mistakenly used logging causes significant overhead in interpreter
Alexey Pavlyutkin
duke at openjdk.java.net
Mon Feb 7 17:21:08 UTC 2022
On Mon, 7 Feb 2022 16:10:57 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Fixes
>>
>> `bool OopMapCacheEntry::verify_mask(CellTypeState* vars, CellTypeState* stack, int max_locals, int stack_top)`
>>
>> eliminating frequent generation of log messages with no respect of logging configuration
>>
>> Verification: N/A (the issue does not have an observable effect)
>>
>> Regression: hotspot_compiler (20.04 on amd64 )
>
> src/hotspot/share/interpreter/oopMapCache.cpp line 282:
>
>> 280: bool const is_log_enabled = log_type::is_enabled();
>> 281: static const log_type log;
>> 282: LogStream st(log);
>
> Isn't this just:
>
>
> const bool log = log_is_enabled(Trace, interpreter, oopmap);
> LogStream st(Log(interpreter, oopmap)::trace());
Yes, you're right, there are many ways to say the same. Log(...)::trace() returns exactly the object represented by `log` variable. It also may be
const bool log = log_is_enabled(LogLevel::Trace, interpreter, oopmap);
LogStream st(LogTarget(LogLevel::Trace, interpreter, oopmap));
-------------
PR: https://git.openjdk.java.net/jdk/pull/7367
More information about the hotspot-runtime-dev
mailing list