Programming-Model Centric Debugging for Multicore Embedded Systems - - PowerPoint PPT Presentation

programming model centric debugging for multicore
SMART_READER_LITE
LIVE PREVIEW

Programming-Model Centric Debugging for Multicore Embedded Systems - - PowerPoint PPT Presentation

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y STMicroelectronics LIG University of Grenoble Programming-Model Centric Debugging for Multicore Embedded Systems Kevin Pouget Under the


slide-1
SLIDE 1

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

STMicroelectronics LIG University of Grenoble

Programming-Model Centric Debugging for Multicore Embedded Systems

Kevin Pouget

Under the supervision of: ++Dr. Miguel Santana, STMicroelectronics ++Prof. Jean-Fran¸ cois M´ ehaut, CEA/UJF

Thesis Defense, Grenoble — February 3rd , 2014

slide-2
SLIDE 2

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Introduction

Embedded Systems and MPSoC

Embedded Systems (IEEE ’92)

A computer system that is part of a larger system and performs some of the requirements of that system.

Slide 2 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-3
SLIDE 3

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Introduction

Embedded Systems and MPSoC

Embedded Systems (IEEE ’92)

A computer system that is part of a larger system and performs some of the requirements of that system.

Consumer Electronics Devices

  • 4K digital televisions
  • Smartphones
  • Hand-help music players

Slide 2 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-4
SLIDE 4

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Introduction

Embedded Systems and MPSoC

Embedded Systems (IEEE ’92)

A computer system that is part of a larger system and performs some of the requirements of that system.

Consumer Electronics Devices

  • 4K digital televisions
  • Smartphones
  • Hand-help music players
  • High-resolution multimedia apps
  • H.265 HEVC
  • Augmented reality
  • 3D video games
  • . . .

Slide 2 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-5
SLIDE 5

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Introduction

Embedded Systems and MPSoC

Embedded Systems (IEEE ’92)

A computer system that is part of a larger system and performs some of the requirements of that system.

Consumer Electronics Devices

  • 4K digital televisions
  • Smartphones
  • Hand-help music players
  • High-resolution multimedia apps
  • H.265 HEVC
  • Augmented reality
  • 3D video games
  • . . .

⇒ high performance expectations.

Slide 2 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-6
SLIDE 6

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Introduction

Embedded Systems and MPSoC

Embedded Systems (IEEE ’92)

A computer system that is part of a larger system and performs some of the requirements of that system. Current applications have high performance expectations...

⇒ important demand for:

  • Powerful parallel architectures
  • High-level development methodologies
  • Efficient verification & validation tools

Slide 2 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-7
SLIDE 7

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Introduction

Embedded Systems and MPSoC

Embedded Systems (IEEE ’92)

A computer system that is part of a larger system and performs some of the requirements of that system. Current applications have high performance expectations...

⇒ important demand for:

  • Powerful parallel architectures
  • MultiProcessor Systems-on-a-Chip (MPSoCs)
  • High-level development methodologies
  • Efficient verification & validation tools

Slide 2 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-8
SLIDE 8

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Introduction

Embedded Systems and MPSoC

Embedded Systems (IEEE ’92)

A computer system that is part of a larger system and performs some of the requirements of that system. Current applications have high performance expectations...

⇒ important demand for:

  • Powerful parallel architectures
  • MultiProcessor Systems-on-a-Chip (MPSoCs)
  • High-level development methodologies. . .
  • Programming models & environments
  • Efficient verification & validation tools

Slide 2 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-9
SLIDE 9

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Introduction

Embedded Systems and MPSoC

Embedded Systems (IEEE ’92)

A computer system that is part of a larger system and performs some of the requirements of that system. Current applications have high performance expectations...

⇒ important demand for:

  • Powerful parallel architectures
  • MultiProcessor Systems-on-a-Chip (MPSoCs)
  • High-level development methodologies. . .
  • Programming models & environments
  • Efficient verification & validation tools
  • Our research effort

Slide 2 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-10
SLIDE 10

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Introduction

Verification & Validation

Important domain for business, engineering and research

  • Time-to-market
  • Consumer experience
  • Costly maintenance phase

Slide 3 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-11
SLIDE 11

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Introduction

Verification & Validation

Important domain for business, engineering and research

  • Time-to-market
  • Consumer experience
  • Costly maintenance phase
  • Time and nerves consuming
  • Large set of skills/techniques involved
  • Still imperfect

Live Debugging Post-Mortem Debugging Pre-Execution Analysis Validate the results Execute Write code

Slide 3 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-12
SLIDE 12

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Agenda

1 Background: MPSoC Programming and Debugging 2 Programming Model Centric Interactive Debugging 3 mcGDB Case-Studies

Slide 4 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-13
SLIDE 13

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Agenda

1 Background: MPSoC Programming and Debugging 2 Programming Model Centric Interactive Debugging 3 mcGDB Case-Studies

Slide 4 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-14
SLIDE 14

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoC and GPU Systems

MultiProcessor System-on-Chip

  • Many-core processor for embedded systems
  • Heterogeneous computing power
  • Low energy-consumption
slide-15
SLIDE 15

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoC and GPU Systems

MultiProcessor System-on-Chip

  • Many-core processor for embedded systems
  • Heterogeneous computing power
  • Low energy-consumption

Multi-core CPU GPU Many-core

Rogue STHORM

More programmability More parallelism

Cortex-A9 Midgard-T6xx Cortex-A15

Slide 5 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-16
SLIDE 16

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoC and GPU Systems

MultiProcessor System-on-Chip

  • Many-core processor for embedded systems
  • Heterogeneous computing power
  • Low energy-consumption

Multi-core CPU GPU Many-core

Rogue STHORM

More programmability More parallelism

Cortex-A9 Midgard-T6xx Cortex-A15

Slide 5 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-17
SLIDE 17

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoC and GPU Systems

Sthorm Platform — our reference MPSoC

  • ST Heterogeneous Low-Power Many-core (Platform 2012)
  • CPU + 4 clusters × 16 lightweight/energy-efficient cores
  • ± dedicated hardware accelerators

STHORM Fabric L2 L3 (DRAM) Cluster 0

L1 TCDM

Cluster 1

L1 TCDM

Cluster 2

L1 TCDM

Cluster 3

L1 TCDM

ARM Host FC

Slide 6 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-18
SLIDE 18

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoC and GPU Systems

Sthorm Platform — our reference MPSoC

  • ST Heterogeneous Low-Power Many-core (Platform 2012)
  • CPU + 4 clusters × 16 lightweight/energy-efficient cores
  • ± dedicated hardware accelerators
  • GPU-like architecture

STHORM Fabric L2 L3 (DRAM) Cluster 0

L1 TCDM

Cluster 1

L1 TCDM

Cluster 2

L1 TCDM

Cluster 3

L1 TCDM

ARM Host FC

Bj¨

  • rn K¨
  • nig, Wikimedia

Slide 6 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-19
SLIDE 19

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoCs and Programming Models

How to program such complex architectures?

Slide 7 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-20
SLIDE 20

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoCs and Programming Models

How to program such complex architectures? Programming models and environments!

Slide 7 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-21
SLIDE 21

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoCs and Programming Models

... not so many clear definitions in the literature, so ...

Programming Model (Skillicorn and Talia ’98)

  • A model is an abstract machine...
  • providing certain operations to the programming level above and ...
  • requiring implementations for each of these operations on all of the

architectures below.

Slide 7 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-22
SLIDE 22

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoCs and Programming Models

... not so many clear definitions in the literature, so ...

Programming Model (Skillicorn and Talia ’98)

  • A model is an abstract machine...
  • providing certain operations to the programming level above and ...
  • requiring implementations for each of these operations on all of the

architectures below.

Slide 7 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-23
SLIDE 23

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoCs and Programming Models

... not so many clear definitions in the literature, so ...

Programming Model (Skillicorn and Talia ’98)

  • A model is an abstract machine...
  • providing certain operations to the programming level above and ...
  • requiring implementations for each of these operations on all of the

architectures below.

Slide 7 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-24
SLIDE 24

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoCs and Programming Models

... not so many clear definitions in the literature, so ...

Programming Model (Skillicorn and Talia ’98)

  • A model is an abstract machine...
  • providing certain operations to the programming level above and ...
  • requiring implementations for each of these operations on all of the

architectures below. broad definition!

→ it’s an abstract machine

  • that separates application development / lower-level concerns

Slide 7 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-25
SLIDE 25

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoCs and Programming Models

... not so many clear definitions in the literature, so ...

Programming Model (Skillicorn and Talia ’98)

  • A model is an abstract machine...
  • providing certain operations to the programming level above and ...
  • requiring implementations for each of these operations on all of the

architectures below. broad definition!

→ it’s an abstract machine

  • that separates application development / lower-level concerns

Slide 7 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-26
SLIDE 26

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoCs and Programming Models

Programming Model (Skillicorn and Talia ’98)

  • A model is an abstract machine...
  • providing certain operations to the programming level above and

requiring ...

Supportive Environment

  • ... implementations for each of these operations on all of the

architectures below.

  • programming frameworks
  • runtime libraries
  • APIs

Slide 7 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-27
SLIDE 27

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

MPSoCs and Programming Models

Programming Model (Skillicorn and Talia ’98)

  • A model is an abstract machine...
  • providing certain operations to the programming level above and

requiring ...

Supportive Environment

  • ... implementations for each of these operations on all of the

architectures below.

  • programming frameworks
  • runtime libraries
  • APIs

Slide 7 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-28
SLIDE 28

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Programming Models for Sthorm MPSoC

Components Dataflow Kernels

Slide 8 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-29
SLIDE 29

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Programming Models for Sthorm MPSoC

Components

  • code/data encapsulation
  • software reuse
  • service contracts

(language-free interfaces)

Dataflow Kernels

Interface not connected «Runnable» interface Type 2 interface Type 1 interface component 2a component 1 component 3 component 2b

Slide 8 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-30
SLIDE 30

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Programming Models for Sthorm MPSoC

Components Dataflow

  • emphasis put on the

stream of data

  • implicit parallelism
  • roots in graph theory

Kernels

actor 1 actor 2 actor 3 actor 4

Slide 8 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-31
SLIDE 31

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Programming Models for Sthorm MPSoC

Components Dataflow Kernels

  • data parallelism
  • massively parallel
  • work offloaded to accel-

erator (GPU/Sthorm)

kernel 3 kernel 2 kernel 1 buffer a buffer b1

Slide 8 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-32
SLIDE 32

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Programming Models for Sthorm MPSoC

Components

  • code/data encapsulation
  • software reuse
  • service contracts

(language-free interfaces)

Dataflow

  • emphasis put on the

stream of data

  • implicit parallelism
  • roots in graph theory

Kernels

  • data parallelism
  • massively parallel
  • work offloaded to accel-

erator (GPU/Sthorm)

Different models covering large programming domain ... but what about Verification & Validation? correctness guarantees vs. development constraints ...

Slide 8 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-33
SLIDE 33

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Live Debugging Post-Mortem Debugging Pre-Execution Analysis Validate the results Execute Write code

Slide 9 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-34
SLIDE 34

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Live Debugging Post-Mortem Debugging Pre-Execution Analysis Validate the results Execute Write code

Static/Formal Analysis

+ May be exhaustive

  • synchronous dataflow

− Not always feasible

  • dynamic behaviors

Slide 9 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-35
SLIDE 35

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Live Debugging Post-Mortem Debugging Pre-Execution Analysis Validate the results Execute Write code

Trace Analysis

  • Manual/data-mining

+ long/time critical run

  • What to trace?
  • fixed # of trace-points

Slide 9 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-36
SLIDE 36

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Live Debugging Post-Mortem Debugging Pre-Execution Analysis Validate the results Execute Write code

Static/Formal Analysis

+ May be exhaustive

  • synchronous dataflow

− Not always feasible

  • dynamic behaviors

Trace Analysis

  • Manual/data-mining

+ long/time critical run

  • What to trace?
  • fixed # of trace-points

Slide 9 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-37
SLIDE 37

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Interactive Debugging

  • Developers mental representation VS. actual execution
  • Understand the different steps of the execution

push push

Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-38
SLIDE 38

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Interactive Debugging

  • Developers mental representation VS. actual execution
  • Understand the different steps of the execution
  • Instruction breakpoints
  • Memory watchpoints
  • Event catchpoints

push push

Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-39
SLIDE 39

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Interactive Debugging

  • Developers mental representation VS. actual execution
  • Understand the different steps of the execution
  • Instruction breakpoints
  • Memory watchpoints
  • Event catchpoints
  • Step-by-step execution
  • Source code or assembly level
  • Memory and processor inspection

push push

Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-40
SLIDE 40

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Interactive Debugging

  • Developers mental representation VS. actual execution
  • Understand the different steps of the execution
  • Instruction breakpoints
  • Memory watchpoints
  • Event catchpoints
  • Step-by-step execution
  • Source code or assembly level
  • Memory and processor inspection

What about the Supportive Environment? push push

Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-41
SLIDE 41

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Interactive Debugging

  • Developers mental representation VS. actual execution
  • Understand the different steps of the execution
  • Instruction breakpoints
  • Memory watchpoints
  • Event catchpoints
  • Step-by-step execution
  • Source code or assembly level
  • Memory and processor inspection

What about the Supportive Environment? Debuggers cannot access the abstract machine! push push

Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-42
SLIDE 42

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Interactive Debugging

  • Developers mental representation VS. actual execution
  • Understand the different steps of the execution
  • Instruction breakpoints
  • Memory watchpoints
  • Event catchpoints
  • Step-by-step execution
  • Source code or assembly level
  • Memory and processor inspection

What about the Supportive Environment? Debuggers cannot access the abstract machine! push push

Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-43
SLIDE 43

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Interactive Debugging

  • Developers mental representation VS. actual execution
  • Understand the different steps of the execution
  • Instruction breakpoints
  • Memory watchpoints
  • Event catchpoints
  • Step-by-step execution
  • Source code or assembly level
  • Memory and processor inspection

What about the Supportive Environment? Debuggers cannot access the abstract machine! push push

Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-44
SLIDE 44

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Interactive Debugging

  • Developers mental representation VS. actual execution
  • Understand the different steps of the execution
  • Instruction breakpoints
  • Memory watchpoints
  • Event catchpoints
  • Step-by-step execution
  • Source code or assembly level
  • Memory and processor inspection

What about the Supportive Environment? Debuggers cannot access the abstract machine! push push

Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-45
SLIDE 45

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Tools and Techniques, Advantages of Interactive Debugging

Interactive Debugging

  • Developers mental representation VS. actual execution
  • Understand the different steps of the execution
  • Instruction breakpoints
  • Memory watchpoints
  • Event catchpoints
  • Step-by-step execution
  • Source code or assembly level
  • Memory and processor inspection

What about the Supportive Environment? Debuggers cannot access the abstract machine! push push

Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-46
SLIDE 46

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Background: MPSoC Programming and Debugging

Objective

Provide developers with means to better understand the state of the high-level applications and control more easily their execution, suitable for various models and environments.

Slide 11 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-47
SLIDE 47

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Agenda

1 Background: MPSoC Programming and Debugging 2 Programming Model Centric Interactive Debugging 3 mcGDB Case-Studies

Slide 11 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-48
SLIDE 48

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Idea: Integrate programming model concepts in interactive debugging

Slide 12 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-49
SLIDE 49

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

1 Provide a Structural Representation

  • Draw application architecture diagrams
  • Represent the relationship between the entities
  • Offer catchpoints on architecture-related operations

front_controller imvp pred_controller bh red pipe ipred hwcfg ipf

pushpushpushpush Graph of a dataflow from the case-study

Slide 13 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-50
SLIDE 50

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

1 Provide a Structural Representation

  • Draw application architecture diagrams
  • Represent the relationship between the entities
  • Offer catchpoints on architecture-related operations

x x

pushpushpushpush

Reconfiguration of an application based on components

Slide 13 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-51
SLIDE 51

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

1 Provide a Structural Representation

  • Draw application architecture diagrams
  • Represent the relationship between the entities
  • Offer catchpoints on architecture-related operations

break

x x

pushpushpushpush

Reconfiguration of an application based on components

Slide 13 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-52
SLIDE 52

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

1 Provide a Structural Representation

  • Draw application architecture diagrams
  • Represent the relationship between the entities
  • Offer catchpoints on architecture-related operations

break pushpushpushpush

Reconfiguration of an application based on components

Slide 13 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-53
SLIDE 53

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

2 Monitor Dynamic Behaviors

  • Monitor the collaboration between the tasks
  • Detect communication, synchronization events
  • interpret their pattern and semantics

(one-to-one, one-to-many, global or local barriers)

  • Offer communication-aware catchpoint mechanisms

(pink) ask service() (env.) transmit request... (blue) exec service() {...}

Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-54
SLIDE 54

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

2 Monitor Dynamic Behaviors

  • Monitor the collaboration between the tasks
  • Detect communication, synchronization events
  • interpret their pattern and semantics

(one-to-one, one-to-many, global or local barriers)

  • Offer communication-aware catchpoint mechanisms

actor 1 actor 2 actor 3 actor 4

Catch all messages X

Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-55
SLIDE 55

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

2 Monitor Dynamic Behaviors

  • Monitor the collaboration between the tasks
  • Detect communication, synchronization events
  • interpret their pattern and semantics

(one-to-one, one-to-many, global or local barriers)

  • Offer communication-aware catchpoint mechanisms

actor 1 actor 2 actor 3 actor 4

Catch all messages X

Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-56
SLIDE 56

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

2 Monitor Dynamic Behaviors

  • Monitor the collaboration between the tasks
  • Detect communication, synchronization events
  • interpret their pattern and semantics

(one-to-one, one-to-many, global or local barriers)

  • Offer communication-aware catchpoint mechanisms

actor 1 actor 2 actor 3 actor 4

Catch all messages break

Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-57
SLIDE 57

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

2 Monitor Dynamic Behaviors

  • Monitor the collaboration between the tasks
  • Detect communication, synchronization events
  • interpret their pattern and semantics

(one-to-one, one-to-many, global or local barriers)

  • Offer communication-aware catchpoint mechanisms

actor 1 actor 2 actor 3 actor 4

Catch all messages X

Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-58
SLIDE 58

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

2 Monitor Dynamic Behaviors

  • Monitor the collaboration between the tasks
  • Detect communication, synchronization events
  • interpret their pattern and semantics

(one-to-one, one-to-many, global or local barriers)

  • Offer communication-aware catchpoint mechanisms

actor 1 actor 2 actor 3 actor 4

Catch all messages X break

Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-59
SLIDE 59

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

3 Interact with the Abstract Machine

  • Recognize the different entities of the model
  • Provide details about their state, schedulability, callstack, ...
  • Provide support to understand how they reached their current state

Slide 15 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-60
SLIDE 60

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

3 Interact with the Abstract Machine

  • Recognize the different entities of the model
  • Provide details about their state, schedulability, callstack, ...
  • Provide support to understand how they reached their current state

Slide 15 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-61
SLIDE 61

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

3 Interact with the (abstract) Machine

  • Support interactions with real machine
  • memory and processor inspection
  • breakpoints and watchpoints (maybe per entity)
  • step-by-step execution . . .

Slide 16 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-62
SLIDE 62

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

4 Open Up to Model and Environment Specific Features

  • Follow messages over multiple entities
  • User-defined constraints on the graph topology
  • Deadlock detection in task-based models

Slide 17 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-63
SLIDE 63

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

4 Open Up to Model and Environment Specific Features

  • Follow messages over multiple entities
  • User-defined constraints on the graph topology
  • Deadlock detection in task-based models

hwcfg pipe ipred ipf

cycles in the graph of blocking communications = ⇒ deadlock

Slide 17 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-64
SLIDE 64

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

1 Provide a Structural Representation 2 Monitor Dynamic Behaviors 3 Interact with the Abstract Machine 4 Open Up to Model and Environment Specific Features

Slide 18 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-65
SLIDE 65

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Proof-of-concept Environment

STHORM / Platform 2012

ST/CEA MPSoC research platform

  • x86 platform simulators

Slide 19 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-66
SLIDE 66

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Proof-of-concept Environment

STHORM Progr. Environments

  • Components (NPM)
  • Dataflow (PEDF)
  • Kernel (OpenCL)

STHORM / Platform 2012

ST/CEA MPSoC research platform

  • x86 platform simulators

Slide 19 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-67
SLIDE 67

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Proof-of-concept Environment

The Gnu Debugger

  • Adapted to low level/C debugging
  • Large user community

STHORM Progr. Environments

  • Components (NPM)
  • Dataflow (PEDF)
  • Kernel (OpenCL)

STHORM / Platform 2012

ST/CEA MPSoC research platform

  • x86 platform simulators

Slide 19 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-68
SLIDE 68

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Proof-of-concept Environment

The Gnu Debugger

  • Adapted to low level/C debugging
  • Large user community
  • Extendable with Python API

STHORM Progr. Environments

  • Components (NPM)
  • Dataflow (PEDF)
  • Kernel (OpenCL)

STHORM / Platform 2012

ST/CEA MPSoC research platform

  • x86 platform simulators

Slide 19 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-69
SLIDE 69

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-70
SLIDE 70

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-71
SLIDE 71

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-72
SLIDE 72

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-73
SLIDE 73

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-74
SLIDE 74

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-75
SLIDE 75

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-76
SLIDE 76

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-77
SLIDE 77

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-78
SLIDE 78

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-79
SLIDE 79

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-80
SLIDE 80

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-81
SLIDE 81

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-82
SLIDE 82

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-83
SLIDE 83

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-84
SLIDE 84

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-85
SLIDE 85

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Interpreting Execution Events

⇒ Detect and interpret the exec. events of the runtime framework

Slide 20 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-86
SLIDE 86

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Capture Mechanism Evaluation and Alternatives

Breakpoints and Debug Information Capturable Info. High Execution Overhead Significant Cooperation btw. Debug and Env. None Portability Low

Slide 21 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-87
SLIDE 87

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Capture Mechanism Evaluation and Alternatives

Breakpoints and Debug Information Preloaded Library Capturable Info. High Limited to API Execution Overhead Significant Limited Cooperation btw. Debug and Env. None Low Portability Low Very Good

Slide 21 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-88
SLIDE 88

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Programming Model Centric Interactive Debugging

Capture Mechanism Evaluation and Alternatives

Breakpoints and Debug Information Preloaded Library Specialized Debug Module Capturable Info. High Limited to API Full Execution Overhead Significant Limited Limited Cooperation btw. Debug and Env. None Low Strong Portability Low Very Good Vendor Specific

Slide 21 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-89
SLIDE 89

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Agenda

1 Background: MPSoC Programming and Debugging 2 Programming Model Centric Interactive Debugging 3 mcGDB Case-Studies

Slide 21 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-90
SLIDE 90

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

A PEDF Dataflow H.264 Video Decoder

Dataflow Environment (PEDF)

  • Dynamic dataflow programming
  • Good for multimedia application
  • No verification/validation help
  • Heterogeneous computing:
  • actors ⇒ HW accelerators

Slide 22 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-91
SLIDE 91

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

A PEDF Dataflow H.264 Video Decoder

Dataflow Environment (PEDF)

  • Dynamic dataflow programming
  • Good for multimedia application
  • No verification/validation help
  • Heterogeneous computing:
  • actors ⇒ HW accelerators

logo by bullboykennels

  • Flexible video decoding standard
  • for HD television, blu-ray disks,

broadcast, telephony, . . .

  • Good dataflow decomposition
  • Developed to validate PEDF design

Slide 22 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-92
SLIDE 92

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies: A PEDF Dataflow H.264 Video Decoder

The application is frozen, how can GDB help us?

hint: not much!

pred_controller ipred hwcfg pipe ipf

(static graph provided by the compiler)

Slide 23 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-93
SLIDE 93

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies: A PEDF Dataflow H.264 Video Decoder

The application is frozen, how can GDB help us?

pred_controller ipred hwcfg pipe ipf

(gdb) info threads

Id Target Id Frame 1 Thread 0xf7e77b 0xf7ffd430 in __kernel_vsyscall () * 2 Thread 0xf7e797

  • perator= (val=..., this=0xa0a1330)

Slide 23 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-94
SLIDE 94

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies: A PEDF Dataflow H.264 Video Decoder

The application is frozen, how can GDB help us?

pred_controller ipred hwcfg pipe ipf

(gdb) thread apply all where

Thread 1 (Thread 0xf7e77b): #0 0xf7ffd430 in __kernel_vsyscall () #1 0xf7fcd18c in pthread_cond_wait@ () #2 0x0809748f in wait_for_step_completion(struct... *) #3 0x0809596e in pred_controller_work_function() #4 0x08095cbc in entry(int, char**) () #5 0x0809740a in host_launcher_entry_point ()

Slide 23 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-95
SLIDE 95

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies: A PEDF Dataflow H.264 Video Decoder

The application is frozen, how can GDB help us?

pred_controller ipred hwcfg pipe ipf

X

(gdb) thread apply all where

Thread 2 (Thread 0xf7e797): #0 operator= (val=..., this=0xa0a1330) #1 pipeRead (data=0) at pipeFilter.c:154 ւ 154 Smb = pedf.io.hwcfgSmb[count]; #2 0x0804da63 in PipeFilter_work_function () at pipe.c:361 #3 0x080a4132 in PedfBaseFilter::controller (this=0xa0d18) #4 0x080c12f0 in sc_core::sc_thread_cor_fn (arg=0xa0a3598)

Slide 23 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-96
SLIDE 96

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies: A PEDF Dataflow H.264 Video Decoder

The application is frozen, how can mcGDB help us?

(mcgdb) info graph

pred_controller ipred hwcfg z pipe ipf

  • pipe, ipred and ipf are blocked
  • hwcfg is asleep

Slide 23 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-97
SLIDE 97

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies: A PEDF Dataflow H.264 Video Decoder

The application is frozen, how can mcGDB help us?

(mcgdb) info graph

pred_controller ipred hwcfg z pipe ipf

(mcgdb) info actors +state

#0 Controller ‘pred_controller’: Blocked, waiting for step completion #1/2/3 Actor ‘pipe/ipref/ipf’: Blocked, reading from #4 ‘hwcfg’ #4 Actor ‘hwcfg’: Asleep, Step completed

Slide 23 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-98
SLIDE 98

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

A Feature Tracker Based on NPM Components

Component Framework (NPM)

  • Low-level access to Sthorm architecture
  • Optimized communication components
  • 1 component per cluster and fork-join //

Slide 24 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-99
SLIDE 99

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

A Feature Tracker Based on NPM Components

Component Framework (NPM)

  • Low-level access to Sthorm architecture
  • Optimized communication components
  • 1 component per cluster and fork-join //

PKLT Feature Tracker

  • Track interesting features btw. frames
  • Part of an augmented reality application

Slide 24 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-100
SLIDE 100

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

A Feature Tracker Based on NPM Components

(mcgdb) info component 2 +interfaces +counts

#2 Component[SmoothAndSampleComponent.so ] srcPullBuffer #35 msgs dstTmpPushBuffer #36 msgs srcTmpPullBuffer #35 msgs dstPushBuffer #34 msgs

Slide 25 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-101
SLIDE 101

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

A Feature Tracker Based on NPM Components

(mcgdb) info component 2 +interfaces +counts

#2 Component[SmoothAndSampleComponent.so ] srcPullBuffer #35 msgs dstTmpPushBuffer #36 msgs srcTmpPullBuffer #35 msgs dstPushBuffer #34 msgs

Slide 25 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-102
SLIDE 102

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

A Feature Tracker Based on NPM Components

(mcgdb) info component 2 +interfaces +counts

#2 Component[SmoothAndSampleComponent.so ] srcPullBuffer #35 msgs dstTmpPushBuffer #36 msgs srcTmpPullBuffer #35 msgs dstPushBuffer #34 msgs

  • that was a bug of the application! (msg sent to the wrong interface)

Slide 25 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-103
SLIDE 103

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

A Feature Tracker Based on NPM Components

Excerpt from a 300-line-of-code file

/* Compute last lines if necessary */ if (tmp_size > 0) { ... /* Transmit the last lines computed */ CALL(srcTmpPullBuffer, release)(...); CALL(dstTmpPushBuffer, push)(...); }

Slide 26 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-104
SLIDE 104

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming

Kernel Programming Standard

(no environment distinction for us)

  • Running on Sthorm,

but primarily used with GPU

Slide 27 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-105
SLIDE 105

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming

Kernel Programming Standard

(no environment distinction for us)

  • Running on Sthorm,

but primarily used with GPU

  • MC debugging only on host-side

Slide 27 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-106
SLIDE 106

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming

Kernel Programming Standard

(no environment distinction for us)

  • Running on Sthorm,

but primarily used with GPU

  • MC debugging only on host-side

BigDFT Density functional theory solver based on Daubechies wavelets.

(electronic structure calculations)

  • High performance requirements
  • Hybrid CPU/GPU computing
  • MPI - OpenCL (Fortran / C)

Slide 27 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-107
SLIDE 107

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming

Generic OpenCL skeleton

cl_kernel ker = clCreateKernel(...); cl_buffer buf = clCreateBuffer(...); clSetKernelArg(ker, 0, buf, ...); clSetKernelArg(ker, 1, N, ...); clEnqueueNDRangeKernel(ker, ...); clEnqueueReadBuffer(buf, ...); That’s common operations found in any OpenCL code ...

Slide 28 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-108
SLIDE 108

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Architecture Representation

So let’s instrument these events ...

cl_program clCreateProgramWithSource (context, code, ...); cl_kernel clCreateKernel (program, kernel_name, ..); cl_int clSetKernelArg (kernel, arg_index,..., arg_val); cl_int clEnqueueNDRangeKernel (cmd_q, kernel, work_dim); cl_mem clCreateBuffer (context, size, host_ptr, ..); cl_int clEnqueueReadBuffer (cmd_q, buf, ..., ptr, ...);

Slide 29 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-109
SLIDE 109

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Architecture Representation

So let’s instrument these events ...

cl_program clCreateProgramWithSource (context, code, ...); cl_kernel clCreateKernel (program, kernel_name, ..); cl_int clSetKernelArg (kernel, arg_index,..., arg_val); cl_int clEnqueueNDRangeKernel (cmd_q, kernel, work_dim); cl_mem clCreateBuffer (context, size, host_ptr, ..); cl_int clEnqueueReadBuffer (cmd_q, buf, ..., ptr, ...);

... to implement model-centric debugging commands:

(mcgdb) info programs (mcgdb) info kernels [name|ID] {+where|+params} (mcgdb) info buffers [ID] {+where|+params}

Slide 29 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-110
SLIDE 110

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Architecture Representation

So let’s instrument these events ...

cl_program clCreateProgramWithSource (context, code, ...); cl_kernel clCreateKernel (program, kernel_name, ..); cl_int clSetKernelArg (kernel, arg_index,..., arg_val); cl_int clEnqueueNDRangeKernel (cmd_q, kernel, work_dim); cl_mem clCreateBuffer (context, size, host_ptr, ..); cl_int clEnqueueReadBuffer (cmd_q, buf, ..., ptr, ...);

... to implement model-centric debugging commands:

(mcgdb) info programs (mcgdb) info kernels [name|ID] {+where|+params} (mcgdb) info buffers [ID] {+where|+params} (mcgdb) kernel [name|ID] catch {all|enqueue|set_arg|...} (mcgdb) buffer [ID] catch {all|transfer|read|write|...}

Slide 29 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-111
SLIDE 111

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Architecture Representation

(mcgdb) info programs +kernels

Program #1 (0x3aec5e0) Program #5 (0x3ad7e00) Program #10 (0x11872f0) Kernel #1 magicfiltergrow1dKernel_d Kernel #2 magicfiltergrow_denKernel_d Kernel #20 anashrink1dKernel_d Kernel #3 magicfiltergrowshrink1dKernel_d Kernel #4 magicfiltergrow_potKernel_d ... Kernel #39 axpyKernel_d Kernel #21 ana1dKernel_d Kernel #22 ana_blockKernel_d Kernel #38 axpy_offsetKernel_d Kernel #40 scalKernel_d Kernel #41 reductionKernel_d ...

Slide 30 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-112
SLIDE 112

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Architecture Representation

(mcgdb) info programs +kernels (mcgdb) info kernels 41 +where +use count +handle

Kernel #41 reductionKernel_d Creation stack: #0 0x0912a13 in create_reduction_kernels (...) #1 0x0900a10 in create_kernels (...) #2 0x0902744 in ocl_create_command_queue_id_ (...) Use count: 5 Handle: (cl_kernel) 0x3aea590

Slide 30 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-113
SLIDE 113

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Architecture Representation

(mcgdb) info programs +kernels (mcgdb) info kernels 41 +where +use count +handle

Kernel #41 reductionKernel_d Creation stack: #0 0x0912a13 in create_reduction_kernels (...) #1 0x0900a10 in create_kernels (...) #2 0x0902744 in ocl_create_command_queue_id_ (...) Use count: 5 Handle: (cl_kernel) 0x3aea590

cl kernel kernel = 0x3aea590 = ... ; //somewhere in the code

Slide 30 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-114
SLIDE 114

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Architecture Representation

(mcgdb) info kernels 41 +where +use count +handle

Kernel #41 reductionKernel_d Creation stack: #0 0x0912a13 in create_reduction_kernels (...) #1 0x0900a10 in create_kernels (...) #2 0x0902744 in ocl_create_command_queue_id_ (...) Use count: 5 Handle: (cl_kernel) 0x3aea590

cl kernel kernel = 0x3aea590 = ... ; //somewhere in the code

(gdb) print kernel, print *kernel **native support**

$1 = (cl_kernel) 0x3ae9d50 $2 = <incomplete type>

Slide 30 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-115
SLIDE 115

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Architecture Representation

(mcgdb) info kernels 41 +where +use count +handle

Kernel #41 reductionKernel_d Creation stack: #0 0x0912a13 in create_reduction_kernels (...) #1 0x0900a10 in create_kernels (...) #2 0x0902744 in ocl_create_command_queue_id_ (...) Use count: 5 Handle: (cl_kernel) 0x3aea590

cl kernel kernel = 0x3aea590 = ... ; //somewhere in the code

(mcgdb) info kernels +handle=0x3aea590

Kernel #41 reductionKernel_d Creation stack: (++ with GDB 7.6 ... pretty printers)

Slide 30 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-116
SLIDE 116

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Why Execution Visualization ?

Why Execution Visualization ? let’s consider an example ...

Slide 31 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-117
SLIDE 117

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Why Execution Visualization ?

C code

reductionKernel (int n, double * in, double * out){...} checkStatus(int * ptr, char * msg) { if(ptr == 0) exit(-1);} void main() { double * in = malloc(...) ; checkStatus(in,"in failed" ); double * out = malloc(...); checkStatus(out,"out failed" ); initialize(in); reductionKernel(N, in, out); // free ... }

Slide 31 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-118
SLIDE 118

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Why Execution Visualization ?

  • r in one page:

/* Instantiate the runtime. */ command_queue = clCreateCommandQueue((*context)->context, aDevices[0], 0, &ciErrNum); kerns->reduction_kernel_d=clCreateKernel(reductionProgram, "reductionKernel_d",&ciErrNum);

  • clErrorCheck(ciErrNum,"Failed to create kernel!");

/* Allocate the buffers on the GPU. */ *buff_ptr = clCreateBuffer((*context)->context, CL_MEM_READ_ONLY, *size, NULL, &ciErrNum);

  • clErrorCheck(ciErrNum,"Failed to create read buffer!");

/* Push the initial values to the GPU memory. */ cl_int ciErrNum = clEnqueueWriteBuffer((*command_queue)->command_queue, *buffer, CL_TRUE, 0, *size, p...

  • clErrorCheck(ciErrNum,"Failed to enqueue write buffer!");

/* Set the kernel parameters. */ clSetKernelArg(kernel, i++,sizeof(*ndat), (void*)ndat); clSetKernelArg(kernel, i++,sizeof(*in), (void*... clSetKernelArg(kernel, i++,sizeof(*out), (void*)out); clSetKernelArg(kernel, i++,sizeof(cl_dbl)*blk_... /* Trigger the kernel execution. */ size_t localWorkSize[] = { block_size_i }; size_t globalWorkSize[] ={ roundUp(blk_size_i*2,*ndat)/2 }; ciErrNum = clEnqueueNDRangeKernel(command_queue->command_queue, kernel, 1, NULL, globalWorkSz, localWo...

  • clErrorCheck(errNum,"Failed to enqueue reduction kernel!");

/* Get the result back. */ cl_int ciErrNum = clEnqueueReadBuffer((*command_queue)->command_queue, *input, CL_TRUE, 0, sizeof(cl_d...

  • clErrorCheck(ciErrNum,"Failed to enqueue read buffer!");

/* Then release the memory ... */

Slide 32 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-119
SLIDE 119

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Execution Visualization

(mcgdb) print flow

(an Eclipse visualization engine)

  • updated on user request, or
  • automatically on execution stops, step-by-step, ...

Slide 33 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-120
SLIDE 120

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Execution Visualization

(mcgdb) print flow

(an Eclipse visualization engine)

  • Set the kernel arguments.
  • 2 scalars
  • 2 GPU buffers

clSetKernelArg(kernel, i++, sizeof(*ndat),(void*)ndat); clSetKernelArg(kernel, i++, sizeof(*in), (void*)in); clSetKernelArg(kernel, i++, sizeof(*out), (void*)out); clSetKernelArg(kernel, i++, sizeof(*sz), (void*)sz);

Slide 33 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-121
SLIDE 121

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Execution Visualization

(mcgdb) print flow

(an Eclipse visualization engine)

  • Set the kernel arguments.
  • 2 scalars
  • 2 GPU buffers
  • Trigger the kernel execution
  • 2 buffers involved

ciErrNum = clEnqueueNDRangeKernel(command_queue->command_q, kernel, 1, NULL, globalWorkSz, localWorkSize, 0, NULL, NULL);

Slide 33 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-122
SLIDE 122

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

mcGDB Case-Studies

OpenCL and BigDFT Kernel Programming: Execution Visualization

(mcgdb) print flow

(an Eclipse visualization engine)

  • Set the kernel arguments.
  • 2 scalars
  • 2 GPU buffers
  • Trigger the kernel execution
  • 2 buffers involved
  • Retrieve the result
  • buffer content is saved

cl_int ciErrNum = clEnqueueReadBuffer( (*command_queue)->command_queue, *input, CL_TRUE, 0, sizeof(cl_double),

  • ut, 0, NULL, NULL);

Slide 33 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-123
SLIDE 123

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Agenda

Conclusions and Future Work

Slide 33 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-124
SLIDE 124

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Conclusions and Future Work

  • Debugging high-level applications is challenging
  • Lack of information about programming models and frameworks

Our contribution: model-centric interactive debugging, applied to

  • Component-software engineering (Scopes ’12)
  • Dataflow programming (Sac and Hips ’13)
  • Kernels for accelerator programming

Slide 34 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-125
SLIDE 125

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Conclusions and Future Work

  • Debugging high-level applications is challenging
  • Lack of information about programming models and frameworks

Our contribution: model-centric interactive debugging, applied to

  • Component-software engineering (Scopes ’12)
  • Dataflow programming (Sac and Hips ’13)
  • Kernels for accelerator programming

Proof-of-concept: mcGDB, a prototype for Sthorm platform

  • Extends GDB and its Python interface:
  • Framework for model-centric debugging
  • Interface patches contributed to the community
  • Usage studied through embedded and scientific applications

Slide 34 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-126
SLIDE 126

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Conclusions and Future Work

Perspectives with programming-model centric debugging:

  • Industrial side
  • Strengthen the implementation for production
  • Conduct extensive impact studies
  • Integrate within graphical debugging and visualization environments
  • Research side
  • Apply to different programming models
  • multi-level of abstraction for embedded systems,
  • hardware (ARM big.LITTLE architecture)
  • Continue the study on visualization-assisted interactive debugging
  • Enrich debugging information generated by compilers
  • work funded by Nano 2017 R&D project

Slide 35 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-127
SLIDE 127

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Publications

Kevin Pouget, Marc P´ erache, Patrick Carribault, and Herv´ e Jourdren. User level DB: a debugging API for user-level thread libraries. In Parallel Distributed Processing, Workshops and Phd Forum (IPDPSW), 2010 IEEE International Symposium on, pages 1–7, 2010. Kevin Pouget, Miguel Santana, Vania Marangozova-Martin, and Jean-Fran¸ cois Mehaut. Debugging Component-Based Embedded Applications. In Joint Workshop Map2MPSoC (Mapping of Applications to MPSoCs) and SCOPES (Software and Compilers for Embedded Systems), St Goar, Germany, may 2012. Published in the ACM library. Kevin Pouget, Patricia L´

  • pez Cueva, Miguel Santana, and Jean-Fran¸

cois M´ ehaut. Interactive Debugging of Dynamic Dataflow Embedded Applications. In Proceedings of the 18th International Workshop on High-Level Parallel Programming Models and Supportive Environments (HIPS), Boston, Massachusetts, USA, may 2013. Held in conjunction of IPDPS. Kevin Pouget, Patricia L´

  • pez Cueva, Miguel Santana, and Jean-Fran¸

cois M´ ehaut. A novel approach for interactive debugging of dynamic dataflow embedded applications. In Proceedings of the 28th Symposium On Applied Computing (SAC), pages 1547–1549, Coimbra, Portugal, apr 2013.

Slide 36 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-128
SLIDE 128

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

Thanks for your attention

Slide 37 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3rd , 2014

slide-129
SLIDE 129

s t m i c r o e l e c t r o n i c s , u n i v e r s i t y o f g r e n o b l e / l i g l a b o r a t o r y

STMicroelectronics LIG University of Grenoble

Programming-Model Centric Debugging for Multicore Embedded Systems

Kevin Pouget

Under the supervision of: ++Dr. Miguel Santana, STMicroelectronics ++Prof. Jean-Fran¸ cois M´ ehaut, CEA/UJF

Thesis Defense, Grenoble — February 3rd , 2014