1 / 22

Characterizing the Usage of Temporaries in Framework-intensive Java Applications

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

daisy
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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Characterizing the Usage of Temporaries in Framework-intensive Java Applications

  2. + + Temporaries Framework-intensive applications Application Middleware, Libraries & Frameworks Application “Iceberg”

  3. 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

  4. 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

  5. Execution Trace Loaded Classes Reflection Models Blended Analysis (ISSTA’07) Java Application Call Graph Static Analysis

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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();

  11. Reduced Connection Graphs Java Application Profiler Dynamic CCT + instances Visible objects Reduced Conn Graphs on CCT Dynamic Call Graph Blended Escape Analysis Connection Graphs

  12. BigInteger.writeObject(…) • No CFG pruning • Captures 27 instances

  13. BigInteger.writeObject(…) • CFG pruning • Captures 135 instances

  14. Benchmarks App Trade 6 / WAS Eclipse • Trade 6 parameters: • Runtime mode (database): JDBC (Direct), Enterprise Java Beans (EJB) • Web services: off (Std), on (WS)

  15. Metrics

  16. Pruning Effects

  17. Disposition

  18. Capturing Depth

  19. Concentration

  20. # of Types in Data Structures

  21. 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]

  22. 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

More Related