Characterizing the usage of temporaries in framework intensive java applications
Download
1 / 22

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


  • 89 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

+ Framework-intensive Java Applications

+

Temporaries

Framework-intensive applications

Application

Middleware,

Libraries &

Frameworks

Application “Iceberg”


Research goals
Research Goals Framework-intensive Java Applications

  • 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 Framework-intensive Java Applications

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 Framework-intensive Java Applications

Trace

Loaded

Classes

Reflection

Models

Blended Analysis

(ISSTA’07)

Java

Application

Call Graph

Static Analysis


Pruning control flow graphs

w = new A() Framework-intensive Java Applications

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 Framework-intensive Java Applications

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 Framework-intensive Java Applications

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 Framework-intensive Java Applications

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() Framework-intensive Java Applications

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 Framework-intensive Java Applications

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(…) Framework-intensive Java Applications

  • No CFG pruning

  • Captures 27 instances


Biginteger writeobject1
BigInteger.writeObject(…) Framework-intensive Java Applications

  • CFG pruning

  • Captures 135 instances


Benchmarks
Benchmarks Framework-intensive Java Applications

App

Trade 6 / WAS

Eclipse

  • Trade 6 parameters:

    • Runtime mode (database): JDBC (Direct), Enterprise Java Beans (EJB)

    • Web services: off (Std), on (WS)


Metrics
Metrics Framework-intensive Java Applications


Pruning effects
Pruning Effects Framework-intensive Java Applications


Disposition
Disposition Framework-intensive Java Applications


Capturing depth
Capturing Depth Framework-intensive Java Applications


Concentration
Concentration Framework-intensive Java Applications


Of types in data structures
# of Types in Data Structures Framework-intensive Java Applications


Related work
Related Work Framework-intensive Java Applications

  • 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 Framework-intensive Java Applications

  • 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