Characterizing the usage of temporaries in framework intensive java applications
This presentation is the property of its rightful owner.
Sponsored Links
1 / 22

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


  • 60 Views
  • Uploaded on
  • Presentation posted in: General

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

Download Presentation

Characterizing the Usage of Temporaries in Framework-intensive Java Applications

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)


Metrics

Metrics


Pruning effects

Pruning Effects


Disposition

Disposition


Capturing depth

Capturing Depth


Concentration

Concentration


Of types in data structures

# of Types in Data Structures


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


  • Login