Skip to content

Commit 03339eb

Browse files
committed
Add IGV sources
1 parent 0284fef commit 03339eb

File tree

1,077 files changed

+119339
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,077 files changed

+119339
-8
lines changed

ci.jsonnet

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ local javadoc = import "ci_includes/publish-javadoc.jsonnet";
3535
# VM
3636
local vm = import 'vm/ci/ci_includes/vm.jsonnet';
3737

38+
# Visualizer
39+
local visualizer = import 'visualizer/ci/ci.jsonnet';
40+
3841
local verify_ci = (import 'ci/ci_common/ci-check.libsonnet').verify_ci;
3942

4043
{
@@ -54,7 +57,8 @@ local verify_ci = (import 'ci/ci_common/ci-check.libsonnet').verify_ci;
5457
tools.builds +
5558
truffle.builds +
5659
javadoc.builds +
57-
vm.builds
60+
vm.builds +
61+
visualizer.builds
5862
)],
5963
assert verify_ci(self.builds),
6064
// verify that the run-spec demo works

compiler/mx.compiler/mx_graal_tools.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@
4444

4545
_suite = mx.suite('compiler')
4646

47-
def run_netbeans_app(app_name, env=None, args=None):
47+
def run_netbeans_app(app_name, jdkhome, args=None, dist=None):
4848
args = [] if args is None else args
49-
dist = app_name.upper() + '_DIST'
49+
if dist is None:
50+
dist = app_name.upper() + '_DIST'
5051
name = app_name.lower()
5152
res = mx.library(dist)
5253

@@ -64,10 +65,10 @@ def run_netbeans_app(app_name, env=None, args=None):
6465
if mx.get_os() != 'windows':
6566
# Make sure that execution is allowed. The zip file does not always specfiy that correctly
6667
os.chmod(executable, 0o777)
67-
launch = [executable]
68+
launch = [executable, '--jdkhome', jdkhome]
6869
if not mx.get_opts().verbose:
6970
launch.append('-J-Dnetbeans.logger.console=false')
70-
mx.run(launch+args, env=env)
71+
mx.run(launch+args)
7172

7273
def igv(args):
7374
"""(obsolete) informs about IGV"""
@@ -85,9 +86,8 @@ def c1visualizer(args):
8586
v12 = mx.VersionSpec("12")
8687
def _c1vJdkVersionCheck(version):
8788
return v8u40 <= version < v12
88-
env = dict(os.environ)
89-
env['jdkhome'] = mx.get_jdk(_c1vJdkVersionCheck, versionDescription='(JDK that is >= 1.8.0u40 and <= 11)', purpose="running C1 Visualizer").home
90-
run_netbeans_app('C1Visualizer', env, args() if callable(args) else args)
89+
jdkhome = mx.get_jdk(_c1vJdkVersionCheck, versionDescription='(JDK that is >= 1.8.0u40 and <= 11)', purpose="running C1 Visualizer").home
90+
run_netbeans_app('C1Visualizer', jdkhome, args() if callable(args) else args)
9191

9292
def hsdis(args, copyToDir=None):
9393
"""download the hsdis library and copy it to a specific dir or to the current JDK

visualizer/Filters.md

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Filter API Documentation
2+
3+
Here you can find documentation for Filter API of Ideal Graph Visualizer.
4+
Custom filters are powerful tool which let you write your own code in JavaScript
5+
to allow almost unbound manipulation and analysis of GraalVM graphs in Ideal Graph Visualizer.
6+
7+
## Helpers
8+
9+
Our Filter API comes with various prepared helper functions to speedup writing of your own filters,
10+
helpers are written against [imported classes](#imported-classes) listed below.
11+
12+
- `classSimpleName(className: string): string;`
13+
returns regexp for easier matching of "class" property to class name (matches all namespaces)<p>&nbsp;</p>
14+
- `colorize(propertyName: string, valueRegexp: string, color: Color);`
15+
colorizes nodes with matching property value to a color,
16+
there are already prepared [colors](#global-colors) in [global variables](#global-variables):
17+
-- black, white, gray, darkGray, lightGray, red, green, blue, cyan, magenta, yellow, orange, pink
18+
or you can create your own (viz [imported classes](#imported-classes)): `var color = new Color(r, g, b);`<p>&nbsp;</p>
19+
- `colorizeGradient(propertyName: string, min: number, max: number);`
20+
colorizes nodes with property in gradient manner on interval \[min, max\] (expects value to be a number)
21+
default coloring goes from `blue` through `yellow` to `red` in linear fassion.<p>&nbsp;</p>
22+
- `colorizeGradientWithMode(propertyName: string, min: number, max: number, gradientMode: string);`
23+
allows to set traversion between colors to either `"LINEAR"` or `"LOGARITHMIC"` mode.<p>&nbsp;</p>
24+
- `colorizeGradientCustom(propertyName: string, min: number, max: number, gradientMode: string, colors: Color[], fractions: number[], shades: integer);`
25+
allows to further specify:
26+
-- `colors`: used colors in order from minimal to maximal value
27+
-- `fractions`: positions of abovementioned colors on color gradient scale (first is 0, last 1)
28+
-- `shades`: number of used color shades<p>&nbsp;</p>
29+
- `remove(propertyName: string, valueRegexp: string);`
30+
removes nodes with matching property value<p>&nbsp;</p>
31+
- `removeIncludingOrphans(propertyName: string, valueRegexp: string);`
32+
removes nodes with matching property value and possible orphaned nodes<p>&nbsp;</p>
33+
- `removeInputs(propertyName: string, valueRegexp: string, fromIndex: integer = 0, toIndex: integer = Integer.MAX_VALUE);`
34+
removes input connections of nodes with matching property value
35+
-- `fromIndex` and `toIndex` denotes starting and ending index of inputs to remove<p>&nbsp;</p>
36+
- `removeUnconectedSlots(removeInputs: boolean, removeOutputs: boolean);`
37+
removes input/output slots that doesn't have a connection<p>&nbsp;</p>
38+
- `split(propertyName: string, valueRegexp: string, nodeText: string);`
39+
removes nodes with matching property value and turns them into names slots on predecessor and successor nodes
40+
-- node text allow to extract and use property values as name text by format: "[propertyName]"
41+
42+
## <a name=global-variables></a>Defined global variables
43+
44+
### <a name=global-colors></a>Colors
45+
46+
|Variable name|Content|
47+
|:----:|:----:|
48+
|black|Color.static.black|
49+
|blue|Color.static.blue|
50+
|cyan|Color.static.cyan|
51+
|darkGray|Color.static.darkGray|
52+
|gray|Color.static.gray|
53+
|green|Color.static.green|
54+
|lightGray|Color.static.lightGray|
55+
|magenta|Color.static.magenta|
56+
|orange|Color.static.orange|
57+
|pink|Color.static.pink
58+
|red|Color.static.red|
59+
|yellow|Color.static.yellow|
60+
|white|Color.static.white|
61+
62+
### <a name=global-others></a>Others
63+
64+
|Variable name|Content|Description|
65+
|:----:|:----:|:----:|
66+
|IO|PrintStream|output stream|
67+
|graph|Diagram|current graph|
68+
69+
## <a name=imported-classes></a>Imported classes
70+
71+
Classes imported from Ideal Graph Visualizer Java codebase to allow their creation.
72+
73+
|JS Class|Java Class|
74+
|:----:|:----:|
75+
|Color|java.awt.Color|
76+
|||
77+
|GraphDocument|org.graalvm.visualizer.data.GraphDocument|
78+
|InputGraph|org.graalvm.visualizer.data.InputGraph|
79+
|||
80+
|Diagram|org.graalvm.visualizer.graph.Diagram|
81+
|Block|org.graalvm.visualizer.graph.Block|
82+
|Figure|org.graalvm.visualizer.graph.Figure|
83+
|FigureSource|org.graalvm.visualizer.graph.FigureSource|
84+
|InputSlot|org.graalvm.visualizer.graph.InputSlot|
85+
|OutputSlot|org.graalvm.visualizer.graph.OutputSlot|
86+
|Connection|org.graalvm.visualizer.graph.Connection|
87+
|||
88+
|MatcherSelector|org.graalvm.visualizer.graph.MatcherSelector|
89+
|InvertSelector|org.graalvm.visualizer.graph.InvertSelector|
90+
|AndSelector|org.graalvm.visualizer.graph.AndSelector|
91+
|OrSelector|org.graalvm.visualizer.graph.OrSelector|
92+
|PredecessorSelector|org.graalvm.visualizer.graph.PredecessorSelector|
93+
|SuccessorSelector|org.graalvm.visualizer.graph.SuccessorSelector|
94+
|||
95+
|Properties|org.graalvm.visualizer.data.Properties|
96+
|Property|org.graalvm.visualizer.data.Property|
97+
|||
98+
|PropertySelector|org.graalvm.visualizer.data.Properties$PropertySelector|
99+
|RegexpPropertyMatcher|org.graalvm.visualizer.data.Properties$RegexpPropertyMatcher|
100+
|EqualityPropertyMatcher|org.graalvm.visualizer.data.Properties$EqualityPropertyMatcher|
101+
|InvertPropertyMatcher|org.graalvm.visualizer.data.Properties$InvertPropertyMatcher|
102+
|||
103+
|ColorFilter|org.graalvm.visualizer.filter.ColorFilter|
104+
|ColorRule|org.graalvm.visualizer.filter.ColorFilter$ColorRule|
105+
|CombineFilter|org.graalvm.visualizer.filter.CombineFilter|
106+
|ConnectionFilter|org.graalvm.visualizer.filter.ConnectionFilter|
107+
|CustomFilter|org.graalvm.visualizer.filter.CustomFilter|
108+
|EdgeColorIndexFilter|org.graalvm.visualizer.filter.EdgeColorIndexFilter|
109+
|GradientColorFilter|org.graalvm.visualizer.filter.GradientColorFilter|
110+
|RemoveFilter|org.graalvm.visualizer.filter.RemoveFilter|
111+
|RemoveRule|org.graalvm.visualizer.filter.RemoveFilter$RemoveRule|
112+
|RemoveInputsFilter|org.graalvm.visualizer.filter.RemoveInputsFilter|
113+
|RemoveInputsRule|org.graalvm.visualizer.filter.RemoveInputsFilter$RemoveInputsRule|
114+
|RemoveSelfLoopsFilter|org.graalvm.visualizer.filter.RemoveSelfLoopsFilter|
115+
|SplitFilter|org.graalvm.visualizer.filter.SplitFilter|
116+
|UnconnectedSlotFilter|org.graalvm.visualizer.filter.UnconnectedSlotFilter|

0 commit comments

Comments
 (0)