RFR: 8346661: Add a register print helper method and unify register printing
Thomas Stuefe
stuefe at openjdk.org
Mon Dec 30 14:52:38 UTC 2024
On Mon, 30 Dec 2024 08:27:56 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> For printing registers we can add a little helper method to shorten the coding. Also some of the register printing code can use loops.
Drive-by comments
- I would avoid adding a newline in fine-granular methods such as this, since - as @TheRealMDoerr also pointed out - the caller may want to print multiple items per line. But then, just an sprintf that prints multiple registers in one row would probably be simpler.
- Having to specify the equals sign as part of the name is awkward. The printing function should use the correct indentation, or no indentation at all.
But in the end, is this worthwhile? In the current form it does not seem a lot of verbosity, tbh. And its re-use will be extremely limited, since we pretty much only print registers when printing a full context (in fact, I don't see any other printing)
-------------
PR Review: https://git.openjdk.org/jdk/pull/22894#pullrequestreview-2525670611
More information about the hotspot-runtime-dev
mailing list