You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we still have all the endpoints and checks in places for ObjectSpace.each_object, even if it is not enabled. This adds a small amount of overhead to most object allocations.
Since we require users to turn on the each_object functionality, we could at that point load an agent into the JVM that has access to debugging APIs, and use those APIs to provide the heap walking.
Work would need to be done to find the most efficient way to walk all heap objects.
My previous prototypes used the Java Debug Interface to loop over objects and update a separately-executing thread's active frame so it would see each object in turn. It worked, but was incredibly slow. An approach that instruments object construction and used the current weak map logic would be possible through an agent.
The text was updated successfully, but these errors were encountered:
This is more complicated than it seems due to the ability to turn on ObjectSpace.each_object at runtime via JRuby::Util.object_space=. I've got code in #8279 to officially deprecate that, but I'm unsure how frequently it might be used in the wild.
Currently we still have all the endpoints and checks in places for
ObjectSpace.each_object
, even if it is not enabled. This adds a small amount of overhead to most object allocations.Since we require users to turn on the
each_object
functionality, we could at that point load an agent into the JVM that has access to debugging APIs, and use those APIs to provide the heap walking.Work would need to be done to find the most efficient way to walk all heap objects.
My previous prototypes used the Java Debug Interface to loop over objects and update a separately-executing thread's active frame so it would see each object in turn. It worked, but was incredibly slow. An approach that instruments object construction and used the current weak map logic would be possible through an agent.
The text was updated successfully, but these errors were encountered: