com.sun.hotspot.igv.data.InputNode Java Examples
The following examples show how to use
com.sun.hotspot.igv.data.InputNode.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServerCompilerScheduler.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private Node findRoot() { Node minNode = null; Node alternativeRoot = null; for (Node node : nodes) { InputNode inputNode = node.inputNode; String s = inputNode.getProperties().get("name"); if (s != null && s.equals("Root")) { return node; } if (alternativeRoot == null && node.preds.isEmpty()) { alternativeRoot = node; } if (minNode == null || node.inputNode.getId() < minNode.inputNode.getId()) { minNode = node; } } if (alternativeRoot != null) { return alternativeRoot; } else { return minNode; } }
Example #2
Source File: BytecodeNode.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) { super(Children.LEAF); this.setDisplayName(bytecode.getBci() + " " + bytecode.getName()); bciValue = bytecode.getBci() + " " + bciValue; bciValue = bciValue.trim(); Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<InputNode>(graph.getNodes()); StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue); List<InputNode> nodeList = selector.selectMultiple(matcher); if (nodeList.size() > 0) { nodes = new HashSet<InputNode>(); for (InputNode n : nodeList) { nodes.add(n); } this.setDisplayName(this.getDisplayName() + " (" + nodes.size() + " nodes)"); } }
Example #3
Source File: Source.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public Set<Integer> getSourceNodesAsSet() { if (set == null) { set = new HashSet<Integer>(); for (InputNode n : sourceNodes) { int id = n.getId(); //if(id < 0) id = -id; set.add(id); } } return set; }
Example #4
Source File: ControlFlowScene.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void selectionChanged() { InputGraphProvider p = Lookup.getDefault().lookup(InputGraphProvider.class); if (p != null) { Set<InputNode> inputNodes = new HashSet<InputNode>(); for (BlockWidget w : selection) { inputNodes.addAll(w.getBlock().getNodes()); } p.setSelectedNodes(inputNodes); } }
Example #5
Source File: Parser.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override protected InputNode start() throws SAXException { String s = readRequiredAttribute(NODE_ID_PROPERTY); int id = 0; try { id = lookupID(s); } catch (NumberFormatException e) { throw new SAXException(e); } InputNode node = new InputNode(id); getParentObject().addNode(node); return node; }
Example #6
Source File: Source.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public Set<Integer> getSourceNodesAsSet() { if (set == null) { set = new HashSet<Integer>(); for (InputNode n : sourceNodes) { int id = n.getId(); //if(id < 0) id = -id; set.add(id); } } return set; }
Example #7
Source File: ServerCompilerScheduler.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private Node findRoot() { for (Node n : nodes) { InputNode inputNode = n.inputNode; if (inputNode.getProperties().get("name").equals("Root")) { return n; } } return null; }
Example #8
Source File: Parser.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override protected InputNode start() throws SAXException { String s = readRequiredAttribute(NODE_ID_PROPERTY); int id = 0; try { id = lookupID(s); } catch (NumberFormatException e) { throw new SAXException(e); } InputNode node = new InputNode(id); getParentObject().addNode(node); return node; }
Example #9
Source File: Parser.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override protected InputNode start() throws SAXException { String s = readRequiredAttribute(NODE_ID_PROPERTY); int id = 0; try { id = lookupID(s); } catch (NumberFormatException e) { throw new SAXException(e); } return getParentObject().removeNode(id); }
Example #10
Source File: Source.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public boolean isInBlock(InputGraph g, InputBlock blockNode) { for (InputNode n : this.getSourceNodes()) { if (g.getBlock(n) == blockNode) { return true; } } return false; }
Example #11
Source File: ControlFlowScene.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void selectionChanged() { InputGraphProvider p = LookupHistory.getLast(InputGraphProvider.class);//)Utilities.actionsGlobalContext().lookup(InputGraphProvider.class); if (p != null) { Set<InputNode> inputNodes = new HashSet<InputNode>(); for (BlockWidget w : selection) { inputNodes.addAll(w.getBlock().getNodes()); } p.setSelectedNodes(inputNodes); } }
Example #12
Source File: Figure.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public boolean isRoot() { List<InputNode> sourceNodes = source.getSourceNodes(); if (sourceNodes.size() > 0 && sourceNodes.get(0).getProperties().get("name") != null) { return source.getSourceNodes().get(0).getProperties().get("name").equals("Root"); } else { return false; } }
Example #13
Source File: Parser.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override protected InputNode start() throws SAXException { String s = readRequiredAttribute(NODE_ID_PROPERTY); int id = 0; try { id = lookupID(s); } catch (NumberFormatException e) { throw new SAXException(e); } return getParentObject().removeNode(id); }
Example #14
Source File: Source.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public boolean isInBlock(InputGraph g, InputBlock blockNode) { for (InputNode n : this.getSourceNodes()) { if (g.getBlock(n) == blockNode) { return true; } } return false; }
Example #15
Source File: ControlFlowScene.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public void selectionChanged() { InputGraphProvider p = Lookup.getDefault().lookup(InputGraphProvider.class); if (p != null) { Set<InputNode> inputNodes = new HashSet<InputNode>(); for (BlockWidget w : selection) { inputNodes.addAll(w.getBlock().getNodes()); } p.setSelectedNodes(inputNodes); } }
Example #16
Source File: Source.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public Set<Integer> getSourceNodesAsSet() { if (set == null) { set = new HashSet<Integer>(); for (InputNode n : sourceNodes) { int id = n.getId(); //if(id < 0) id = -id; set.add(id); } } return set; }
Example #17
Source File: Parser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override protected InputNode start() throws SAXException { String s = readRequiredAttribute(NODE_ID_PROPERTY); int id = 0; try { id = lookupID(s); } catch (NumberFormatException e) { throw new SAXException(e); } return getParentObject().removeNode(id); }
Example #18
Source File: Parser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override protected InputNode start() throws SAXException { String s = readRequiredAttribute(NODE_ID_PROPERTY); int id = 0; try { id = lookupID(s); } catch (NumberFormatException e) { throw new SAXException(e); } InputNode node = new InputNode(id); getParentObject().addNode(node); return node; }
Example #19
Source File: ServerCompilerScheduler.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private Node findRoot() { for (Node n : nodes) { InputNode inputNode = n.inputNode; if (inputNode.getProperties().get("name").equals("Root")) { return n; } } return null; }
Example #20
Source File: ServerCompilerScheduler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private String getBlockName(InputNode n) { return n.getProperties().get("block"); }
Example #21
Source File: SelectBytecodesCookie.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** Creates a new instance of SelectBytecodesCookie */ public SelectBytecodesCookie(Set<InputNode> nodes) { this.nodes = nodes; }
Example #22
Source File: Difference.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public Pair(InputNode n1, InputNode n2) { this.n1 = n1; this.n2 = n2; }
Example #23
Source File: Difference.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public InputNode getN1() { return n1; }
Example #24
Source File: Difference.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public InputNode getN1() { return n1; }
Example #25
Source File: SelectBytecodesCookie.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public Set<InputNode> getNodes() { return Collections.unmodifiableSet(nodes); }
Example #26
Source File: SelectBytecodesCookie.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** Creates a new instance of SelectBytecodesCookie */ public SelectBytecodesCookie(Set<InputNode> nodes) { this.nodes = nodes; }
Example #27
Source File: DiagramViewModel.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void setSelectedNodes(Set<Integer> nodes) { this.selectedNodes = nodes; List<Color> colors = new ArrayList<Color>(); for (String s : getPositions()) { colors.add(Color.black); } if (nodes.size() >= 1) { for (Integer id : nodes) { if (id < 0) { id = -id; } InputNode last = null; int index = 0; for (InputGraph g : group.getGraphs()) { Color curColor = colors.get(index); InputNode cur = g.getNode(id); if (cur != null) { if (last == null) { curColor = Color.green; } else { if (last.equals(cur)) { if (curColor == Color.black) { curColor = Color.white; } } else { if (curColor != Color.green) { curColor = Color.orange; } } } } last = cur; colors.set(index, curColor); index++; } } this.setColors(colors); } setColors(colors); viewChangedEvent.fire(); }
Example #28
Source File: Source.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public void removeSourceNode(InputNode n) { sourceNodes.remove(n); set = null; }
Example #29
Source File: Source.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void addSourceNode(InputNode n) { sourceNodes.add(n); set = null; }
Example #30
Source File: Source.java From hottub with GNU General Public License v2.0 | 4 votes |
public void addSourceNodes(Source s) { for (InputNode n : s.getSourceNodes()) { sourceNodes.add(n); } set = null; }