visualizing object oriented software execution

23
Visualizing Object Visualizing Object Oriented Oriented Software execution Software execution By: Wim De Pauw, Doug Kimelman and John Vlissides Presented By: Tomer & Mirela Ben-Chen

Upload: mrinal

Post on 13-Jan-2016

29 views

Category:

Documents


1 download

DESCRIPTION

Visualizing Object Oriented Software execution. By: Wim De Pauw, Doug Kimelman and John Vlissides. Presented By: Tomer & Mirela Ben-Chen. Motivation. Large software systems are difficult to understand, debug and tune Difficult because Difference between code and execution structures - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Visualizing Object Oriented Software execution

Visualizing Object OrientedVisualizing Object OrientedSoftware executionSoftware execution

By: Wim De Pauw, Doug Kimelman and John Vlissides

Presented By:

Tomer & Mirela Ben-Chen

Page 2: Visualizing Object Oriented Software execution

2

MotivationMotivation

Large software systems are difficult to understand, debug and tune

Difficult because– Difference between code and execution

structures– Functionality is dispersed in many classes– It is BIG

Page 3: Visualizing Object Oriented Software execution

3

Motivation (cont.)Motivation (cont.)

Static description of code is widely available– UML– Source navigators

Dynamic description is not common and not standardized

The dynamic aspect is more important to understand the software

Best displayed by visual animated tools

Page 4: Visualizing Object Oriented Software execution

4

Basic ConceptsBasic Concepts

Classes, objects, methods and messagesLevels of detailDifferent views

– Clustering indicates interaction– Histograms show activity– Cross-reference matrices

Page 5: Visualizing Object Oriented Software execution

5

Inter-class call clusterInter-class call cluster

Class name

Cluster

Active classInactive class

Call stack

Top of stack

Page 6: Visualizing Object Oriented Software execution

6

Inter-class call clusterInter-class call cluster

Purpose:– Dynamic overview of objects’ interaction

Elements:– Each class is a floating label– The more the classes communicate, the closer they are– Labels are colored by number of messages (calls)– Indicates calling stack– Indicates currently active class

Page 7: Visualizing Object Oriented Software execution

7

Inter-class call clusterInter-class call cluster

Interpretation– Static

Clustered classes – tightly coupled Hot-spots – red classes

– Dynamic Location of execution path – hot spot Classes changing clusters – new execution phase

Page 8: Visualizing Object Oriented Software execution

8

Time bar chartTime bar chart

CPU time

Cla

sses

Hot Spot

Page 9: Visualizing Object Oriented Software execution

9

Time bar chartTime bar chart

Purpose:– Shows CPU usage per class

Elements– Classes appear when instantiated– Length of bar proportional to CPU time

Interpretation– Long bars indicate hot-spots

Page 10: Visualizing Object Oriented Software execution

10

Inter-class call matrixInter-class call matrix

Called

Cal

lers

Many calls

Not Many calls

Page 11: Visualizing Object Oriented Software execution

11

Inter-class call matrixInter-class call matrix

Sub system

Called

Cal

lers

Page 12: Visualizing Object Oriented Software execution

12

Inter-method call matrixInter-method call matrixC

alle

rs

Called

Page 13: Visualizing Object Oriented Software execution

13

Inter-class call matrixInter-class call matrix

Purpose:– Cumulative overview of communication

Elements– Classes appear as instantiated– Square denotes a call from Y to X– Color of square reflects number of calls

Page 14: Visualizing Object Oriented Software execution

14

Inter-class call matrixInter-class call matrix

Interpretation– Vertical stripes – heavily used base class– Horizontal stripes – class with many members– Squares on diagonal – calls to self– Clusters near diagonal – tightly coupled classes,

part of a sub-system

Page 15: Visualizing Object Oriented Software execution

15

Inter-method call matrixInter-method call matrix

Purpose:– Extended view of the call matrix

Elements– Square denotes calls from method X to method

Y– Color of square indicates number of calls

Page 16: Visualizing Object Oriented Software execution

16

Histogram Of InstancesHistogram Of Instances

All Instances

Destroyed Instances in White

Color shows message activity

Clicking on an instance shows textual message information

Page 17: Visualizing Object Oriented Software execution

17

Histogram Of InstancesHistogram Of Instances

Clicking on instance can show textually:– Received messages information– Sent messages information– Instance creator

User can also view graphically, for any instance:– Objects it calls– Objects that call it– Objects it creates– Objects that created it

View changes dynamically as instances are created/destroyed

Page 18: Visualizing Object Oriented Software execution

18

Histogram Of InstancesHistogram Of Instances

Created objects

Page 19: Visualizing Object Oriented Software execution

19

Identifying ProblemsIdentifying Problems

Many instances of Term, Factors and BaseNode Instances are active only a short time after creation What can this indicate?

A memory leak!

Page 20: Visualizing Object Oriented Software execution

20

Finding the Responsible Finding the Responsible ClassesClasses

Allocation Matrix:

Allocated Classes

All

ocat

ing

Cla

sses

Page 21: Visualizing Object Oriented Software execution

21

Looking at Inter-Function Call Looking at Inter-Function Call MatrixMatrix

Conclusion: Terms::Add may be missing a call to ~Term

“Term” methods

“Ter

ms”

m

etho

ds

Page 22: Visualizing Object Oriented Software execution

22

Instance Histogram – Correct Instance Histogram – Correct CaseCase

Page 23: Visualizing Object Oriented Software execution

23

ConclusionsConclusions

SV is useful in real life applications– Aids debugging– Finds optimization spots– Helps understand the system