230 likes | 328 Views
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
E N D
Visualizing Object OrientedSoftware 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 • Functionality is dispersed in many classes • It is BIG
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
Basic Concepts • Classes, objects, methods and messages • Levels of detail • Different views • Clustering indicates interaction • Histograms show activity • Cross-reference matrices
Class name Call stack Top of stack Cluster Inactive class Active class Inter-class call cluster
Inter-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
Inter-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
Classes Hot Spot CPU time Time bar chart
Time 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
Not Many calls Many calls Callers Called Inter-class call matrix
Sub system Callers Called Inter-class call matrix
Callers Called Inter-method call matrix
Inter-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
Inter-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
Inter-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
Destroyed Instances in White Clicking on an instance shows textual message information All Instances Color shows message activity Histogram Of Instances
Histogram 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
Histogram Of Instances • Created objects
Identifying Problems • Many instances of Term, Factors and BaseNode • Instances are active only a short time after creation • What can this indicate? • A memory leak!
Finding the Responsible Classes • Allocation Matrix: Allocating Classes Allocated Classes
“Term” methods Looking at Inter-Function Call Matrix • Conclusion: Terms::Add may be missing a call to ~Term “Terms” methods
Conclusions • SV is useful in real life applications • Aids debugging • Finds optimization spots • Helps understand the system