Skip to content

Commit

Permalink
8279024: Remove javascript references from clhsdb.html
Browse files Browse the repository at this point in the history
Backport-of: d0ea7c9db9cc9ce80b60c2f94c53bb307792fc51
  • Loading branch information
GoeLin committed Dec 27, 2022
1 parent 5194b98 commit c8caf68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 51 deletions.
48 changes: 2 additions & 46 deletions src/jdk.hotspot.agent/doc/clhsdb.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,17 @@ <h1>Command line HSDB</h1>
<p>
When debugging remote core dumps it is easier to work with command line tools instead of
GUI tools. Command line HSDB (CLHSDB) tool is alternative to SA GUI tool HSDB.
CLHSDB is launched from the command line using the "jhsdb clhsdb" command.
</p>

<p>
There is also JavaScript based SA command line interface called <a href="jsdb.html">jsdb</a>.
But, CLHSDB supports Unix shell-like (or dbx/gdb-like) command line interface with
CLHSDB supports Unix shell-like (or dbx/gdb-like) command line interface with
support for output redirection/appending (familiar &gt;, &gt;&gt;), command history and so on.
Each CLHSDB command can have zero or more arguments and optionally end with output redirection
(or append) to a file. Commands may be stored in a file and run using <b>source</b> command.
<b>help</b> command prints usage message for all supported commands (or a specific command)
</p>

<h3>Shell/batch scripts to run command line HSDB</h3>

<ul>
<li>clhsdbproc.sh
<li>clhsdbproc64.sh
<li>clhsdbwindbg.bat
<li>clhsdbwindbg64.bat
</ul>

<h3>Annotated output of CLHSDB help command</h3>

<pre>
Expand Down Expand Up @@ -62,8 +53,6 @@ <h3>Annotated output of CLHSDB help command</h3>
intConstant [ name [ value ] ] <font color="red">print out hotspot integer constant(s)</font>
jdis address <font color="red">show bytecode disassembly of a given Method*</font>
jhisto <font color="red">show Java heap histogram</font>
jseval script <font color="red">evaluate a given string as JavaScript code</font>
jsload file <font color="red">load and evaluate a JavaScript file</font>
jstack [-v] <font color="red">show Java stack trace of all Java threads. -v is verbose mode</font>
livenmethods <font color="red">show all live nmethods</font>
longConstant [ name [ value ] ] <font color="red">print out hotspot long constant(s)s</font>
Expand Down Expand Up @@ -95,39 +84,6 @@ <h3>Annotated output of CLHSDB help command</h3>
</code>
</pre>

<h3>JavaScript integration</h3>

<p>Few CLHSDB commands are already implemented in JavaScript. It is possible to extend CLHSDB command set
by implementing more commands in a JavaScript file and by loading it by <b>jsload</b> command. <b>jseval</b>
command may be used to evaluate arbitrary JavaScript expression from a string. Any JavaScript function
may be exposed as a CLHSDB command by registering it using JavaScript <b><code>registerCommand</code></b>
function. This function accepts command name, usage and name of the JavaScript implementation function
as arguments.
</p>

<h3>Simple CLHSDB command implemented in JavaScript</h3>

<b>File: test.js</b>
<pre>
<code>
function helloImpl(name) {
println("hello, " + name);
}

// register the above JavaScript function as CLHSDB command
registerCommand("hello", "hello name", "helloImpl");
</code>
</pre>
---------<br>

"test.js" can be loaded in CLHSDB prompt using <b>jsload</b> command using

<pre>
<code>
hsdb&gt; jsload test.js
</code>
</pre>

<h3>Compilation Replay</h3>
<p>
When a java process crashes in compiled method, usually a core file is saved.
Expand Down
6 changes: 1 addition & 5 deletions src/jdk.hotspot.agent/doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@ <h3>SA Modes</h3>

<h3>Command line HSDB</h3>
<p>
There are also command line HSDB variants ("clhsdbproc.sh" or "clhsdbwindbg.bat"
or 64-bit variants). There is also a JavaScript based command line interface
called "jsdbproc.sh" [or "jsdbwindbg.bat" or 64-bit variants]. More details on
command line interfaces can be found in
There is also a command line HSDB variant. More details on the command line interface can be found in:
<ul>
<li><a href="clhsdb.html">clhsdb.html</a>
<li><a href="jsdb.html">jsdb.html</a>
</ul>
</p>

Expand Down

1 comment on commit c8caf68

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.