31. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
31
32. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
32
33. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
33
34. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
34
35. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
35
36. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
36
37. Detecting flows between classes
Activation
1 context
0..1 * *
* 1
Alias Object
origin value
37
38. Detecting flows between classes
Method
1
*
Activation
1 context
0..1 * *
* 1
Alias Object
origin value
38
39. Detecting flows between classes
Class A Class
1
*
Method
Class B 1
*
Activation
1 context
Class C
0..1 * *
* 1
Alias Object
origin value
39
40. Detecting flows between classes
Class A Class
1
*
Method
Class B 1
*
Activation
1 context
Class C
0..1 * *
* 1
Alias Object
origin value
40
47. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
l.
ard eta
[ Lienh AN'09]
L
COM
Metamodel
Activation
Alias Object
origin
Object Tracking
45
48. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
46
60. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
ta l.
ard e
Lienh 07
'
ICPC
Metamodel
Activation
Alias Object
origin
Object Tracking
58
61. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
59
71. Initial Study I
Let a developer use the tool:
12 tests in 2h
Execution Trace Test Blueprint
69
72. Initial Study II
Rewrote assertions of 14 existing tests:
72 identical, 12 missed, 5 additional
Execution Trace Test Blueprint
70
73. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
al.
a rd et
Lienh '08
R
CSM
Metamodel
Activation
Alias Object
origin
Object Tracking
71
74. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
72
75. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
73
78. Example execution
Computer Dynamic
Source Code
(formal semantics) Analysis Data
f := new File
...
return f
76
79. Example execution
Computer Dynamic
Source Code
(formal semantics) Analysis Data
f := new File allocation
...
return f
77
80. Example execution
Computer Dynamic
Source Code
(formal semantics) Analysis Data
f := new File allocation
...
field-write
return f
78
81. Example execution
Computer Dynamic
Source Code
(formal semantics) Analysis Data
f := new File allocation
...
field-write
return f
return
79
82. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
80
83. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking
81
84. Problem of conventional debuggers
In 50% of the cases the execution stack contains
essentially no information about the bug's cause.
[Liblit etal. PLDI'05]
82
86. Approaches
Omniscient Trace-oriented Trace-oriented
Debugger debugger (partial) debugger (full)
loss of old history loss of selected history complete history
overhead 100x overhead 10x overhead 100x
84
87. Approaches
Omniscient Trace-oriented Trace-oriented
Debugger
Our approach
debugger (partial) debugger (full)
low overhead
relevant history
loss of old history loss of history complete history
overhead 100x overhead 10x overhead 100x
85
88. Delete history when it
gets irrelevant
History of origins of objects
Previous field values of objects
Call stacks in which above appear
86
93. Capturing historical object state
t1 t2 t3
image := Image new image height: 17 image height: 42
height
image: @t1 nil
91
94. Capturing historical object state
t1 t2 t3
image := Image new image height: 17 image height: 42
@t1 nil
predecessor
height
image: @t2 17
92
95. Capturing historical object state
t1 t2 t3
image := Image new image height: 17 image height: 42
@t1 nil
predecessor
@t2 17
predecessor
height
image: @t3 42
93
96. Capturing historical object state
t1 t2 t3
image := Image new image height: 17 image height: 42
@t1 nil
predecessor
@t2 17
predecessor
height
image: @t3 42
predecessor
0..1 0..1
Alias Object
origin
* 1
fields 94
97. Evaluation memory usage (1)
2.5e+09 1e+07
Number of aliases allocated (left Y-axis)
Number of aliases in memory (right Y-axis)
Number of objects in memory (right Y-axis)
2e+09 8e+06
1.5e+09 6e+06
1e+09 4e+06
5e+08 2e+06
0 0
0 200 400 600 800 1000
#classes
95
98. Evaluation memory usage (2)
7e+06 50
Number of aliases allocated
Number of aliases in memory
6e+06 Number of objects in memory
Ratio between aliases in 40
memory and allocated
5e+06
30
4e+06
%
3e+06
20
2e+06
10
1e+06
0 0
0 2 4 6 8 10 12 14 16 18
#samples
96
99. Evaluation memory usage (3)
1e+07
Number of aliases allocated
9e+06 Number of aliases in memory
Number of objects in memory
8e+06
7e+06
6e+06
5e+06
4e+06
3e+06
2e+06
1e+06
0
5 10 15 20 25
#requests
97
100. Evaluation run-time overhead
Overhead GC
Recording off 1.15 1.6%
Recording on 3.84 27.6%
Largest overhead: 6.9
98
101. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
al.
a rd et
Object Tracking Lienh P'08
O
ECO
99
102. Visualizing Feature Test
Object Flows Dependencies Blueprints
Runtime Monitoring in the VM
Metamodel
Activation
Alias Object
origin
Object Tracking