Combining Static and Dynamic Data in Code Visualization - PowerPoint PPT Presentation

About This Presentation
Title:

Combining Static and Dynamic Data in Code Visualization

Description:

Sable Research Group, McGill University. PASTE 2002. Charleston, South Carolina ... STEP: http://www.sable.mcgill.ca/step/ STEP papers, more to come. ... – PowerPoint PPT presentation

Number of Views:81
Avg rating:3.0/5.0
Slides: 29
Provided by: deng
Category:

less

Transcript and Presenter's Notes

Title: Combining Static and Dynamic Data in Code Visualization


1
Combining Static and Dynamic Data in Code
Visualization
  • David Eng
  • Sable Research Group, McGill University
  • PASTE 2002
  • Charleston, South Carolina
  • November 18-19, 2002

2
Presentation outline
  • Introduction
  • Framework overview
  • JIL
  • SOOT
  • STEP
  • JIMPLEX
  • Future work

3
Introduction
  • Code visualization why and where?
  • Program understanding.
  • Compiler development.
  • Visualization of an optimizable IR.
  • Motivation
  • Expose both static dynamic program attributes
    which are hidden in the raw IR.
  • Design goals
  • Intuitive, portable, modular.

4
Framework overview
Java class files
Tools with JIL support
Visualizers with JIL support
JIL documents
JIMPLEX (XSL/HTML)
MyClass.java
static data (JIL)
SOOT
DTD
JVM/JVMPI (execution profile)
STEP
dynamic data (JIL)
MyVisualizer (my language)
DTD
(d)
(c)
(b)
(a)
5
Java Intermediate Language (JIL)
  • XML-based representation of code.
  • A metalanguage used to describe other languages
    and their characteristics.
  • Encapsulates IRs as code objects which can be
    extended with both static and dynamic data.

6
JIL document structure
myclass
myclass
element legend
base
history
fields
methods
required
name, returns, access
name, type, access
version, created
extension
contributing tools
runtime accesses
runtime invokes
parameters
locals
labels
statements
exceptions
name, type
name, type
name
line number, label
type, handler
uses
uses
statement count
jimple declaration
definitions
flow information
live variables in/out
invoke targets
7
Benefits of using XML
  • Extensible add or remove elements without
    breaking existing structure.
  • Supported by existing parsers, APIs, software,
    databases, servers, etc.
  • Portable across platforms and networks.
  • Human readable, editable.

8
JIL
  • Lets take a look at an example JIL document

9
Static vs. dynamic data
  • Static data
  • Collected at compile-time
  • Program attributes
  • Flow information
  • Analysis results
  • Basis for program understanding
  • We chose SOOT as a source of static data

10
SOOT
  • Java optimization framework and API.
  • Uses intermediate languages (IRs) to perform
    analyses and transformations.
  • Provides several output formats, including JIL.

Baf source (.baf)
SOOT
Java source (.java)
Baf, Grimp, and Jimple
Grimp source (.grimp)
javac
Jimple source (.jimple)
analysis optimization
Java class (.class)
JIL document (.xml)
11
SOOT as a source of JIL
  • SOOT was modified to generate Jimple as XML.
  • The resulting XML contains general program
    characteristics and flow information.
  • Static analysis results can be linked to
    applicable code elements.

12
SOOT elements in JIL
  • As a source of static data
  • Flow information
  • Live variable analysis
  • Variable uses and definitions
  • Class hierarchy analysis
  • Variable type analysis

13
Static vs. dynamic data
  • Dynamic data
  • Collected at runtime
  • Profiling results
  • Variable access and use counts
  • Temporal data
  • Basis for evaluation
  • Especially important for OOP languages

14
STEP
  • Toolkit for extensible profiling.
  • Encodes and compresses trace data in a trace
    definition language.

Java class (.class)
EVolve trace format
STEP
Profiling agent (JVMPI, Kaffe, SOOT)
JIL document (.xml)
event pipe
15
STEP as a source of JIL
  • STEP as a source of profiling data.
  • Visualizers becomes consumers at the backend of
    the event pipe.
  • STEP traces are read and converted to JIL.
  • JIMPLEX has full control over what elements are
    included and in what format.

16
STEP elements in JIL
  • As a source of runtime dynamic data
  • field accesses
  • method invocations
  • object allocations

17
Separation of data from data
  • Static and dynamic data are generated as
    independent XML sources.
  • Trace results from different profiling runs can
    be swapped in and out.
  • Data sources can live on separate servers.

18
Merging XML data sources
  • To visualize both static and dynamic elements
    simultaneously, the data is merged into a single
    source.
  • XML can be merged on the fly using XSL.

19
Separation of data and interface
  • Interfaces are independent of data.
  • Can be implemented using any combination of
    languages or technologies.
  • One possible interface will be presented here

20
JIMPLEX
  • Web-based visualization interface implemented
    using HTML and XSL.
  • Uses JIL documents as data sources, allowing them
    to exist remotely.
  • Runs on any machine equipped with a web browser.
  • Portable across platforms and networks.
  • Modular and extensible.

21
JIMPLEX interface
Server A JIL document storage
(a)
myclass.xml (JIL document)
web server
XML data
Server B JIMPLEX server
(b)
jimplex.xsl (XSL stylesheet)
web server
XML/XSL transformation
HTML data
Client 1 JIMPLEX
Client n JIMPLEX
(c)
web client
web client

JIMPLEX (web page)
JIMPLEX (web page)
22
Example Interface
23
JIMPLEX interface
  • Lets take a look at the interface

24
(No Transcript)
25
Contributions
  • JIL document format
  • DTD specifications
  • SOOT extensions
  • JIL document output format
  • STEP extensions
  • JIL document generating backend
  • JIMPLEX visualizer
  • XSL stylesheets

26
Future Work JIL
  • Extract more runtime attributes from STEP, such
    as temporal data.
  • Use XML merging to support multiple STEP streams,
    allowing multi-dimensional profiling.
  • Use XML differentiation to support program and
    trace comparison, allowing better evaluation of
    optimizations.

27
Future Work UI
  • Any updates to JIL should be reflected in the UI
    (ie. multi-dimensional profiling).
  • With the inclusion of more and more data, an
    application-based interface would provide better
    performance.
  • Profiling and other dynamic data are more suited
    towards a graphical representation.

28
Links
  • Java Intermediate Language (JIL)
  • http//www.sable.mcgill.ca/jil/
  • JIL papers, resources, and the JIMPLEX
    visualizer.
  • SOOT
  • http//www.sable.mcgill.ca/soot/
  • SOOT papers, documentation, and downloads.
  • STEP
  • http//www.sable.mcgill.ca/step/
  • STEP papers, more to come.
Write a Comment
User Comments (0)
About PowerShow.com