-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New DDR Command: !findinstances
#19267
Comments
@babsingh FYI |
Design: Use @keithc-ca does this look good to you? |
What information would this provide that isn't already available via the existing |
Please note you can not differentiate live and dead (dark matter) objects in the core by just walking them in general case. |
The output will include all the addresses to the objects for a specific class. The intent is to inspect the objects and derive statistics to understand the impact on JVM features. This data will be used to optimize JVM features. Example investigations: Which data structure to use for managing objects internally? If there are many duplicates, will there be benefits of interning such objects? ++@tajila, for other insights. |
If we decide there's value in pursuing this, I suggest |
Discussed with @dmitripivkine. |
The only other thing I would add is a option to include subclasses as well. Ie. If I want all method handles BoundedMethodHandle, ConstantHandle, FoldHandle, ... it would be nice to have a single query for that. |
I think there is another confusion. As discussed above alive object is undistinguishable from dead object (dark matter). Iterator returns object pointer (as "alive"). Dead object in Iterator's terminology is not an object at all. This is "memory hole" (may be in a form of single slot hole or multi slot hole aka Linked Free Header). There is no class pointer or another object attribute. So, you can't do this. |
@dmitripivkine Here's my understanding (correct me if I'm wrong): there are three types of "objects": alive objects, dark matters, and holes. And an iterator can only return either an alive object or a dark matter. My questions: what is a dark matter? If we can't distinguish alive object and dark matter, what does |
Dark matter is a dead object left GC in the heap due it's space can't by coalesced with other free spaces and it's size is not large enough to be added to the memory pool, so it is left as-is. Dark matter object should have its RAM class intact to allow GC to detect its size. The references from dark matter object can be incorrect (stale). |
@keithc-ca so you mean that we don't need to output the summary info right? |
Yes, unless |
@keithc-ca Is this possible to know? |
Sure, technically it is possible to determine if a specific object is reachable (see |
Sorry I didn't make myself clear, I mean is it possible to know if the |
The We could store the active agent in a new field of some globally accessible structure (e.g. |
Then I guess it doesn't really worth pursuing this feature? We can just print a note on this. @babsingh thoughts? |
!findallobjects
!findinstances
It may still be worth proceeding. The suggest warning could be omitted if we can't tell whether The people doing the profiling that this is intended to support should know to use the |
Related: eclipse-openj9#19267 Signed-off-by: Babneet Singh <[email protected]>
Related: eclipse-openj9#19267 Signed-off-by: Babneet Singh <[email protected]>
Related: eclipse-openj9#19267 Signed-off-by: Babneet Singh <[email protected]>
MemberName (MN) Usage
The above data is to support the fyi, |
Please update the description to reflect the new proposed command name. |
Related: eclipse-openj9#19267 Signed-off-by: Babneet Singh <[email protected]>
Related: eclipse-openj9#19267 Signed-off-by: Babneet Singh <[email protected]>
Related: eclipse-openj9#19267 Signed-off-by: Babneet Singh <[email protected]>
Related: eclipse-openj9#19267 Signed-off-by: Babneet Singh <[email protected]>
Closing, completed with #19651. |
Related: eclipse-openj9#19267 Signed-off-by: Babneet Singh <[email protected]>
This command is needed to profile the JVM and optimize JVM features. The command will output all the objects created using the given class. A summary that includes the total number of live and dead objects for the given class will also be outputted.
Usage:
The text was updated successfully, but these errors were encountered: