Visualizing Object Oriented Software execution

Post on 13-Jan-2016

29 views 1 download

Tags:

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

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

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

4

Basic ConceptsBasic Concepts

Classes, objects, methods and messagesLevels of detailDifferent views

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

5

Inter-class call clusterInter-class call cluster

Class name

Cluster

Active classInactive class

Call stack

Top of stack

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

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

8

Time bar chartTime bar chart

CPU time

Cla

sses

Hot Spot

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

10

Inter-class call matrixInter-class call matrix

Called

Cal

lers

Many calls

Not Many calls

11

Inter-class call matrixInter-class call matrix

Sub system

Called

Cal

lers

12

Inter-method call matrixInter-method call matrixC

alle

rs

Called

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

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

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

16

Histogram Of InstancesHistogram Of Instances

All Instances

Destroyed Instances in White

Color shows message activity

Clicking on an instance shows textual message information

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

18

Histogram Of InstancesHistogram Of Instances

Created objects

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!

20

Finding the Responsible Finding the Responsible ClassesClasses

Allocation Matrix:

Allocated Classes

All

ocat

ing

Cla

sses

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

22

Instance Histogram – Correct Instance Histogram – Correct CaseCase

23

ConclusionsConclusions

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