Dynamic Shape and Data Structure Analysis in Java Presented by - - PowerPoint PPT Presentation

dynamic shape and data structure analysis in java
SMART_READER_LITE
LIVE PREVIEW

Dynamic Shape and Data Structure Analysis in Java Presented by - - PowerPoint PPT Presentation

Dynamic Shape and Data Structure Analysis in Java Presented by Sokhom Pheng (Supervised by Clark Verbrugge) McGill University October 17 th 2005 Outline Introduction & Contribution Design Challenges Experimental Results


slide-1
SLIDE 1

Dynamic Shape and Data Structure Analysis in Java

Presented by Sokhom Pheng (Supervised by Clark Verbrugge) McGill University October 17th 2005

slide-2
SLIDE 2

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

2

Outline

 Introduction & Contribution  Design  Challenges  Experimental Results  Future work & Conclusion

slide-3
SLIDE 3

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

3

Outline

 Introduction & Contribution  Design  Challenges  Experimental Results  Future work & Conclusion

slide-4
SLIDE 4

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

4

Introduction

 Two approaches  Static analysis

  • Conservative
  • Limited to simple situations

 Dynamic analysis

  • More accurate
  • More expensive

Have you ever wondered how data structures were constructed in your programs?

slide-5
SLIDE 5

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

5

Contribution

 Framework for data structure

visualization

 Program understanding  Set limits on static approaches  Provide two techniques for

visualization

 Provide dynamic representation of

garbage data

slide-6
SLIDE 6

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

6

Outline

 Introduction & Contribution  Design  Challenges  Experimental Results  Future work & Conclusion

slide-7
SLIDE 7

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

7

Design Overview

slide-8
SLIDE 8

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

8

*J Shape Analyzer

Entry point 1: DAG Entry point 3: Tree Entry point 4: DAG Entry point 1: DAG Entry point 3: Tree Entry point 4: DAG Entry point 1: DAG Entry point 3: Tree Entry point 4: Tree

slide-9
SLIDE 9

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

9

More Analysis Info

 GC info  Might be useful for GC optimization  If visualized, can see drag effect  Aging  Useful for general program

understanding

 Useful for teaching

slide-10
SLIDE 10

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

10

GC Info (splay tree)

application library

slide-11
SLIDE 11

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

11

GC Info (cont’d)

application library

slide-12
SLIDE 12

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

12

GC Info (cont’d)

slide-13
SLIDE 13

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

13

Aging (splay tree)

application library tree DAG cycle

slide-14
SLIDE 14

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

14

Outline

 Introduction & Contribution  Design  Challenges  Experimental Results  Future work & Conclusion

slide-15
SLIDE 15

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

15

Challenge 1: Animation Issue

This is what we want:

slide-16
SLIDE 16

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

16

Animation Issue (cont’d)

This is what we have:

slide-17
SLIDE 17

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

17

Tools Used

 Tom Sawyer & yWorks yFiles  Did not work properly as incremental  Graphviz Neato  Pin down object causes problems  Graphviz Dot  Tool we use  Nicest and easiest to use

slide-18
SLIDE 18

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

18

Tom Sawyer & yWorks yFiles

slide-19
SLIDE 19

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

19

Tools Used

 Tom Sawyer & yWorks yFiles  Did not work properly as incremental  Graphviz Neato  Pin down object causes problems  Graphviz Dot  Tool we use  Nicest and easiest to use

slide-20
SLIDE 20

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

20

Graphviz Neato

slide-21
SLIDE 21

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

21

Tools Used

 Tom Sawyer & yWorks yFiles  Did not work properly as incremental  Graphviz Neato  Pin down object causes problems  Graphviz Dot  Tool we use  Nicest and easiest to use

slide-22
SLIDE 22

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

22

Challenge 2: Data Size

 Visualization limitation  Too many objects to draw

  • BiSort: > 120,000 objects

 Too many snapshots generated

  • Jess: > 48,000,000 snapshots

 Computational cost  Analysis

slide-23
SLIDE 23

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

23

Data Size Potential Solutions

 Problem with number of snapshots

and cost

 Analyze data structure after a certain

number of modifications instead

 Problem with number of objects  Numerical summary

slide-24
SLIDE 24

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

24

Outline

 Introduction & Contribution  Design  Challenges  Experimental Results  Future work & Conclusion

slide-25
SLIDE 25

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

25

Benchmarks

 Tiny  Splay tree, red-black tree  Small  JOlden suite  Large  SPECjvm98 suite

slide-26
SLIDE 26

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

26

JOlden - BiSort

slide-27
SLIDE 27

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

27

BiSort (cont’d)

slide-28
SLIDE 28

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

28

BiSort GC Info

slide-29
SLIDE 29

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

29

SPECjvm98 - Jess

slide-30
SLIDE 30

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

30

Jess (cont’d)

slide-31
SLIDE 31

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

31

Jess GC info

slide-32
SLIDE 32

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

32

Outline

 Introduction & Contribution  Design  Challenges  Experimental Results  Future work & Conclusion

slide-33
SLIDE 33

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

33

Future Work

 Map to static code location  Visual improvement  Improve animation quality  Collapsing nodes to look at bigger

graphs

 More analyses, i.e. summary graphs

slide-34
SLIDE 34

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

34

Related Work

 Shape Analysis  With Annotation

  • Hummel et al.: program annotation
  • Fradet et Le Métayer: language annotation

 Without annotation

  • Ghiya and Hendren: tree/DAG/cycle
  • Wilhelm et al.: shape graph
  • Navarro et al.: reference-shape graph
slide-35
SLIDE 35

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

35

Related Work (cont’d)

 Dynamic Analysis  Online

  • MIT Program Analysis Group:

The Daikon invariant detector

  • The Dynamo Project (Indiana University)

 Offline

  • Dufour: *J, a tool for dynamic analysis of

Java programs

slide-36
SLIDE 36

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

36

Conclusion

 Design  Challenges  Visualization & tools  Amount of data  Experimental Results  JOlden  SPECjvm98

slide-37
SLIDE 37

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

37

References

  • 1. J. Bogda and A. Singh. Can Shape Analysis work at run-time? In Proceedings
  • f the 1st Java Virtual Machine Research and Technology Symposium, April

23-24, 2001.

  • 2. B. Dufour, K. Driesen, L. Hendren, and C. Verbrugge. Dynamic metrics for
  • java. OOPSLA ’03, pages 149-168.
  • 3. P. Fradet and D. L. Métayer. Shape types. POPL ’97.
  • 4. R. Ghiya and L. Hendren. Is it a tree, a dag, or a cyclic graph? A shape

analysis for heap-directed pointers in c. POPL ’96.

  • 5. B. Hackett and R. Rugina. Region-based shape analysis with tracked
  • locations. POPL ’05.
  • 6. A. Navarro, F. Corbera, R. Asenjo, A. Tineo, O. Plata, and E. Zapata. A new

dependence test based on shape analysis for pointer-based codes. LCPC ’04

  • 7. R. Wilhelm, S. Sagiv, and T. W. Reps. Shape analysis. In Computational

Complexity, pages 1-17, 2000.

slide-38
SLIDE 38

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

38

Questions?

slide-39
SLIDE 39

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

39

SPECjvm98 - MpegAudio

slide-40
SLIDE 40

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

40

MpegAudio (cont’d)

slide-41
SLIDE 41

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

41

MpegAudio (cont’d)

slide-42
SLIDE 42

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

42

MpegAudio (cont’d)

slide-43
SLIDE 43

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

43

MpegAudio GC Info

slide-44
SLIDE 44

October 17th 2005 Dynamic Shape and Data Structure Analysis in Java

44

MpegAudio GC Info (cont’d)