diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Visualizer.java @ 15450:be0c151d912b

Truffle/Instrumentation: API revisions
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Tue, 29 Apr 2014 12:05:58 -0700
parents 0c6d8a08e31b
children bb9473723904
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Visualizer.java	Tue Apr 22 18:32:08 2014 -0700
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Visualizer.java	Tue Apr 29 12:05:58 2014 -0700
@@ -24,10 +24,18 @@
  */
 package com.oracle.truffle.api.instrument;
 
+import com.oracle.truffle.api.*;
 import com.oracle.truffle.api.frame.*;
+import com.oracle.truffle.api.nodes.*;
 
 /**
- * Visualization services for guest language and Truffle information.
+ * Visualization services for the benefit of {@link Instrumentation}-based tools, possibly
+ * specialized for each guest language and possibly specialized for relevant information from the
+ * underlying Truffle implementation.
+ * <p>
+ * <strong>Disclaimer:</strong> experimental interface under development.
+ *
+ * @See Instrumentation
  */
 public interface Visualizer {
 
@@ -38,6 +46,21 @@
     ASTPrinter getASTPrinter();
 
     /**
+     * A short description of a source location in terms of source + line number.
+     */
+    String displaySourceLocation(Node node);
+
+    /**
+     * Describes the name of the method containing a node.
+     */
+    String displayMethodName(Node node);
+
+    /**
+     * The name of the method.
+     */
+    String displayCallTargetName(CallTarget callTarget);
+
+    /**
      * Converts a value in the guest language to a display string.
      */
     String displayValue(Object value);