visualizing objects and memory usage
DESCRIPTION
Presentation of the research paper entitled "Visualizing Objects and Memory Usage" in Smalltalks 2010, Concepción del Uruguay, Argentina.TRANSCRIPT
Visualizing Objects and
Memory Usage
RMod
1
I n g . m a r i a n o m a r t i n e z p e c km a r i a n o p e c k @ g m a i l . c o m
Saturday, November 13, 2010
The context
2
Saturday, November 13, 2010
The context
2
Saturday, November 13, 2010
The context
2
Saturday, November 13, 2010
The context
2
Saturday, November 13, 2010
The context
2
Saturday, November 13, 2010
1st step: UNDERSTAND.
To understand: VISUALIZATIONS.
3
Saturday, November 13, 2010
Problem
How to visualize objects and memory usage.
Special treatment for classes, methods and packages.
Take into account objects usage.
4
Saturday, November 13, 2010
Regarding related work...no one solves the problem of
taking into account objects usage.
5
Saturday, November 13, 2010
Our solution
Trace objects usage.
Use DistributionMaps to visualize the results.
6
Saturday, November 13, 2010
7
Moose is a platform for software and data analysis
Saturday, November 13, 2010
DistributionMap“Distribution Map visualizes parts of a system and shows how properties of the part elements spread over the initial parts. ”
8
part 1 part 2 part 3
part 4part 5
Container
Element
Property1Property2Property3Property4
Saturday, November 13, 2010
JBOSS example
9
Saturday, November 13, 2010
Used Object Maps
10
Distribution Maps that take into account objects and memory usage
Saturday, November 13, 2010
How to use them?
1.Start the analysis.
2.Run the scenario to analyze.
3.Stop the analysis.
4.Visualize using DistributionMaps.
11
Saturday, November 13, 2010
SHOWTIME
12
Saturday, November 13, 2010
Tracing Objects Usage
Usage bit in the Object Header (Virtual Machine).
Define “when an objects is marked as used?”.
Modify VM to mark objects when used.
13
Saturday, November 13, 2010
when an objects is marked as used?
Quick answer: when it receives a message.
When the VM directly use it.
When used by special VM bytecodes (#class, #==, etc).
14
Saturday, November 13, 2010
Showtime 2
15
Saturday, November 13, 2010
Possible uses
When building minimal images.
Virtual memory implementations.
Detect bad smells or possible overuse of memory.
Detect opportunities of refactorings.
16
Saturday, November 13, 2010
conclusions and future work
Use Distribution Maps and distinguish between used and unused instances.
Useful to analyze the system and to know which objects are used in different scenarios.
DistributionMap comparator.
Saturday, November 13, 2010