RFR: 8244669: convert clhsdb "mem" command from javascript to java [v3]
Serguei Spitsyn
sspitsyn at openjdk.java.net
Tue Dec 21 21:32:19 UTC 2021
On Tue, 21 Dec 2021 19:58:53 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> clhsdb lost support for the "mem" command when javascript support was removed from SA. This PR is re-adding it by implementing it in Java. The description of the CR contains all the details.
>>
>> Regarding the clhsdb.html changes for the "examine" command, they are just correctly specifying the existing syntax. No change was actually made to the syntax.
>>
>> The changes made to the "examine" command are part of a consolidation effort to better share code between "examine" and "mem". "examine" has no functional changes.
>
> Chris Plummer has updated the pull request incrementally with two additional commits since the last revision:
>
> - Fix issue with address range patterns. For some reason they have always allowed some extra lower case letters at the end of the pattern that just get ignored. I removed support for this since sometimes it resulted in bad address ranges producing an exception rather than a usage() message.
> - Fix missing return after calling usage()
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java line 560:
> 558: } else {
> 559: out.println();
> 560: }
I wonder if it is possible to simplify the above fragment at 549-560 with something like:
if (verbose) {
// If we know what this is a pointer to, then print additional information.
PointerLocation loc = PointerFinder.find(val);
if (!loc.isUnknown()) {
out.print(" ");
loc.printOn(out, false, false); // make it print without line end or ignore there is an extra end?
}
}
out.println();
test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java line 197:
> 195: "In interpreter codelet: method entry point"));
> 196: runTest(withCore, cmds, expStrMap);
> 197:
Is there a test case for another variant of range: Address,Address ?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6902
More information about the serviceability-dev
mailing list