Usage of stack pointers

Andrii Lomakin lomakin.andrey at gmail.com
Mon Jun 12 13:58:46 UTC 2023


Got it, thanks!

On Mon, Jun 12, 2023 at 3:40 PM Tobias Hartmann <tobias.hartmann at oracle.com>
wrote:

> Hi Andrii,
>
> Ideally, hot methods are C2 compiled and therefore heap allocation /
> copying is only required when
> storing into containers.
>
> Stack allocation support for C2 has been proposed before [1] and is out of
> scope of this project.
>
> Best regards,
> Tobias
>
> [1]
> https://github.com/microsoft/openjdk-proposals/blob/main/stack_allocation/Stack_Allocation_JEP.md
>
>
> On 24.05.23 08:54, Andrey Lomakin wrote:
> > Hi guys.
> >
> > I don't know whether it is the correct mailing list to ask, but I will
> try it.
> >
> > If I got JEP correctly, value objects are inlined in case of usage of
> the C2 compiler if they are
> > passed as function arguments. It means that we will have an overhead of
> copying data. So likely,
> > this optimization will depend on the size of the value object. But what
> about passing the stack
> > pointer with the ability to convert stack-based value objects into heap
> objects if the passed
> > references leak the called method?
> >
> > Are such optimizations considered or possible?
> >
> > --
> > Best regards,
> > Andrii Lomakin.
> >
>


-- 
Best regards,
Andrii Lomakin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20230612/b843f5f8/attachment.htm>


More information about the valhalla-dev mailing list