Skip to content

Commit

Permalink
8279024: Remove javascript references from clhsdb.html
Browse files Browse the repository at this point in the history
Reviewed-by: kevinw, sspitsyn
  • Loading branch information
plummercj committed Dec 22, 2021
1 parent bf28264 commit d0ea7c9
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

3 comments on commit d0ea7c9

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on d0ea7c9 Dec 22, 2022

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on d0ea7c9 Dec 22, 2022

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-d0ea7c9d in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit d0ea7c9d from the openjdk/jdk repository.

The commit being backported was authored by Chris Plummer on 22 Dec 2021 and was reviewed by Kevin Walls and Serguei Spitsyn.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-d0ea7c9d:GoeLin-backport-d0ea7c9d
$ git checkout GoeLin-backport-d0ea7c9d
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-d0ea7c9d

Please sign in to comment.