Re: [rvm-research] Introducing AllocationStrategy annotation
Robin Garner <[email protected]> Sun, 8 Jul 2018 23:21:29 +1000
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
Take a look at the @NonMoving annotation.
cheers
On 08/07/18 00:34, Ruben Peter Vervaeke wrote:
>
> Hi,
>
> My name is Ruben Vervaeke and I’m a Master student in Applied Computer
> Science at the VUB in Belgium. For my thesis project I need to
> introduce a new annotation in the JDK (provisionally called
> AllocationStrategy). I need to make such an annotation available to
> the runtime rvm. The idea is that a developer can hint to the rvm that
> certain heap allocations will be written a lot or will be written once
> (or few times). Using this information the rvm should be able to
> decide a specific allocation plan for the object(s) in question. This
> is to support a hybrid memory model that can switch between
> conventional DRAM memory hardware and NVM-based memory hardware.
>
> The focus for me lies on making such an annotation available to the
> rvm, so it can decide what allocation plan to use. Another PhD student
> has already modified the rvm for supporting the hybrid memory model
> (using conventional DRAM or NVM memory).
>
> My question is: is it possible to make such an annotation available to
> the rvm at allocation-time? If so, what would be the steps to take to
> achieve this?
>
> An initial challenge that comes to mind: how to add an annotation to
> the JDK library and use it in the RVM codebase?
>
> The declaration of this annotation in the JDK would look like this:
>
> @Retention(RetentionPolicy.RUNTIME)
>
> @Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.TYPE})
>
> public @interface AllocationStrategy {
>
> MutationFrequency mutationFrequency();
>
> }
>
> public enum MutationFrequency {
>
> NONE,
>
> LOW,
>
> MID,
>
> HIGH;
>
> }
>
> The semantics of the annotation:
>
> * CONSTRUCTOR: when declared on a specific constructor,
> instantiations of the class using that constructor would be
> allocated with NVM/DRAM in mind
> * FIELD: when declared on a field, instantiations of the class type
> that are immediately assigned to that field would be allocated
> with NVM/DRAM in mind
> * TYPE: when declared on a class, instantiations of that class would
> be allocated with NVM/DRAM in mind
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Jikesrvm-researchers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot