characterizing the usage of temporaries in framework intensive java applications
Download
Skip this Video
Download Presentation
Characterizing the Usage of Temporaries in Framework-intensive Java Applications

Loading in 2 Seconds...

play fullscreen
1 / 22

Characterizing the Usage of Temporaries in Framework-intensive Java Applications - PowerPoint PPT Presentation


  • 90 Views
  • Uploaded on

Characterizing the Usage of Temporaries in Framework-intensive Java Applications. +. +. Temporaries. Framework-intensive applications. Application. Middleware, Libraries & Frameworks. Application “Iceberg”. Research Goals. Determine why temporaries are created

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Characterizing the Usage of Temporaries in Framework-intensive Java Applications' - daisy


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
characterizing the usage of temporaries in framework intensive java applications

Characterizing the Usage of Temporaries in Framework-intensive Java Applications

framework intensive applications
+

+

Temporaries

Framework-intensive applications

Application

Middleware,

Libraries &

Frameworks

Application “Iceberg”

research goals
Research Goals
  • Determine why temporaries are created
    • Characterize temporary usage
    • Characterize regions allocating temporaries
    • Help programmers understand usage of temporaries
  • Long-term: Eliminate object churn
    • Establish best practices for API design/usage
    • Introduce local caching
    • Specialize frameworks for common usage
possible approaches
Safe

All executions

Low runtime overhead

Difficult to scale

Reflection poorly handled

Poor support for dynamically generated classes

Unsafe

Single execution

High runtime overhead

Easy to scale

Reflection easily handled

Good support for dynamically generated classes

Possible Approaches

Static Analysis

Dynamic Analysis

blended analysis
Execution

Trace

Loaded

Classes

Reflection

Models

Blended Analysis

(ISSTA’07)

Java

Application

Call Graph

Static Analysis

pruning control flow graphs
w = new A()

z = C.m()

Pruning Control Flow Graphs

Allocated types: {B}

Observed targets: {D.m}

Entry

x = new B()

y = D.m()

Exit

escape analysis
Globally escaping

Non-escaping

Arg-escaping

Escape Analysis

Connection graph

public X identity(X obj1) {

return obj1;

}

public X escape(X obj2) {

G.global = obj2;

return obj2;

}

obj1

return

public void f() {

X inst;

if (cond)

inst = identity(new Y());

else

inst = escape(new Z());

}

Phantom

Object #1

escape analysis1
Globally escaping

Non-escaping

Arg-escaping

Escape Analysis

Connection graph

public X identity(X obj1) {

return obj1;

}

public X escape(X obj2) {

G.global = obj2;

return obj2;

}

G

obj2

return

public void f() {

X inst;

if (cond)

inst = identity(new Y());

else

inst = escape(new Z());

}

global

Phantom

Object #2

escape analysis2
return

obj1

Phantom

Object #1

Globally escaping

Non-escaping

Arg-escaping

Escape Analysis

Connection graph

public X identity(X obj1) {

return obj1;

}

G

inst

public X escape(X obj2) {

G.global = obj2;

return obj2;

}

global

Z

Y

public void f() {

X inst;

if (cond)

inst = identity(new Y());

else

inst = escape(new Z());

}

obj2

return

Phantom

Object #2

blended escape analysis
f()

g()

X

X

h()

X

Blended Escape Analysis
  • Based on Choi et. al. analysis [TOPLAS’03]
    • Abstract objects are allocation sites
    • Modified to keep a distinct escape state for each object at each method in the call graph
    • Modified to use declared types [Lhotàk & Hendren, CC’03]

X clone = x.clone();

reduced connection graphs
Reduced Connection Graphs

Java

Application

Profiler

Dynamic CCT

+ instances

Visible objects

Reduced

Conn Graphs

on CCT

Dynamic

Call Graph

Blended Escape

Analysis

Connection

Graphs

biginteger writeobject
BigInteger.writeObject(…)
  • No CFG pruning
  • Captures 27 instances
biginteger writeobject1
BigInteger.writeObject(…)
  • CFG pruning
  • Captures 135 instances
benchmarks
Benchmarks

App

Trade 6 / WAS

Eclipse

  • Trade 6 parameters:
    • Runtime mode (database): JDBC (Direct), Enterprise Java Beans (EJB)
    • Web services: off (Std), on (WS)
related work
Related Work
  • Framework-intensive systems
    • Ammons et. al. [ECOOP’04]
    • Srinivas & Srinivasan [FSE ’05]
    • Mitchell et. al. [ECOOP ’06]
  • Combined static & dynamic analyses
    • Gupta et. al. [TOSEM ’97]
    • Groce et. al. [TACAS ’06]
    • Artzi et. al. [ASE’07]
  • Characterization of data structures in Java
    • Mitchell [ECOOP ’06], Mitchell & Sevitsky [ECOOP ’03]
    • Blackburn et. al. [OOPSLA’06]
    • Buytaert et. al. [ACES’05]
conclusions
Conclusions
  • Temporaries are a real performance problem
  • Tool support is necessary to identify them
  • Research contributions:
    • New optimized blended analysis
    • New metrics for characterization of temporaries
    • Empirical study on real, framework-intensive Java applications
  • Blended analysis shows potential for solving the object churn problem
ad