visualizing objects and memory usage

22
Visualizing Objects and Memory Usage RMod 1 Ing. mariano martinez peck [email protected] Saturday, November 13, 2010

Upload: mariano-martinez-peck

Post on 29-Nov-2014

1.504 views

Category:

Documents


5 download

DESCRIPTION

Presentation of the research paper entitled "Visualizing Objects and Memory Usage" in Smalltalks 2010, Concepción del Uruguay, Argentina.

TRANSCRIPT

Page 1: Visualizing Objects and Memory Usage

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

Page 2: Visualizing Objects and Memory Usage

The context

2

Saturday, November 13, 2010

Page 3: Visualizing Objects and Memory Usage

The context

2

Saturday, November 13, 2010

Page 4: Visualizing Objects and Memory Usage

The context

2

Saturday, November 13, 2010

Page 5: Visualizing Objects and Memory Usage

The context

2

Saturday, November 13, 2010

Page 6: Visualizing Objects and Memory Usage

The context

2

Saturday, November 13, 2010

Page 7: Visualizing Objects and Memory Usage

1st step: UNDERSTAND.

To understand: VISUALIZATIONS.

3

Saturday, November 13, 2010

Page 8: Visualizing Objects and Memory Usage

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

Page 9: Visualizing Objects and Memory Usage

Regarding related work...no one solves the problem of

taking into account objects usage.

5

Saturday, November 13, 2010

Page 10: Visualizing Objects and Memory Usage

Our solution

Trace objects usage.

Use DistributionMaps to visualize the results.

6

Saturday, November 13, 2010

Page 11: Visualizing Objects and Memory Usage

7

Moose is a platform for software and data analysis

Saturday, November 13, 2010

Page 12: Visualizing Objects and Memory Usage

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

Page 13: Visualizing Objects and Memory Usage

JBOSS example

9

Saturday, November 13, 2010

Page 14: Visualizing Objects and Memory Usage

Used Object Maps

10

Distribution Maps that take into account objects and memory usage

Saturday, November 13, 2010

Page 15: Visualizing Objects and Memory Usage

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

Page 16: Visualizing Objects and Memory Usage

SHOWTIME

12

Saturday, November 13, 2010

Page 17: Visualizing Objects and Memory Usage

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

Page 18: Visualizing Objects and Memory Usage

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

Page 19: Visualizing Objects and Memory Usage

Showtime 2

15

Saturday, November 13, 2010

Page 20: Visualizing Objects and Memory Usage

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

Page 21: Visualizing Objects and Memory Usage

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

Page 22: Visualizing Objects and Memory Usage

Thanks!

Mariano Martinez [email protected]

RMod

Saturday, November 13, 2010