Skip to content

Commit f063489

Browse files
author
Jaroslav Tulach
committed
[GR-25052] [GR-24895] Maven artifact for Insight is called agent script.
PullRequest: graal/6944
2 parents bf536d0 + dd50a3a commit f063489

File tree

16 files changed

+101
-96
lines changed

16 files changed

+101
-96
lines changed

tools/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This changelog summarizes major changes between Truffle Tools versions.
44

5+
## Version 20.3.0
6+
7+
* [GraalVM Insight](docs/Insight.md) Maven artifact is now `org.graalvm.tools:insight:20.3.0`
8+
59
## Version 20.2.0
610

711
* [GraalVM Insight](docs/Insight-Manual.md#modifying-local-variables) can modify values of local variables

tools/docs/Insight-Embedding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Read on to learn how to embed [Insight](Insight.md) into your own application.
1111
[Context](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/Context.html) API.
1212
[Insight](Insight-Manual.md) isn't an exception and it can also be
1313
controlled via the same API as well. See
14-
[AgentScript class documentation](https://www.graalvm.org/tools/javadoc/com/oracle/truffle/tools/agentscript/AgentScript.html)
14+
[formal Insight documentation](https://www.graalvm.org/tools/javadoc/org/graalvm/tools/insight/Insight.html)
1515
for more details:
1616

1717
```java

tools/docs/Insight-Manual.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ As such, whenever the *node.js* framework loaded a script,
4545
the listener got notified of it and could take an action - in this case
4646
printing the length and name of processed script.
4747

48-
### Histogram - Use Full Power of Your Language!
48+
### Hotness Top 10 - Use Full Power of Your Language!
4949

5050
Collecting the insights information isn't limited to simple print statement.
5151
One can perform any Turing complete computation in your language. Imagine
52-
following `function-histogram-tracing.js` that counts all method invocations
52+
following `function-hotness-tracing.js` that counts all method invocations
5353
and dumps the most frequent ones when the execution of your program is over:
5454

5555
```js
5656
var map = new Map();
5757

58-
function dumpHistogram() {
59-
print("==== Histogram ====");
58+
function dumpHotness() {
59+
print("==== Hotness Top 10 ====");
6060
var digits = 3;
6161
Array.from(map.entries()).sort((one, two) => two[1] - one[1]).forEach(function (entry) {
6262
var number = entry[1].toString();
@@ -67,7 +67,7 @@ function dumpHistogram() {
6767
}
6868
if (number > 10) print(`${number} calls to ${entry[0]}`);
6969
});
70-
print("===================");
70+
print("========================");
7171
}
7272

7373
insight.on('enter', function(ev) {
@@ -82,18 +82,18 @@ insight.on('enter', function(ev) {
8282
roots: true
8383
});
8484

85-
insight.on('close', dumpHistogram);
85+
insight.on('close', dumpHotness);
8686
```
8787

8888
The `map` is a global variable visible for the whole **Insight** script that
89-
allows the code to share data between the `insight.on('enter')` function and the `dumpHistogram`
89+
allows the code to share data between the `insight.on('enter')` function and the `dumpHotness`
9090
function. The latter is executed when the `node` process execution is over (registered via
91-
`insight.on('close', dumpHistogram)`. Invoke as:
91+
`insight.on('close', dumpHotness)`. Invoke as:
9292

9393
```bash
94-
$ graalvm/bin/node --experimental-options --js.print --insight=function-histogram-tracing.js -e "print('The result: ' + 6 * 7)"
94+
$ graalvm/bin/node --experimental-options --js.print --insight=function-hotness-tracing.js -e "print('The result: ' + 6 * 7)"
9595
The result: 42
96-
=== Histogram ===
96+
==== Hotness Top 10 ====
9797
543 calls to isPosixPathSeparator
9898
211 calls to E
9999
211 calls to makeNodeErrorWithCode
@@ -111,7 +111,7 @@ The result: 42
111111
13 calls to copyPrototype
112112
13 calls to hideStackFrames
113113
13 calls to addReadOnlyProcessAlias
114-
=================
114+
========================
115115
```
116116

117117
Table with names and counts of function invocations is printed out when the
@@ -355,7 +355,7 @@ R: observed loading of test.R
355355

356356
The only change is the R language. All the other [Insight](Insight.md)
357357
features and
358-
[APIs](https://www.graalvm.org/tools/javadoc/com/oracle/truffle/tools/agentscript/AgentScript.html#VERSION)
358+
[APIs](https://www.graalvm.org/tools/javadoc/org/graalvm/tools/insight/Insight.html#VERSION)
359359
remain the same.
360360

361361
### Inspecting Values
@@ -448,9 +448,9 @@ instrument. Never the less, the compatibility of the **Insight** API
448448
exposed via the `insight` object
449449
is treated seriously.
450450

451-
The [documentation](https://www.graalvm.org/tools/javadoc/com/oracle/truffle/tools/agentscript/AgentScript.html)
451+
The [documentation](https://www.graalvm.org/tools/javadoc/org/graalvm/tools/insight/Insight.html)
452452
of the `insight` object properties and functions is available as part of its
453-
[javadoc](https://www.graalvm.org/tools/javadoc/com/oracle/truffle/tools/agentscript/AgentScript.html#VERSION).
453+
[javadoc](https://www.graalvm.org/tools/javadoc/org/graalvm/tools/insight/Insight.html#VERSION).
454454

455455
Future versions will add new features, but whatever has
456456
once been exposed, remains functional. If your script depends on some fancy new
@@ -461,7 +461,7 @@ print(`GraalVM Insight version is ${insight.version}`);
461461
```
462462

463463
and act accordingly to the obtained version. New elements in the
464-
[documentation](https://www.graalvm.org/tools/javadoc/com/oracle/truffle/tools/agentscript/AgentScript.html)
464+
[documentation](https://www.graalvm.org/tools/javadoc/org/graalvm/tools/insight/Insight.html)
465465
carry associated `@since` tag to describe the minimimal version the associated
466466
functionality/element is available since.
467467

tools/docs/Insight.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ hooks on already deployed applications running at full speed.
88
code once, apply your insights anytime, anywhere!
99

1010
Find out what **Insight** offers from a [tools change log](../CHANGELOG.md),
11+
from a [formal API specification](https://www.graalvm.org/tools/javadoc/org/graalvm/tools/insight/Insight.html),
1112
by checking the [Insight Hacker's manual](Insight-Manual.md)
1213
or by reading on...
1314

tools/mx.tools/mx_tools.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,14 @@ def _tools_gate_runner(args, tasks):
214214

215215
mx_sdk_vm.register_graalvm_component(mx_sdk_vm.GraalVmTool(
216216
suite=_suite,
217-
name='AgentScript',
218-
short_name='ats',
219-
dir_name='agentscript',
217+
name='Insight',
218+
short_name='insight',
219+
dir_name='insight',
220220
license_files=[],
221221
third_party_license_files=[],
222222
dependencies=['Truffle'],
223-
truffle_jars=['tools:AGENTSCRIPT'],
224-
support_distributions=['tools:AGENTSCRIPT_GRAALVM_SUPPORT'],
223+
truffle_jars=['tools:INSIGHT'],
224+
support_distributions=['tools:INSIGHT_GRAALVM_SUPPORT'],
225225
priority=10,
226226
include_by_default=True,
227227
))

tools/mx.tools/suite.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"annotationProcessors" : ["truffle:TRUFFLE_DSL_PROCESSOR"],
9797
"workingSets" : "Tools",
9898
},
99-
"com.oracle.truffle.tools.agentscript.test" : {
99+
"org.graalvm.tools.insight.test" : {
100100
"subDir" : "src",
101101
"sourceDirs" : ["src"],
102102
"dependencies" : [
@@ -342,10 +342,10 @@
342342
"native-image.properties" : "file:mx.tools/tools-chromeinspector.properties",
343343
},
344344
},
345-
"AGENTSCRIPT": {
345+
"INSIGHT": {
346346
"subDir": "src",
347347
# This distribution defines a module.
348-
"moduleName" : "com.oracle.truffle.tools.agentscript",
348+
"moduleName" : "org.graalvm.tools.insight",
349349
"dependencies": [
350350
"org.graalvm.tools.insight",
351351
"com.oracle.truffle.tools.agentscript"
@@ -354,27 +354,27 @@
354354
"truffle:TRUFFLE_API",
355355
],
356356
"maven" : {
357-
"artifactId" : "agentscript",
357+
"artifactId" : "insight",
358358
},
359-
"description" : "Script driven tracing and instrumentation Agent",
359+
"description" : "The Ultimate Insights Gathering Platform",
360360
},
361-
"AGENTSCRIPT_TEST": {
361+
"INSIGHT_TEST": {
362362
"subDir": "src",
363363
"dependencies": [
364-
"com.oracle.truffle.tools.agentscript.test",
364+
"org.graalvm.tools.insight.test",
365365
],
366366
"distDependencies" : [
367367
"truffle:TRUFFLE_TEST",
368-
"AGENTSCRIPT",
368+
"INSIGHT",
369369
],
370-
"description" : "Tests for the script driven tracing and instrumentation Agent.",
370+
"description" : "Tests for the Ultimate Insights Gathering Platform",
371371
"maven" : False,
372372
},
373-
"AGENTSCRIPT_GRAALVM_SUPPORT" : {
373+
"INSIGHT_GRAALVM_SUPPORT" : {
374374
"native" : True,
375-
"description" : "Script driven tracing and instrumentation Agent for the GraalVM",
375+
"description" : "The Ultimate Insights Gathering Platform for the GraalVM",
376376
"layout" : {
377-
"native-image.properties" : "file:mx.tools/tools-agentscript.properties",
377+
"native-image.properties" : "file:mx.tools/tools-insight.properties",
378378
},
379379
},
380380
"TRUFFLE_PROFILER": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* or visit www.oracle.com if you need additional information or have any
2323
* questions.
2424
*/
25-
package com.oracle.truffle.tools.agentscript.test;
25+
package org.graalvm.tools.insight.test;
2626

2727
import java.util.function.Function;
2828
import org.graalvm.polyglot.Context;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* or visit www.oracle.com if you need additional information or have any
2323
* questions.
2424
*/
25-
package com.oracle.truffle.tools.agentscript.test;
25+
package org.graalvm.tools.insight.test;
2626

2727
import com.oracle.truffle.api.instrumentation.EventContext;
2828
import com.oracle.truffle.api.interop.InteropLibrary;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* or visit www.oracle.com if you need additional information or have any
2323
* questions.
2424
*/
25-
package com.oracle.truffle.tools.agentscript.test;
25+
package org.graalvm.tools.insight.test;
2626

2727
// @formatter:off
2828
import java.util.Map;

0 commit comments

Comments
 (0)