Re: [rvm-research] turning off zeroing

Eliot Moss <[email protected]> Thu, 13 Sep 2018 21:33:16 -0400
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <[email protected]>
On 9/13/2018 2:25 PM, Shoaib Akram wrote:

> I am investigating writes in Java applications. My analysis shows that a huge fraction of total writes in Java applications happen to nursery. I would like to understand this more. Specifically, I would like to breakdown nursery writes into those due to bulk zeroing, and the rest. My question is is it possible to completely turn off zeroing in Jikes RVM. And would that still lead to correct application behavior? I understand the Java specification prohibits this, but just for understanding purposes, would that be possible to tease apart the effects?

How else would you guarantee Java semantics and not break applications?
Java assumes that fields not mentioned are zeroed, and it is ok to read
them.  Imagine a pointer field with garbage in it, and you try to follow
it ...   or the GC tries to follow it ...

It is, on the other hand, possible (in principle anyway) to move around
when/how zeroing happens.  It could be done way beforehand; it could be
done a block at a time as space is parceled out to threads.  In theory
you could also do individual object zeroing in the allocator OR you
could augment the code generated by NEW to directly store zeroes to the
fields (makes more sense for scalar objects than arrays, where bulk
zeroing is needed ...).

Regards - Eliot Moss