RFR: JDK-8299229: [JVMCI] add support for UseZGC [v6]

Andreas Woess aw at openjdk.org
Fri May 5 03:05:19 UTC 2023


On Thu, 4 May 2023 17:32:13 GMT, Tom Rodriguez <never at openjdk.org> wrote:

>> src/hotspot/cpu/x86/gc/shared/barrierSetNMethod_x86.cpp line 194:
>> 
>>> 192: 
>>> 193:   NativeNMethodCmpBarrier* barrier = reinterpret_cast<NativeNMethodCmpBarrier*>(barrier_address);
>>> 194:   barrier->verify();
>> 
>> I think this should be reverted to:
>> `debug_only(barrier->verify());`
>
> verify now contains only an assert so the debug_only is unnecessary

I see. Still, `verify()` also contains `err_msg("%s", "");` and that calls `jio_vsnprintf`:
```c++
template <size_t bufsz>
FormatBuffer<bufsz>::FormatBuffer(const char * format, ...) : FormatBufferBase(_buffer) {
  va_list argp;
  va_start(argp, format);
  jio_vsnprintf(_buf, bufsz, format, argp);
  va_end(argp);
}

So I think we should probably guard `err_msg("%s", "")` as well if we want to ensure there's no overhead in a product build.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/11996#discussion_r1185663102


More information about the hotspot-dev mailing list