RFR: 8277573: VmObjectAlloc is not generated by intrinsics methods which allocate objects
Serguei Spitsyn
sspitsyn at openjdk.org
Tue Apr 11 00:12:38 UTC 2023
On Mon, 10 Apr 2023 22:03:56 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> src/hotspot/share/prims/jvmtiEventController.cpp line 727:
>>
>>> 725: JvmtiExport::set_should_post_on_exceptions((any_env_thread_enabled & SHOULD_POST_ON_EXCEPTIONS_BITS) != 0);
>>> 726:
>>> 727: JvmtiExport::_should_post_allocation_notifications = JvmtiExport::should_post_vm_object_alloc();
>>
>> I'm not sure why this flag is needed. It looks like a dup of `JvmtiExport::should_post_vm_object_alloc()`.
>> Can we just replace it with `JvmtiExport::should_post_vm_object_alloc()`?
>
> I don't think we could replace it by function. Also, I think that it is needed later to add SampledObjectAlloc event here. It should consider VM internal object allocations along with all allocations.
I was thinking about an offset.
But I've got your plan to use this flag for both `VMObjectAlloc` and `SampledObjectAlloc` event types.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13312#discussion_r1162181763
More information about the serviceability-dev
mailing list