flow-centric, back-in-time debugging
DESCRIPTION
TRANSCRIPT
![Page 1: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/1.jpg)
Flow-Centric,Back-In-Time Debugging
Adrian Lienhard, Julien Fierz and Oscar Nierstrasz
Software Composition Group University of Bern, Switzerland
![Page 2: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/2.jpg)
class Account {
Money balance;
void deposit(Money amount) {
this.balance += money;
}
...
}
Debugger call stack
....
....
....
....
..
NullPointerException >>
![Page 3: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/3.jpg)
class Company {
void pay(Money money, Person person) {
person.account().deposit(money);
}
}
class Account {
Money balance;
void deposit(Money amount) {
this.balance += money;
}
...
}
where does the
account object
come from?
Debugger call stack
...
NullPointerException >>
![Page 4: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/4.jpg)
class Company {
void pay(Money money, Person person) {
person.account().deposit(money);
}
}
class Account {
Money balance;
void deposit(Money amount) {
this.balance += money;
}
...
}
return
where does the
account object
come from?
Debugger call stack
...
NullPointerException >>
![Page 5: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/5.jpg)
class Company {
void pay(Money money, Person person) {
person.account().deposit(money);
}
}
class Account {
Money balance;
void deposit(Money amount) {
this.balance += money;
}
...
}
returnfield read
where does the
account object
come from?
Debugger call stack
...
NullPointerException >>
![Page 6: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/6.jpg)
class Company {
void pay(Money money, Person person) {
person.account().deposit(money);
}
}
class Person {
void createAccount(Bank bank) {
this.account = bank.openAccount();
}
}
class Account {
Money balance;
void deposit(Money amount) {
this.balance += money;
}
...
}
returnfield readfield writereturn
where does the
account object
come from?
Debugger call stack
...
![Page 7: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/7.jpg)
class Company {
void pay(Money money, Person person) {
person.account().deposit(money);
}
}
class Bank {
Account openAccount() {
return new Account();
}
}
class Person {
void createAccount(Bank bank) {
this.account = bank.openAccount();
}
}
class Account {
Money balance;
void deposit(Money amount) {
this.balance += money;
}
...
}
returnfield readfield writereturnallocation
where does the
account object
come from?
Debugger call stack
...
![Page 8: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/8.jpg)
In 50% of the cases the execution stack contains essentially no information about the bug’s cause.
[Liblit PLDI’05]
lost method executions
current call stack
![Page 9: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/9.jpg)
With Back-in-time debuggers, we have all data we need at hand
complete execution history
![Page 10: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/10.jpg)
With Back-in-time debuggers, we have all data we need at hand
⇒ programs slow down and run out of memory
Large amount of data:
![Page 11: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/11.jpg)
With Back-in-time debuggers, we have all data we need at hand
⇒ programs slow down and run out of memory
Large amount of data:Popthier etal.
OOPSLA'07
Lienhard etal.
ECOOP'08
![Page 12: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/12.jpg)
With Back-in-time debuggers, we have all data we need at hand
Large amount of data:
⇒ developer may not find the root cause⇒ programs slow down and run out of memory
![Page 13: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/13.jpg)
?
Developer: “where did this object come from?”
Problem: how far back in time do we need to step?
![Page 14: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/14.jpg)
14
Flow-centric debugging
Object flow (red) mapped to execution trace
![Page 15: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/15.jpg)
15
Flow-centric debugging
Object flow (red) mapped to execution trace
![Page 16: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/16.jpg)
16
The Compass Debugger
Debugger frontend makes object flow accessible
Debugging VM tracks object flow
![Page 17: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/17.jpg)
17
1 8
2
4
6
5
3
7
9
Frontend
![Page 18: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/18.jpg)
18
Execution trace visualization
selected method
methodstart time
stackdepth
![Page 19: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/19.jpg)
19
Navigating Execution Traces
execution trace
call stack
![Page 20: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/20.jpg)
20
execution stack
method traceobject flow of aselected value
object flow list
Object flow
![Page 21: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/21.jpg)
21
short demo...
![Page 22: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/22.jpg)
22
Alias Objectvalue
1*
*0..1
Activation
context1
*
origin
0..1
caller
*
ASTNode
Alias
Activation
Dynamic model Static modelCompass Model
Compass Frontend
Object Flow VM
program
execution
recording
![Page 23: Flow-Centric, Back-In-Time Debugging](https://reader034.vdocuments.net/reader034/viewer/2022051817/548f4f98b4795963488b4b42/html5/thumbnails/23.jpg)
23
Conclusion
http://scg.iam.unibe.ch/research/objectflowPrototype:
Flow-centric views improve the effectiveness of debugging
Conventional back-in-time debuggers adopt traditional stack-oriented views
Future work: concurrency bugs