RFR: 8277573: VmObjectAlloc is not generated by intrinsics methods which allocate objects
Serguei Spitsyn
sspitsyn at openjdk.org
Tue Apr 11 00:00:36 UTC 2023
On Mon, 10 Apr 2023 22:02:10 GMT, Leonid Mesnik <lmesnik at 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
More information about the serviceability-dev
mailing list