[rvm-research] Introducing AllocationStrategy annotation
Ruben Peter Vervaeke <[email protected]> Sat, 7 Jul 2018 14:34:51 +0000
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <DB7PR01MB423524C4801D8D72031C0C90B7460@DB7PR01MB4235.eurprd01.prod.exchangelabs.com> |
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