Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo...

318
Lessons Learned During the Development of the CapoOne Deterministic Multiprocessor Replay System Department of Computer Science University of Illinois at Urbana-Champaign Pablo Montesinos, Matthew Hicks, Wonsun Ahn, Samuel T. King and Josep Torrellas

Transcript of Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo...

Page 1: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Lessons Learned During the Development of the CapoOne Deterministic Multiprocessor Replay System

Department of Computer ScienceUniversity of Illinois at Urbana-Champaign

Pablo Montesinos, Matthew Hicks, Wonsun Ahn, Samuel T. King and Josep Torrellas

Page 2: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Motivation: Time Travel2

Page 3: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Motivation: Time Travel

Allows us to visit and recreate past states and events in computer

2

Page 4: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Motivation: Time Travel

Allows us to visit and recreate past states and events in computer

Wide range of uses:

2

Page 5: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Motivation: Time Travel

Allows us to visit and recreate past states and events in computer

Wide range of uses:

Debugging

2

Page 6: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Motivation: Time Travel

Allows us to visit and recreate past states and events in computer

Wide range of uses:

Debugging

Security

2

Page 7: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Motivation: Time Travel

Allows us to visit and recreate past states and events in computer

Wide range of uses:

Debugging

Security

High-availability

2

Page 8: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Motivation: Time Travel

Allows us to visit and recreate past states and events in computer

Wide range of uses:

Debugging

Security

High-availability

Enabled by using Deterministic Replay of Execution

2

Page 9: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

How Deterministic Replay Works3

Page 10: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Phase I: Initial Execution (a.k.a Recording)

Execute and record certain non-deterministic events into log

Sources of non-determinism: interrupts, memory access interleaving ...

How Deterministic Replay Works3

Page 11: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Phase I: Initial Execution (a.k.a Recording)

Execute and record certain non-deterministic events into log

Sources of non-determinism: interrupts, memory access interleaving ...

Phase II: Replay

Restore to a previous checkpoint

Re-execute and use log to force software down the same execution path

How Deterministic Replay Works3

Page 12: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Phase I: Initial Execution (a.k.a Recording)

Execute and record certain non-deterministic events into log

Sources of non-determinism: interrupts, memory access interleaving ...

Phase II: Replay

Restore to a previous checkpoint

Re-execute and use log to force software down the same execution path

How Deterministic Replay Works3

Page 13: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Phase I: Initial Execution (a.k.a Recording)

Execute and record certain non-deterministic events into log

Sources of non-determinism: interrupts, memory access interleaving ...

Phase II: Replay

Restore to a previous checkpoint

Re-execute and use log to force software down the same execution path

How Deterministic Replay Works3

Page 14: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Phase I: Initial Execution (a.k.a Recording)

Execute and record certain non-deterministic events into log

Sources of non-determinism: interrupts, memory access interleaving ...

Phase II: Replay

Restore to a previous checkpoint

Re-execute and use log to force software down the same execution path

How Deterministic Replay Works3

Page 15: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Phase I: Initial Execution (a.k.a Recording)

Execute and record certain non-deterministic events into log

Sources of non-determinism: interrupts, memory access interleaving ...

Phase II: Replay

Restore to a previous checkpoint

Re-execute and use log to force software down the same execution path

How Deterministic Replay Works3

Page 16: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

SW-Based vs HW-Based Deterministic Replay4

Page 17: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

SW-Based vs HW-Based Deterministic Replay4

SW Based

Schemes

Page 18: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

SW-Based vs HW-Based Deterministic Replay4

SW Based

Schemes

Flexible, integrate well with OS, apps

Page 19: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

SW-Based vs HW-Based Deterministic Replay4

SW Based

Schemes

Flexible, integrate well with OS, apps

Very slow on multiprocessors

Page 20: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

SW-Based vs HW-Based Deterministic Replay4

HWBased

Schemes

SW Based

Schemesvs

Flexible, integrate well with OS, apps

Very slow on multiprocessors

Page 21: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

SW-Based vs HW-Based Deterministic Replay4

HWBased

Schemes

SW Based

Schemesvs

Flexible, integrate well with OS, apps

Fast multiprocessor executionVery slow on multiprocessors

Page 22: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

SW-Based vs HW-Based Deterministic Replay4

HWBased

Schemes

SW Based

Schemesvs

Flexible, integrate well with OS, apps

Fast multiprocessor execution

Poor integration with SW

Very slow on multiprocessors

Page 23: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

HW-Assisted Deterministic Replay5

Flexible, integrate well with OS, apps

Fast multiprocessor execution

HWAssistedSchemes

Page 24: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

HW-Assisted Deterministic Replay6

Flexible, integrate well with OS, apps

Fast multiprocessor execution

HWAssistedSchemesCapoOne

Page 25: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Today’s Agenda 7

Page 26: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Today’s Agenda

Overview: Capo and CapoOne

7

Page 27: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Today’s Agenda

Overview: Capo and CapoOne

From full-system replay to sphere-based replay

7

Page 28: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Today’s Agenda

Overview: Capo and CapoOne

From full-system replay to sphere-based replay

Exiting the replay sphere

7

Page 29: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Today’s Agenda

Overview: Capo and CapoOne

From full-system replay to sphere-based replay

Exiting the replay sphere

System Issues

7

Page 30: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Capo (ASPLOS 09)8

Page 31: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Capo (ASPLOS 09)

SW-HW interface for HW-Assisted deterministic replay

8

Page 32: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Capo (ASPLOS 09)

SW-HW interface for HW-Assisted deterministic replay

Integrates HW-Based replay systems with O.S. and applications

8

Page 33: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Capo (ASPLOS 09)

SW-HW interface for HW-Assisted deterministic replay

Integrates HW-Based replay systems with O.S. and applications

Narrow: compatible with any HW-Based replay system

8

Page 34: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Capo (ASPLOS 09)

SW-HW interface for HW-Assisted deterministic replay

Integrates HW-Based replay systems with O.S. and applications

Narrow: compatible with any HW-Based replay system

Replay Sphere: new abstraction

8

Page 35: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Capo (ASPLOS 09)

SW-HW interface for HW-Assisted deterministic replay

Integrates HW-Based replay systems with O.S. and applications

Narrow: compatible with any HW-Based replay system

Replay Sphere: new abstraction

Isolates SW that is being recorded (replayed) from the rest

8

Page 36: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Capo (ASPLOS 09)

SW-HW interface for HW-Assisted deterministic replay

Integrates HW-Based replay systems with O.S. and applications

Narrow: compatible with any HW-Based replay system

Replay Sphere: new abstraction

Isolates SW that is being recorded (replayed) from the rest

Separates the responsibilities of the HW and the SW components

8

Page 37: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Capo (ASPLOS 09)

SW-HW interface for HW-Assisted deterministic replay

Integrates HW-Based replay systems with O.S. and applications

Narrow: compatible with any HW-Based replay system

Replay Sphere: new abstraction

Isolates SW that is being recorded (replayed) from the rest

Separates the responsibilities of the HW and the SW components

CapoOne: first implementation of Capo

8

Page 38: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere9

Page 39: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere9

OS

CPU1

CPU2

CPU3

CPU4

Replay HW

Page 40: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere9

OS

FFT

Thread103

FFT

Thread128

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

Page 41: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere9

OS

FFT

Thread103

FFT

Thread128

Vi

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

CPU2

Page 42: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere9

OS

FFT

Thread103

FFT

Thread128

GCC

Thread26

Vi

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

CPU2

CPU4

Page 43: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Set of threads recorded and replayed as a unit and their address space

Replay Sphere 2

Replaying

Replay Sphere9

Replay Sphere 1

Recording

OS

FFT

Thread103

FFT

Thread128

GCC

Thread26

Vi

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

CPU2

CPU4

Page 44: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Set of threads recorded and replayed as a unit and their address space

Only user-mode threads run inside spheres: R-threads

Replay Sphere 2

Replaying

Replay Sphere9

Replay Sphere 1

Recording

OS

FFT

Thread103

FFT

Thread128

GCC

Thread26

FFT

R-thread1

FFT

R-thread2

GCC

R-thread 1

Vi

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

CPU2

CPU4

Page 45: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Set of threads recorded and replayed as a unit and their address space

Only user-mode threads run inside spheres: R-threads

Replay Sphere 2

Replaying

Replay Sphere9

Replay Sphere 1

Recording

OS

FFT

Thread103

FFT

Thread128

GCC

Thread26

FFT

R-thread1

FFT

R-thread2

GCC

R-thread 1

Vi

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

Replay Sphere Manager

CPU1

CPU3

CPU2

CPU4

Page 46: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos

Replay Sphere: Separating Responsibilities10

Page 47: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos

Replay Sphere: Separating Responsibilities

Replay HW:

Records memory access interleaving of R-threads running within same sphere

Produces per-sphere Memory Interleaving Log

Enforces same memory interleaving during replay

10

Page 48: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos

Replay Sphere: Separating Responsibilities

Replay HW:

Records memory access interleaving of R-threads running within same sphere

Produces per-sphere Memory Interleaving Log

Enforces same memory interleaving during replay

Replay Sphere Manager:

Logs the other sources of non-determinism that affect the sphere

Produces per-sphere Input Log

Includes system call return values, signals, data copied into the sphere...

Injects data from log into sphere during replay

10

Page 49: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

CapoOne: First Capo Implementation 11

Page 50: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

CapoOne: First Capo Implementation

Records and replays multithreaded Linux apps running on multiprocessors

11

Page 51: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

CapoOne: First Capo Implementation

Records and replays multithreaded Linux apps running on multiprocessors

11

Page 52: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

CapoOne: First Capo Implementation

Records and replays multithreaded Linux apps running on multiprocessors

11

Page 53: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays multithreaded Linux apps running on multiprocessors

Ubuntu Linux with modified kernel:

11

Page 54: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays multithreaded Linux apps running on multiprocessors

Ubuntu Linux with modified kernel:

Added support for spheres, R-threads

11

Replay Sphere 1

Recording FFT

R-thread1

R-thread2

Replay Sphere 2

Replaying Apache

R-thread1

R-thread2

Page 55: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays multithreaded Linux apps running on multiprocessors

Ubuntu Linux with modified kernel:

Added support for spheres, R-threads

Made some functions more deterministic

11

Replay Sphere 1

Recording FFT

R-thread1

R-thread2

Replay Sphere 2

Replaying Apache

R-thread1

R-thread2

Page 56: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays multithreaded Linux apps running on multiprocessors

Ubuntu Linux with modified kernel:

Added support for spheres, R-threads

Made some functions more deterministic

Split Replay Sphere Manager

11

Replay Sphere 1

Recording FFT

R-thread1

R-thread2

Kernel-Level RSM

User-Level RSMLog

2

Replay Sphere 2

Replaying Apache

R-thread1

R-thread2

Log1

Page 57: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays multithreaded Linux apps running on multiprocessors

Ubuntu Linux with modified kernel:

Added support for spheres, R-threads

Made some functions more deterministic

Split Replay Sphere Manager

Simulated HW-Based replay system:

11

Replay Sphere 1

Recording FFT

R-thread1

R-thread2

Kernel-Level RSM

User-Level RSMLog

2

Replay Sphere 2

Replaying Apache

R-thread1

R-thread2

Log1

Page 58: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

DeLorean HW

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays multithreaded Linux apps running on multiprocessors

Ubuntu Linux with modified kernel:

Added support for spheres, R-threads

Made some functions more deterministic

Split Replay Sphere Manager

Simulated HW-Based replay system:

DeLorean [Montesinos et al. ISCA’08]

11

Replay Sphere 1

Recording FFT

R-thread1

R-thread2

Kernel-Level RSM

User-Level RSMLog

2

Replay Sphere 2

Replaying Apache

R-thread1

R-thread2

Log1

Page 59: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

Page 60: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

P0 P1

Page 61: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

chunk chunk

P0 P1

Page 62: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

Execute chunks atomically

chunk chunk

st X...st Y

ld T...st W

P0 P1 P0 P1

Page 63: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

Execute chunks atomically

chunk chunk

st X...st Y

ld T...st W

P0 P1 P0 P1

Page 64: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

chunk chunk

st X...st Y

ld T...st W

P0 P1 P0 P1

Page 65: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

chunk chunk

st X...st Y

ld T...st W

P0 P1 P0 P1

Page 66: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

chunk chunk

st X...st Y

ld T...st W

P0 P1 P0 P1 P0

Page 67: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

chunk chunk

st X...st Y

ld T...st W

P0 P1 P0 P1 P0 P1

Page 68: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

chunk chunk

st X...st Y

ld T...st W

ld X...ld X

st X...st Y

P0 P1 P0 P1 P0 P1

Page 69: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

chunk chunk

st X...st Y

ld T...st W

ld X...ld X

st X...st Y

P0 P1 P0 P1 P0 P1

Page 70: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

chunk chunk

st X...st Y

ld T...st W

ld X...ld X

st X...st Y

P0 P1 P0 P1 P0 P1

Page 71: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

collisionon Xchunk chunk

st X...st Y

ld T...st W

ld X...ld X

st X...st Y

P0 P1 P0 P1 P0 P1

Page 72: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

collisionon Xchunk chunk

st X...st Y

ld T...st W

st X...st Y

P0 P1 P0 P1 P0 P1

Page 73: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

collisionon Xchunk chunk

st X...st Y

ld T...st W

st X...st Y

ld X...ld X

P0 P1 P0 P1 P0 P1

Page 74: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

collisionon Xchunk chunk

st X...st Y

ld T...st W

st X...st Y

ld X...ld X

P0 P1 P0 P1 P0 P1

Page 75: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

collisionon Xchunk chunk

st X...st Y

ld T...st W

st X...st Y

ld X...ld X

Record chunk commit order

Log

0

1

P0 P1 P0 P1 P0 P1

Page 76: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

collisionon Xchunk chunk

st X...st Y

ld T...st W

st X...st Y

ld X...ld X

Record chunk commit order

Log

0

1

P0 P1 P0 P1 P0 P1

Page 77: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

collisionon Xchunk chunk

st X...st Y

ld T...st W

st X...st Y

ld X...ld X

Record chunk commit order

Log

0

1

P0 P1 P0 P1 P0 P1

Page 78: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay

HW records chunk commit order in Processor Interleaving Log

12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

collisionon Xchunk chunk

st X...st Y

ld T...st W

st X...st Y

ld X...ld X

Record chunk commit order

Log

0

1

P0 P1 P0 P1 P0 P1

Page 79: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay

HW records chunk commit order in Processor Interleaving Log

Also records size of some irregular chunks in Chunk Size Log

12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

collisionon Xchunk chunk

st X...st Y

ld T...st W

st X...st Y

ld X...ld X

Record chunk commit order

Log

0

1

P0 P1 P0 P1 P0 P1

Page 80: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DeLorean: Chunk-Based Record/Replay

HW records chunk commit order in Processor Interleaving Log

Also records size of some irregular chunks in Chunk Size Log

During replay: generate same chunks and commit them in same order

12

st X...st Y

ld T...st W

st X...st Y

ld T...st W

HW groups consecutive dynamic instructions

commit

commit

Execute chunks atomically

Execute chunks in isolation

collisionon Xchunk chunk

st X...st Y

ld T...st W

st X...st Y

ld X...ld X

Record chunk commit order

Log

0

1

P0 P1 P0 P1 P0 P1

Page 81: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

13

Page 82: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

From Full-System Replay to Sphere-Based Replay14

Page 83: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

From Full-System Replay to Sphere-Based Replay

Only log non-deterministic events that affect a sphere

14

Page 84: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

From Full-System Replay to Sphere-Based Replay

Only log non-deterministic events that affect a sphere

Log entries record R-thread IDs, not processor IDs

14

Page 85: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

From Full-System Replay to Sphere-Based Replay

Only log non-deterministic events that affect a sphere

Log entries record R-thread IDs, not processor IDs

Information about other non-deterministic events is discarded

14

Page 86: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

From Full-System Replay to Sphere-Based Replay

Only log non-deterministic events that affect a sphere

Log entries record R-thread IDs, not processor IDs

Information about other non-deterministic events is discarded

Memory Interleaving Log must only include interleaving of instructions from R-threads within same sphere

14

Page 87: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

From Full-System Replay to Sphere-Based Replay

Only log non-deterministic events that affect a sphere

Log entries record R-thread IDs, not processor IDs

Information about other non-deterministic events is discarded

Memory Interleaving Log must only include interleaving of instructions from R-threads within same sphere

Changed DeLorean’s chunk truncation rules to enforce isolation

14

Page 88: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

From Full-System Replay to Sphere-Based Replay

Only log non-deterministic events that affect a sphere

Log entries record R-thread IDs, not processor IDs

Information about other non-deterministic events is discarded

Memory Interleaving Log must only include interleaving of instructions from R-threads within same sphere

Changed DeLorean’s chunk truncation rules to enforce isolation

Example: System calls cause chunk truncation in CapoOne, not in DeLorean

14

Page 89: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

Page 90: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

ProcessorInterleaving

Log

P1

Processor P1

Page 91: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

500501

inst m. . .

syscall

ProcessorInterleaving

Log

P1

Processor P1

Page 92: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

500501

inst m. . .

syscall

ProcessorInterleaving

Log

P1

Processor P1

Page 93: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

OSSyscallHandler

500501

inst m. . .

syscall

ProcessorInterleaving

Log

P1

Processor P1

Page 94: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

OSSyscallHandler

500501

inst m. . .

999

syscall

ProcessorInterleaving

Log

P1

Processor P1

Page 95: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

OSSyscallHandler

500501

inst m. . .

999

syscall

ProcessorInterleaving

Log

P1

Processor P1

Page 96: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

OSSyscallHandler

500501

inst m. . .

999

syscall

CapoOne

ProcessorInterleaving

Log

P1

Processor P1

R-threadInterleaving

Log

R1

R-Thread R1

Page 97: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

OSSyscallHandler

500501

inst m. . .

999

syscall

CapoOne

500501

inst m. . .

syscall

ProcessorInterleaving

Log

P1

Processor P1

R-threadInterleaving

Log

R1

R-Thread R1

Page 98: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

OSSyscallHandler

500501

inst m. . .

999

syscall

CapoOne

500501

inst m. . .

syscall

ProcessorInterleaving

Log

P1

Processor P1

R-threadInterleaving

Log

R1

R-Thread R1

Page 99: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

OSSyscallHandler

500501

inst m. . .

999

syscall

CapoOne

500501

inst m. . .

syscall

ProcessorInterleaving

Log

P1

Processor P1

R-threadInterleaving

Log

R1

R-Thread R1

Page 100: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation 15

DeLorean

OSSyscallHandler

500501

inst m. . .

999

syscall

CapoOne

OSSysscallHandler

500501

inst m. . .

syscall

ProcessorInterleaving

Log

P1

Processor P1

R-threadInterleaving

Log

R1

R-Thread R1

Page 101: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation

Inform HW to stop logging interleaving of instructions from current proc

Always do it when execution leaves replay sphere

Otherwise, OS instructions might become part of interleaving log

15

DeLorean

OSSyscallHandler

500501

inst m. . .

999

syscall

CapoOne

OSSysscallHandler

500501

inst m. . .

syscall

ProcessorInterleaving

Log

P1

Processor P1

R-threadInterleaving

Log

R1

R-Thread R1

Page 102: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation

Inform HW to stop logging interleaving of instructions from current proc

Always do it when execution leaves replay sphere

Otherwise, OS instructions might become part of interleaving log

16

DeLorean

OSsyscallhandler

500501

inst m. . .

999

syscall

CapoOne

OSsyscallhandler

500501

inst m. . .

syscall

ProcessorInterleaving

Log

P1

P1

R-threadInterleaving

Log

R-Thread N

P1

Page 103: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

New Chunking Rules Provide R-Thread Isolation

Inform HW to stop logging interleaving of instructions from current proc

Always do it when execution leaves replay sphere

Otherwise, OS instructions might become part of interleaving log

16

DeLorean

OSsyscallhandler

500501

inst m. . .

999

syscall

CapoOne

OSsyscallhandler

500501

inst m. . .

syscall

ProcessorInterleaving

Log

P1

P1

R-threadInterleaving

Log

R-Thread N

P1

RSM and HW must work together to avoid any OS instruction to pollute the Memory Interleaving

Log

Page 104: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Interrupts17

Page 105: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Interrupts

Ensure interrupt handler code is not part of Memory Interleaving Log

17

Page 106: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Interrupts

Ensure interrupt handler code is not part of Memory Interleaving Log

Balance conflicting demands because of chunk-based execution:

17

Page 107: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Interrupts

Ensure interrupt handler code is not part of Memory Interleaving Log

Balance conflicting demands because of chunk-based execution:

17

Size of Memory Interleaving Log

Page 108: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Interrupts

Ensure interrupt handler code is not part of Memory Interleaving Log

Balance conflicting demands because of chunk-based execution:

17

Size of Memory Interleaving Log

Interrupt Latency

Page 109: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Interrupts

Ensure interrupt handler code is not part of Memory Interleaving Log

Balance conflicting demands because of chunk-based execution:

17

Size of Memory Interleaving Log

Interrupt Latency

Wasted Work

Page 110: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Interrupts: Three Approaches18

Page 111: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Finish First

Handling Interrupts: Three Approaches18

Page 112: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

Page 113: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

Page 114: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

OriginalExecution

R-thread R1

inst m

. . .

Chunk SizeLog

Chunk SizeLog

Page 115: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

OriginalExecution

R-thread R1

inst m

. . .

Chunk SizeLog

Chunk SizeLog

Page 116: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

OriginalExecution

R-thread R1

inst m

. . .

. . .

Chunk SizeLog

Chunk SizeLog

999

0

Page 117: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

OriginalExecution

R-thread R1

inst m

. . .

. . .

Chunk SizeLog

Chunk SizeLog

999

0

Page 118: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

OriginalExecution

OSFault

Handler

R-thread R1

inst m

. . .

. . .

Chunk SizeLog

Chunk SizeLog

999

0

Page 119: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

OriginalExecution

OSFault

Handler

R-thread R1

inst m

. . .

. . .

Chunk SizeLog

Chunk SizeLog

. . .

999

0

Page 120: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

OriginalExecution

OSFault

Handler

R-thread R1

inst m

. . .

. . .

Chunk SizeLog

Chunk SizeLog

. . .

999

0

Page 121: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

OriginalExecution

OSFault

Handler

R-thread R1

inst m

. . .

. . .

Chunk SizeLog

Chunk SizeLog

. . .

999

0

Page 122: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Finish First

Handling Interrupts: Three Approaches18

OriginalExecution

OSFault

Handler

R-thread R1

inst m

. . .

. . .

Chunk SizeLog

Chunk SizeLog

. . .

999

0

Page 123: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

Finish First

Page 124: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

Finish First

Page 125: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

inst m

. . .Finish First

Page 126: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .0Finish First

Page 127: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .0Finish First

Page 128: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .

ChunkID

0Finish First

Page 129: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .

ChunkSize

0Finish First

Page 130: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .0Finish First

Page 131: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

OSInt

Handler

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .0Finish First

Page 132: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

OSInt

Handler

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .

999

0

. . .

0Finish First

Page 133: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

OSInt

Handler

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .

999

0

. . .

0Finish First

Page 134: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

OSInt

Handler

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .

999

0

. . .

0Finish First

Page 135: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

OSInt

Handler

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .

999

0

. . .

0Finish First

Page 136: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Commit Now

Handling Interrupts: Three Approaches19

OriginalExecution

OSInt

Handler

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

500inst m

. . .

999

0

. . .

0Finish First

Page 137: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

Commit Now

Finish First

Page 138: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

Commit Now

Finish First

Page 139: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .0

500

Commit Now

Finish First

Page 140: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .0

500

Commit Now

Finish First

Page 141: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .

Commit Now

Finish First

Page 142: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .OSInt

Handler

Commit Now

Finish First

Page 143: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .OSInt

Handler

999

inst m

0Commit Now

Finish First

Page 144: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .OSInt

Handler

999

inst m

0Commit Now

Finish First

Page 145: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .OSInt

Handler

999

inst m

0Commit Now

Finish First

Page 146: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .OSInt

Handler

999

inst m

0Commit Now

Finish First

Page 147: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches20

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .OSInt

Handler

999

inst m

0Commit Now

Finish First

Page 148: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches21

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .OSInt

Handler

999

inst m

0

0

500

Commit Now

Finish First

Page 149: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Log SizeWasted Work

Interrupt Latency

Squash Now

Handling Interrupts: Three Approaches21

OriginalExecution

R-thread R1

Chunk SizeLog

Chunk SizeLog

inst m

. . .OSInt

Handler

999

inst m

0

0

500

Commit Now

Finish First Highly non-deterministic events, such as interrupts, can be treated as deterministic events

CapoOne uses SquashNow: easy to implement and little overhead

Page 150: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults22

inst n

inst z

Page 151: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

22

inst n

inst z

Page 152: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

22

OriginalExecution

inst n

inst z

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

Page 153: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

22

OriginalExecution

inst n

inst n

inst z

R-thread R1

500501

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

Page 154: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

22

OriginalExecution

inst n

inst n

inst z

R-thread R1

500501

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

Page 155: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

22

OriginalExecution

inst n

inst n

inst z

R-thread R1

500501

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

Page 156: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

22

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

Page 157: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

22

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

Page 158: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

23

inst n

inst z

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

ReplayCase II

ReplayCase III

Page 159: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

23

inst n

inst z

R-thread R1

500 inst m. . .

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

ReplayCase II

ReplayCase III

Page 160: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

23

inst n

inst z

R-thread R1

500 inst m. . .

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

ReplayCase II

ReplayCase III

Page 161: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

23

inst n

inst n

inst z

R-thread R1

500501

inst m. . .

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

ReplayCase II

ReplayCase III

Page 162: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

23

inst n

inst n

inst z

R-thread R1

500501

inst m. . .

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

ReplayCase II

ReplayCase III

Page 163: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

23

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

inst m. . .

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

ReplayCase II

ReplayCase III

Page 164: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

23

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

999

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

ReplayCase II

ReplayCase III

Page 165: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

24

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

inst n

inst z

ReplayCase I

ReplayCase II

ReplayCase III

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

Page 166: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

24

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

inst n

inst z

R-thread R1

ReplayCase I

ReplayCase II

ReplayCase III

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

Page 167: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

24

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

inst n

inst z

R-thread R1

500 inst m

ReplayCase I

ReplayCase II

ReplayCase III

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

Page 168: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

24

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

inst n

inst z

R-thread R1

500 inst m. . .

ReplayCase I

ReplayCase II

ReplayCase III

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

Page 169: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

24

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase I

ReplayCase II

ReplayCase III

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

Page 170: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

25

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

inst rinst z

Page 171: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

25

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

R-thread R1

500 inst m. . .

inst rinst z

Page 172: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

25

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

R-thread R1

500 inst m. . .

inst rinst z

Page 173: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

25

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

R-thread R1

500 inst m. . .

inst r799800

inst q

inst n

inst rinst z

0

Page 174: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

25

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

R-thread R1

500 inst m. . .

inst r799800

inst q

inst n

inst rinst z

0

Page 175: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

25

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

R-thread R1

500 inst m. . .

inst r799800

inst q

inst n

inst rinst z

0

Page 176: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

25

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

R-thread R1

500 inst m. . .

inst r799800

inst q

inst n

OSFault

Handler

inst rinst z

0

Page 177: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

25

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

R-thread R1

500 inst m. . .

inst r799800

inst q

inst n

OSFault

Handler

inst rinst z

0

199

0

Page 178: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

25

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

R-thread R1

500 inst m. . .

inst r799800

inst q

inst n

OSFault

Handler

inst rinst z

0

199

0

No otherR-thread

can commit

Page 179: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

26

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

R-thread R1

500 inst m. . .

inst r799800

inst q

inst n

OSFault

Handler

inst rinst z

0

199

0

No otherR-thread

can commit

Page 180: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Faults

Commit all instructions up to faulting one and log chunk size

Handling faults during replay can be tricky

26

OriginalExecution

inst n

OSFault

Handler

inst n

inst z

R-thread R1

500501

0

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

ReplayCase I

inst n

OSFault

Handler

inst n

inst z

R-thread R1

5000

0

inst m. . .

999

ReplayCase II

inst n

inst z

R-thread R1

500

0

inst m. . .

999

ReplayCase III

R-thread R1

500 inst m. . .

inst r799800

inst q

inst n

OSFault

Handler

inst rinst z

0

199

0

No otherR-thread

can commit

Faults are synchronous events, but they are not necessarily deterministic

A fault can occur during replay but not during recording, or viceversa

Page 181: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Traps and Programmed Exceptions27

Page 182: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Traps and Programmed Exceptions

Commit all instructions including the one raising the trap

27

Page 183: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Traps and Programmed Exceptions

Commit all instructions including the one raising the trap

No need to record the size of irregular chunk

27

R-thread R1 Chunk SizeLog

Page 184: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Traps and Programmed Exceptions

Commit all instructions including the one raising the trap

No need to record the size of irregular chunk

27

500501

inst m. . .

syscall

R-thread R1 Chunk SizeLog

Page 185: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Traps and Programmed Exceptions

Commit all instructions including the one raising the trap

No need to record the size of irregular chunk

27

500501

inst m. . .

syscall

R-thread R1 Chunk SizeLog

Page 186: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Traps and Programmed Exceptions

Commit all instructions including the one raising the trap

No need to record the size of irregular chunk

27

500501

inst m. . .

syscall

R-thread R1 Chunk SizeLog

Page 187: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Traps and Programmed Exceptions

Commit all instructions including the one raising the trap

No need to record the size of irregular chunk

27

OSSyscallHandler

500501

inst m. . .

syscall

R-thread R1 Chunk SizeLog

Page 188: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Traps and Programmed Exceptions

Commit all instructions including the one raising the trap

No need to record the size of irregular chunk

28

OSSyscallHandler

500501

inst m. . .

syscall

R-thread R1 Chunk SizeLog

Page 189: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Handling Traps and Programmed Exceptions

Commit all instructions including the one raising the trap

No need to record the size of irregular chunk

28

OSSyscallHandler

500501

inst m. . .

syscall

R-thread R1 Chunk SizeLogTraps and programmed exceptions are

deterministic events: no need to record irregular-sized chunks

Page 190: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres29

OS

Replay Sphere 1 - Recording

Replay Sphere ManagerLog 1Log 1

Page 191: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere ManagerLog 1Log 1

buf

Page 192: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

Log 1Log 1

buf

Page 193: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

read(&buf)

Log 1Log 1

buf

Page 194: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

read(&buf)

Log 1Log 1

buf

Page 195: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

read(&buf)

Log 1Log 1

buf

Page 196: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

read(&buf)

Log 1Log 1

buf

Page 197: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

read(&buf)

Log 1Log 1

buf

Page 198: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

H

I

!

\0read(&buf)

Log 1Log 1

buf

Page 199: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

H

I

!

\0read(&buf)

Log 1Log 1

buf

Page 200: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres

Problem: interleaving between OS copies and R-threads not recorded

29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

H

I

!

\0

X = buf[2]buf[3] = Y

read(&buf)

Log 1Log 1

buf

Page 201: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres

Problem: interleaving between OS copies and R-threads not recorded

29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

H

I

!

\0

X = buf[2]buf[3] = Y

read(&buf)

Log 1Log 1

buf

Page 202: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres

Problem: interleaving between OS copies and R-threads not recorded

29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

H

I

!

\0

X = buf[2]buf[3] = Y

read(&buf)

Log 1Log 1

buf

Page 203: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres

Problem: interleaving between OS copies and R-threads not recorded

Solution: insert copy_to_user into sphere:

29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

H

I

!

\0

X = buf[2]buf[3] = Y

read(&buf)

Log 1Log 1

buf

Page 204: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres

Problem: interleaving between OS copies and R-threads not recorded

Solution: insert copy_to_user into sphere:

HW can log memory access interleaving

29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

H

I

!

\0

X = buf[2]buf[3] = Y

read(&buf)

Log 1Log 1

buf

Page 205: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres

Problem: interleaving between OS copies and R-threads not recorded

Solution: insert copy_to_user into sphere:

HW can log memory access interleaving

copy_to_user exits sphere once copy is over

29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

H

I

!

\0

X = buf[2]buf[3] = Y

read(&buf)

Log 1Log 1

buf

Page 206: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres

Problem: interleaving between OS copies and R-threads not recorded

Solution: insert copy_to_user into sphere:

HW can log memory access interleaving

copy_to_user exits sphere once copy is over

29

OS

Replay Sphere 1 - Recording

B

Y

E

\0

Replay Sphere Manager

R-thread R1 R-thread R2

copy_to_user

H

I

!

\0

X = buf[2]buf[3] = Y

read(&buf)

Log 1Log 1

buf

Page 207: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

Page 208: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

R-thread A R-thread B R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit

Page 209: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

R-thread A R-thread B R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exitread( )

Page 210: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

R-thread A R-thread B R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exitread( )

Page 211: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

R-thread A R-thread B R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit

RSM

read( )

Page 212: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

R-thread A R-thread B R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit

RSM

read( )

copy_to_user

Page 213: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

R-thread A R-thread B R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit

RSM

read( )

copy_to_user

Page 214: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

R-thread A R-thread B R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit

RSM

read( )

copy_to_user

Page 215: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

R-thread A R-thread B R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit

RSM

read( )

copy_to_user

Page 216: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

R-thread A R-thread B R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit

RSM

RSM

inject before returningread( )

copy_to_user

Page 217: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

30

R-thread A R-thread B R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit

RSM

RSM

inject before returningread( )

copy_to_user

Page 218: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B

RSM

RSM

copy_to_user

read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

Page 219: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

Page 220: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

Page 221: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

A

Page 222: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

A

Page 223: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

A A read_enter

Page 224: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

A A read_enter

Page 225: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

A A read_enter

A read_exit inject before returning

Page 226: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

copy_to_user

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

A A read_enter

A read_exit inject before returning

Page 227: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

copy_to_user

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

A

A

A read_enter

A read_exit inject before returning

Page 228: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

copy_to_user

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

A

A

B

A read_enter

A read_exit inject before returning

Page 229: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

copy_to_user

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

A

A

B

A read_enter

A read_exit inject before returning

Page 230: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

31

R-thread A R-thread B R-thread A R-thread B

RSM

RSM

copy_to_user

read( ) read( )

copy_to_user

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

A read_exit inject before returning

A

A

B

A read_enter

A read_exit inject before returning

Page 231: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

32

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

Page 232: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

32

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

Page 233: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

33

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

Page 234: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

33

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

R-thread A R-thread BR-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

Page 235: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

33

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

R-thread A R-thread B

read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

Page 236: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

33

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

R-thread A R-thread B

read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

A

Page 237: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

33

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

RSM

R-thread A R-thread B

read( )

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

A A read_enter

Page 238: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

33

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

RSM

R-thread A R-thread B

read( )

write()

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

A A read_enter

Page 239: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

33

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

RSM

R-thread A R-thread B

read( )

write()

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

A A read_enter

A B write_enter

Page 240: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

34

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

RSM

R-thread A R-thread B

read( )

write()

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

A A read_enter

A B write_enter

Page 241: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

RSM

Injecting Data into Spheres (II)

Look for interactions between R-thread Interleaving Log and Input Log

34

R-thread A R-thread B

RSM

RSM

read( )

copy_to_user

write( )

RSM

R-thread A R-thread B

read( )

write()

R-threadInterleaving

Log

A

A

B

InputLogInputLog

A read_enter

B write_enter

A read_exit inject before returning

A A read_enter

A B write_enter

Circular dependences between Memory Interleaving Log and Input Log cause deadlocks

Page 242: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

CapoOne keeps speculative data in cache until commit

A chunk may access more lines mapping to a cache set than ways the set has

BulkSC-based system do not allow storing speculative state in memory

When a cache would overflow, CapoOne must commit current chunk

Non-deterministic event: must log chunk size

35

Page 243: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows36

inst n

inst zinst r

inst z

Page 244: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows36

OriginalExecution

inst n

inst z

R-thread R1

Chunk SizeLog

Chunk SizeLog

7 500

inst r

inst z

Page 245: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows36

OriginalExecution

inst n

inst z

R-thread R1

. . .

Chunk SizeLog

Chunk SizeLog

7 500

inst r

inst z

Page 246: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows36

OriginalExecution

inst n

inst z

R-thread R1

. . .

Chunk SizeLog

Chunk SizeLog

7 500

inst t

inst n

inst m

ROB

Head

inst r

inst z

Page 247: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows36

OriginalExecution

inst n

inst z

R-thread R1

. . .

Chunk SizeLog

Chunk SizeLog

7 500

inst t

inst n

inst m

ROB

Head inst r

inst z

Page 248: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows36

OriginalExecution

inst n

inst z

R-thread R1

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

inst t

inst n

inst m

ROB

Head inst r

inst z

Page 249: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows36

OriginalExecution

inst n

inst z

R-thread R1

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

inst t

inst n

inst m

ROB

Head inst r

inst z

Page 250: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

36

OriginalExecution

inst n

inst z

R-thread R1

inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

inst t

inst n

inst m

ROB

Head

inst toverflow

inst r

inst z

Page 251: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

36

OriginalExecution

inst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

inst t

inst n

inst m

ROB

Head

inst toverflow

inst r

inst z

Page 252: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

36

OriginalExecution

inst ninst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

inst t

inst n

inst m

ROB

Head

inst toverflow

inst r

inst z

Page 253: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

Can happen during initial execution and/or during replay

36

OriginalExecution

inst ninst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

inst t

inst n

inst m

ROB

Head

inst toverflow

inst r

inst z

Page 254: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

Can happen during initial execution and/or during replay

36

OriginalExecution

inst ninst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

inst t

inst n

inst m

ROB

Head

inst toverflow

R-thread R1

500 inst m. . .

inst r

inst z

Replay

Page 255: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

Can happen during initial execution and/or during replay

36

OriginalExecution

inst ninst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

inst t

inst n

inst m

ROB

Head

inst toverflow

R-thread R1

500 inst m. . .

inst r

inst z

Replay

Page 256: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

Can happen during initial execution and/or during replay

36

OriginalExecution

inst ninst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

inst t

inst n

inst m

ROB

Head

inst toverflow

R-thread R1

500 inst m. . .

inst n

inst r

inst z

0

Replay

Page 257: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

Can happen during initial execution and/or during replay

36

OriginalExecution

inst ninst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

inst t

inst n

inst m

ROB

Head

inst toverflow

R-thread R1

500 inst m. . .

400

inst n

inst r

inst z

0

Replay

overflow

Page 258: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

Can happen during initial execution and/or during replay

36

OriginalExecution

inst ninst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

inst t

inst n

inst m

ROB

Head

inst toverflow

R-thread R1

500 inst m. . .

400

inst n

inst r

inst z

0

Replay

overflow

Page 259: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

Can happen during initial execution and/or during replay

36

OriginalExecution

inst ninst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

inst t

inst n

inst m

ROB

Head

inst toverflow

R-thread R1

500 inst m. . .

400

inst n

inst r

inst z

0

199

0

Replay

overflow

Page 260: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

Can happen during initial execution and/or during replay

36

OriginalExecution

inst ninst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

inst t

inst n

inst m

ROB

Head

inst toverflow

R-thread R1

500 inst m. . .

400

inst n

inst r

inst z

0

199

0

No otherR-thread

can commit

Replay

overflow

Page 261: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Cache Overflows

The instruction causing the overflow might not be at the head of ROB

Can happen during initial execution and/or during replay

37

OriginalExecution

inst ninst n

inst z

R-thread R1

500 inst m. . .

Chunk SizeLog

Chunk SizeLog

7 500

999

inst t

inst n

inst m

ROB

Head

inst toverflow

R-thread R1

500 inst m. . .

400

inst n

inst r

inst z

0

199

0

No otherR-thread

can commit

Replay

overflow

The instruction that caused cache overflow might not be the first instruction of next chunk

HW must ensure that chunk boundaries are consistent

Page 262: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Lessons Learned During the Development of the CapoOne Deterministic Multiprocessor Replay System

Department of Computer ScienceUniversity of Illinois at Urbana-Champaign

Pablo Montesinos, Matthew Hicks, Wonsun Ahn, Samuel T. King and Josep Torrellas

Page 263: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Overall DeLorean System

Proc 0

PI Log

CS Log

Chunk A Arbiter

Proc 1

CS Log

Chunk B

39

Page 264: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Overall DeLorean System

Proc 0

PI Log

CS Log

Chunk A Arbiter

Interrupt Log

Proc 1

CS Log

Chunk B

Interrupt Log

39

Page 265: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Overall DeLorean System

Proc 0

PI Log

CS Log

Chunk A Arbiter

Interrupt Log

I/O Log

Proc 1

CS Log

Chunk B

Interrupt Log

I/O Log

39

Page 266: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Network

Overall DeLorean System

Proc 0

PI Log

CS Log

Chunk A Arbiter

Interrupt Log

I/O Log

Proc 1

CS Log

Chunk B

Interrupt Log

I/O Log

39

Page 267: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DMA

DMA Log

Network

Overall DeLorean System

Proc 0

PI Log

CS Log

Chunk A Arbiter

Interrupt Log

I/O Log

Proc 1

CS Log

Chunk B

Interrupt Log

I/O Log

39

Page 268: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

DMA

DMA Log

Network

Overall DeLorean System

Proc 0

PI Log

CS Log

Chunk A Arbiter

Interrupt Log

I/O Log

Proc 1

CS Log

Chunk B

Interrupt Log

I/O Log

39

Interrupt, I/O and DMA logs are common to other HW-based schemes

Page 269: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

CapoOne: HW Implementation40

Page 270: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

CapoOne: HW Implementation40

DMA

NetworkProc 0

PI Log

CS Log

Chunk A Arbiter

Proc 1

CS Log

Chunk B

DMA Log

Interrupt Log

I/O Log

Interrupt Log

I/O Log

Page 271: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

CapoOne: HW Implementation

No need for DeLorean’s Interrupt Log, DMA Log nor I/O Log

40

DMA

NetworkProc 0

PI Log

CS Log

Chunk A Arbiter

Proc 1

CS Log

Chunk B

Page 272: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

CapoOne: HW Implementation

No need for DeLorean’s Interrupt Log, DMA Log nor I/O Log

PI Log becomes the per-sphere Interleaving Log

40

DMA

NetworkProc 0

PI Log

CS Log

Chunk A Arbiter

Proc 1

CS Log

Chunk B

Interleaving Log

Page 273: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

CapoOne: HW Implementation

No need for DeLorean’s Interrupt Log, DMA Log nor I/O Log

PI Log becomes the per-sphere Interleaving Log

CS Log becomes a per-R-thread Log

40

DMA

NetworkProc 0

PI Log

CS Log

Chunk A Arbiter

Proc 1

CS Log

Chunk B

Interleaving Log

Page 274: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

CapoOne: HW Implementation

No need for DeLorean’s Interrupt Log, DMA Log nor I/O Log

PI Log becomes the per-sphere Interleaving Log

CS Log becomes a per-R-thread Log

Chunks only have instructions from one application (or the kernel)

40

DMA

NetworkProc 0

PI Log

CS Log

Chunk A Arbiter

Proc 1

CS Log

Chunk B

Interleaving Log

Page 275: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Emulating vs Re-Executing System Calls41

Page 276: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

41

Page 277: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

41

R-thread1

R-thread2

OS

RSM

Page 278: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

41

R-thread1

R-thread2

read()

OS

RSM

Page 279: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

41

R-thread1

R-thread2

read()

OS

RSM

Page 280: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

41

R-thread1

R-thread2

read()Log 1

OS

RSM

Page 281: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

Some have to be re-executed

41

R-thread1

R-thread2

read()Log 1

OS

RSM

Page 282: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

Some have to be re-executed

41

R-thread1

R-thread2

read()Log 1 fork()

OS

RSM

Page 283: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

Some have to be re-executed

41

R-thread1

R-thread2

read()Log 1 fork()

OS

RSM

sys_fork()

Page 284: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

Some have to be re-executed

41

R-thread1

R-thread2

read()Log 1 fork()

OS

RSM

sys_fork()

thread674

Page 285: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

Some have to be re-executed

41

R-thread1

R-thread2

read()Log 1 fork()

OS

RSM

sys_fork()

thread674

Page 286: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

Some have to be re-executed

41

R-thread1

R-thread2

read()Log 1 fork()

OS

RSM

sys_fork()

thread674

R-thread3

Page 287: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

Some have to be re-executed

41

R-thread1

R-thread2

read()Log 1 fork()

OS

RSM

sys_fork()

thread674

R-thread3

Page 288: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

Some have to be re-executed

Thread management (clone)

41

R-thread1

R-thread2

read()Log 1 fork()

OS

RSM

sys_fork()

thread674

R-thread3

Page 289: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

Some have to be re-executed

Thread management (clone)

Address space modification (mprotect)

41

R-thread1

R-thread2

read()Log 1 fork()

OS

RSM

sys_fork()

thread674

R-thread3

Page 290: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

Replaying

Replay Sphere 1

Replaying

Emulating vs Re-Executing System Calls

During replay, the RSM emulates most system calls:

RSM injects return values from Sphere Input Log, squashes outputs

Some have to be re-executed

Thread management (clone)

Address space modification (mprotect)

41

R-thread1

R-thread2

read()Log 1 fork()

OS

RSM

sys_fork()

thread674

Page 291: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Implicit Dependencies42

Page 292: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Implicit Dependencies

R-thread changes mapping or protection of address space, and another R-thread uses this changed address space

42

Page 293: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Implicit Dependencies

R-thread changes mapping or protection of address space, and another R-thread uses this changed address space

42

Page Table

Sphere 1

R-thread 1 R-thread 2

CPU 1 CPU 2

Page 294: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Implicit Dependencies

R-thread changes mapping or protection of address space, and another R-thread uses this changed address space

42

Page Table

Sphere 1

R-thread 1

mprotect X

R-thread 2

while(1){ *x = *x+1}

CPU 1 CPU 2

Page 295: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Implicit Dependencies

R-thread changes mapping or protection of address space, and another R-thread uses this changed address space

42

Page Table

Sphere 1

R-thread 1

mprotect X

R-thread 2

while(1){ *x = *x+1}

CPU 1 CPU 2

Page 296: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Implicit Dependencies

R-thread changes mapping or protection of address space, and another R-thread uses this changed address space

42

Page Table

Sphere 1

R-thread 1

mprotect X

R-thread 2

while(1){ *x = *x+1}

CPU 1 CPU 2

Page 297: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Implicit Dependencies

R-thread changes mapping or protection of address space, and another R-thread uses this changed address space

RSM can express these dependencies to hardware so these interactions can be recorded

42

Page Table

Sphere 1

R-thread 1

mprotect X

R-thread 2

while(1){ *x = *x+1}

CPU 1 CPU 2

Page 298: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere43

Page 299: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere43

OS

CPU1

CPU2

CPU3

CPU4

Replay HW

Page 300: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere43

OS

Thread103

Thread128

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

Page 301: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere43

OS

Thread103

Thread128

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

CPU2

Page 302: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere43

OS

Thread103

Thread128

Thread26

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

CPU2

CPU4

Page 303: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Set of threads recorded and replayed as a unit and their address space Replay

Sphere 2

Replaying

Replay Sphere43

Replay Sphere 1

Recording

OS

Thread103

Thread128

Thread26

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

CPU2

CPU4

Page 304: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Set of threads recorded and replayed as a unit and their address space

Only user-mode threads run inside spheres

Replay Sphere 2

Replaying

Replay Sphere43

Replay Sphere 1

Recording

OS

Thread103

Thread128

Thread26

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

CPU2

CPU4

Page 305: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Set of threads recorded and replayed as a unit and their address space

Only user-mode threads run inside spheres

Threads inside a sphere: R-threads

Replay Sphere 2

Replaying

Replay Sphere43

Replay Sphere 1

Recording

OS

Thread103

Thread128

Thread26

R-thread1

R-thread2

R-thread 1

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

CPU2

CPU4

Page 306: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Set of threads recorded and replayed as a unit and their address space

Only user-mode threads run inside spheres

Threads inside a sphere: R-threads

R-threads that share memory run within same sphere

Replay Sphere 2

Replaying

Replay Sphere43

Replay Sphere 1

Recording

OS

Thread103

Thread128

Thread26

R-thread1

R-thread2

R-thread 1

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

CPU1

CPU3

CPU2

CPU4

Page 307: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Set of threads recorded and replayed as a unit and their address space

Only user-mode threads run inside spheres

Threads inside a sphere: R-threads

R-threads that share memory run within same sphere

Replay Sphere 2

Replaying

Replay Sphere43

Replay Sphere 1

Recording

OS

Thread103

Thread128

Thread26

R-thread1

R-thread2

R-thread 1

Thread39

CPU1

CPU2

CPU3

CPU4

Replay HW

Replay Sphere Manager

CPU1

CPU3

CPU2

CPU4

Page 308: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Self-Modifying Code

Handling self-modifying code in chunk-based systems is laborious:

HW adds instruction fetches to read set

Instruction fetches are checked against local write set

In CapoOne, when a processor detects it has modified code

However,

44

Page 309: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

CapoOne: First Capo Implementation 45

Page 310: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

CapoOne: First Capo Implementation

Records and replays parallel Linux apps

45

Page 311: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

CapoOne: First Capo Implementation

Records and replays parallel Linux apps

45

Page 312: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

CapoOne: First Capo Implementation

Records and replays parallel Linux apps

45

Page 313: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

DeLorean HW

CapoOne: First Capo Implementation

Records and replays parallel Linux apps

Simulated HW-Based replay system:

DeLorean [Montesinos et al. ISCA’08]

45

Page 314: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

DeLorean HW

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays parallel Linux apps

Simulated HW-Based replay system:

DeLorean [Montesinos et al. ISCA’08]

45

Page 315: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

DeLorean HW

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays parallel Linux apps

Simulated HW-Based replay system:

DeLorean [Montesinos et al. ISCA’08]

Ubuntu Linux with modified kernel:

45

Page 316: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

DeLorean HW

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays parallel Linux apps

Simulated HW-Based replay system:

DeLorean [Montesinos et al. ISCA’08]

Ubuntu Linux with modified kernel:

Added support for spheres, R-threads

45

Replay Sphere 1

Recording FFT

R-thread1

R-thread2

Replay Sphere 2

Replaying Apache

R-thread1

R-thread2

Page 317: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

DeLorean HW

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays parallel Linux apps

Simulated HW-Based replay system:

DeLorean [Montesinos et al. ISCA’08]

Ubuntu Linux with modified kernel:

Added support for spheres, R-threads

Made some functions more deterministic

45

Replay Sphere 1

Recording FFT

R-thread1

R-thread2

Replay Sphere 2

Replaying Apache

R-thread1

R-thread2

Page 318: Lessons Learned During the Development of the CapoOne ...wahn/papers/PRES/present_wiosca09.pdfCapo (ASPLOS 09) SW-HW interface for HW-Assisted deterministic replay Integrates HW-Based

Pablo Montesinos Lessons Learned during the CapoOne Development

Replay Sphere 1

FFT

Thread1863

Thread1864

Replay Sphere 1

Apache

Thread8765

Thread8777

DeLorean HW

Ubuntu Linux

CapoOne: First Capo Implementation

Records and replays parallel Linux apps

Simulated HW-Based replay system:

DeLorean [Montesinos et al. ISCA’08]

Ubuntu Linux with modified kernel:

Added support for spheres, R-threads

Made some functions more deterministic

Split Replay Sphere Manager

45

Replay Sphere 1

Recording FFT

R-thread1

R-thread2

Kernel-Level RSM

User-Level RSMLog

2

Replay Sphere 2

Replaying Apache

R-thread1

R-thread2

Log1