Open galderz opened 9 months ago
Hi @galderz, Thank you for your feature suggestion. We will be taking a look at it.
@fniephaus, should I create an internal ticket for this issue ?
@galderz is this something you want to work on or is this just something you'd like to see in the future?
@fniephaus It's something we'll need in the future but it's not strictly right now, at least for my JFR old object event feature.
There might be other use cases for this though.
HotSpot implementation of JFR old object sample event (#5145) relies on an oop storage for efficiently managing weak handles to sampled object, without having to explicitly allocated weak reference instances.
For #5145 we will rely on weak reference instances but if these become a problem we will need to implement similar oop storage.
Also, once this is in place, optimizations related that allow events for recently allocated objects not to be emitted can be implemented properly.