On Mon, 10 Apr 2023 22:02:10 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:
>> src/hotspot/share/opto/library_call.cpp line 2856: >> >>> 2854: set_result(ideal.value(result)); >>> 2855: return true; >>> 2856: #else >> >> Nit: It is better to replace #else at 2856 with #endif. Then #endif at 2859 >> is not needed. > > In this case the code is: > ``` > set_result(ideal.value(result)); > return true; > set_result(obj); > return true; > > > Which might cause compiler warnings and complains from static analyzers. I wonder if it possible to do the following: + . . . . . . . + final_sync(ideal); + obj = ideal.value(result); + return true; + #endif // INCLUDE_JVMTI set_result(obj); return true; But I'm not sure if one more sync is needed in such a case. At lease, this line should not be under #if/#else: ` return true;` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13312#discussion_r1162175803