Skip to content
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

Improvements for Xtrace String printing feature #20878

Open
paulcheeseman opened this issue Jan 2, 2025 · 2 comments · May be fixed by #20933
Open

Improvements for Xtrace String printing feature #20878

paulcheeseman opened this issue Jan 2, 2025 · 2 comments · May be fixed by #20933

Comments

@paulcheeseman
Copy link

Suggested improvements for the new Xtrace String printing feature introduced for #16416:

First, this references for String objects are still shown only as addresses. For example on the first and second lines here:

14:47:13.242*0x21f00              mt.0         > java/lang/String.concat(Ljava/lang/String;)Ljava/lang/String; bytecode method, this = 0x60383cfd0
14:47:13.242 0x21f00              mt.18         - this: java/lang/String@000000060383CFD0 method arguments: ((String)"java.base")
14:47:13.242 0x21f00              mt.6         < java/lang/String.concat(Ljava/lang/String;)Ljava/lang/String; bytecode method
14:47:13.243 0x21f00              mt.28        - return value: (String)"/java.base"

It would be great to see String contents for this references as well.

Second, the Strings' contents are now printed instead of their addresses, but there are situations where having both would be useful - for example, if you wanted to locate the String objects in a dump that was taken alongside the trace.

Finally, would it be possible to print the contents of char[] instances (and maybe even byte[]) in the same way? A text representation of a byte[] (e.g. interpreting each byte as an ASCII codepoint) wouldn't always be useful, but there are definitely times when it would be.

@tajila
Copy link
Contributor

tajila commented Jan 2, 2025

@h3110n3rv3 Please address the concersn regarding Strings being used as a receiver for method calls (It would be great to see String contents for this references as well).

@tajila
Copy link
Contributor

tajila commented Jan 2, 2025

We can look at char[] and byte[] in a separate PR.

@h3110n3rv3 h3110n3rv3 linked a pull request Jan 14, 2025 that will close this issue
h3110n3rv3 added a commit to h3110n3rv3/openj9 that referenced this issue Jan 17, 2025
The changes reflect the feature request eclipse-openj9#20878.

Print string contents for this references.
Also, print address for string arguments and returns.

Closes: eclipse-openj9#20878
Signed-off-by: Nick Kamal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants