Interactive Debugging of Dynamic Dataflow Embedded Applications. - - PowerPoint PPT Presentation

interactive debugging of dynamic dataflow embedded
SMART_READER_LITE
LIVE PREVIEW

Interactive Debugging of Dynamic Dataflow Embedded Applications. - - 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 Interactive Debugging of Dynamic Dataflow Embedded Applications. Kevin Pouget, Patricia


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

Interactive Debugging of Dynamic Dataflow Embedded Applications.

Kevin Pouget, Patricia Lopez Cueva, Miguel Santana, Jean-François Méhaut

HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Embedded System Development

  • High-resolution multimedia app. ⇒ high performance expectations.
  • H.265 HEVC
  • Augmented reality,
  • 4K digital television
  • . . .
  • Sharp time-to-market constraints

⇒ Important demand for

  • Powerful parallel architectures
  • MultiProcessor on Chip (MPSoC)
  • Convenient programming methodologies
  • Dynamic dataflow programming
  • Efficient verification and validation tools
  • Our research contribution

Slide 2 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

MultiProcessor on Chip (MPSoC)

  • Parallel architecture
  • More difficult to program
  • Maybe heterogeneous
  • Application-specific processors,
  • Hardware accelerators,
  • GPU-like architecture (OS-less processors)
  • Embedded system
  • Constrained environment,
  • On-board debugging complicated

→ performance debugging only

  • Limited-scale functional debugging on simulators

Slide 3 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Dataflow Programming

  • Alternative to von Neumann model (↔ C/ASM)
  • Instructions executed when their operandsa are ready,

not when the Instruction Pointer (aka. Program Counter, %PC) reaches it.

+ * +

⇒ Inherently parallel ⇒ Today: coarser granularity, with imperative/object instruction blocks

aoperand == token == message

Slide 4 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Dataflow Programming

  • Alternative to von Neumann model (↔ C/ASM)
  • Instructions executed when their operandsa are ready,

not when the Instruction Pointer (aka. Program Counter, %PC) reaches it.

+ * + 5

⇒ Inherently parallel ⇒ Today: coarser granularity, with imperative/object instruction blocks

aoperand == token == message

Slide 4 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Dataflow Programming

  • Alternative to von Neumann model (↔ C/ASM)
  • Instructions executed when their operandsa are ready,

not when the Instruction Pointer (aka. Program Counter, %PC) reaches it.

+ * + 5 7

⇒ Inherently parallel ⇒ Today: coarser granularity, with imperative/object instruction blocks

aoperand == token == message

Slide 4 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Dataflow Programming

  • Alternative to von Neumann model (↔ C/ASM)
  • Instructions executed when their operandsa are ready,

not when the Instruction Pointer (aka. Program Counter, %PC) reaches it.

+ * + 2 3

⇒ Inherently parallel (“2 PCs” here) ⇒ Today: coarser granularity, with imperative/object instruction blocks

aoperand == token == message

Slide 4 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Dataflow Programming

  • Alternative to von Neumann model (↔ C/ASM)
  • Instructions executed when their operandsa are ready,

not when the Instruction Pointer (aka. Program Counter, %PC) reaches it.

+ * 5 +

⇒ Inherently parallel ⇒ Today: coarser granularity, with imperative/object instruction blocks

aoperand == token == message

Slide 4 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Dataflow Programming

  • Alternative to von Neumann model (↔ C/ASM)
  • Instructions executed when their operandsa are ready,

not when the Instruction Pointer (aka. Program Counter, %PC) reaches it.

+ * 5 + 12

⇒ Inherently parallel ⇒ Today: coarser granularity, with imperative/object instruction blocks

aoperand == token == message

Slide 4 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Dataflow Programming

  • Alternative to von Neumann model (↔ C/ASM)
  • Instructions executed when their operandsa are ready,

not when the Instruction Pointer (aka. Program Counter, %PC) reaches it.

+ * + 60

⇒ Inherently parallel ⇒ Today: coarser granularity, with imperative/object instruction blocks

aoperand == token == message

Slide 4 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Dataflow Programming

  • Alternative to von Neumann model (↔ C/ASM)
  • Instructions executed when their operandsa are ready,

not when the Instruction Pointer (aka. Program Counter, %PC) reaches it.

+ * + 60

⇒ Inherently parallel ⇒ Today: coarser granularity, with imperative/object instruction blocks

aoperand == token == message

Slide 4 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Different Dataflow Models

Decidable Dataflow

  • Correctness analysis
  • Deadlock-free static scheduling
  • Powerful optimization

but:

  • Strong constraints imposed to dev.
  • Reduced expressiveness
  • no dynamic problem

Dynamic Dataflow

Slide 5 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Different Dataflow Models

Decidable Dataflow

  • Correctness analysis
  • Deadlock-free static scheduling
  • Powerful optimization

but:

  • Strong constraints imposed to dev.
  • Reduced expressiveness
  • no dynamic problem

Dynamic Dataflow

  • Increased modeling flexibility
  • Conditional token emission/rcption
  • Variable input/output rates

but:

  • Limited static analysis
  • Debugging is not

straightforward

Slide 5 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Technological Context

Different Dataflow Models

Decidable Dataflow Dynamic Dataflow

  • Increased modeling flexibility
  • Conditional token emission/rcption
  • Variable input/output rates

but:

  • Limited static analysis
  • Debugging is not

straightforward e

ctlr dyn_filter

  • ut_1
  • ut_2

in

WORK() { /* dyn_filter.c */ flg = ctlr.next() cnt = ctlr.next() if (flg)

  • ut_1.send(treat(cnt))

else for (i in 0:cnt) nxt = in.next()

  • ut_2.send(treat(nxt))

}

Slide 5 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Agenda

1 Debugging Challenges of Dataflow Applications 2 Dataflow-Aware Interactive Debugging 3 Proof of Concept Implementation 4 Case Study: a H.264 Video Decoder 5 Conclusion

Slide 6 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Agenda

1 Debugging Challenges of Dataflow Applications 2 Dataflow-Aware Interactive Debugging 3 Proof of Concept Implementation 4 Case Study: a H.264 Video Decoder 5 Conclusion

Slide 6 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Debugging Challenges of Dataflow Applications

Dataflow applications

Graph-Based Architect. Flow-Fork Instructions Token-Based Execution

pipe pred_controller ipred hwcfg ipf

Single-threaded applications Multi-threaded applications

  • only one execution context
  • multi-sequential execution
  • flat organization:
  • no inter-thread relationship

Slide 7 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Debugging Challenges of Dataflow Applications

Dataflow applications

Graph-Based Architect. Flow-Fork Instructions Token-Based Execution

WORK() { /* dyn_filter.c */ flg = ctlr.next() cnt = ctlr.next() if (flg)

  • ut_1.send(treat(cnt))

else for (i in 0:cnt) nxt = in.next()

  • ut_2.send(treat(nxt))

}

⇐ = after this instruction:

  • dyn_filr continues
  • out_1 can run

ctlr dyn_filter

  • ut_1
  • ut_2

in

Single-threaded applications Multi-threaded applications

  • %PC sequential execution
  • simple flow-ctrl mechanisms:
  • functions, if-else, loops

Slide 7 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Debugging Challenges of Dataflow Applications

Dataflow applications

Graph-Based Architect. Flow-Fork Instructions Token-Based Execution

  • no function calls
  • only async. filter activation
  • tokens exchanged among filters
  • filter execution conditioned by

input tokens generation

ipred hwcfg pipe

1 1

Single-threaded applications Multi-threaded applications

  • %PC sequential execution
  • simple flow-ctrl mechanisms:
  • functions, if-else, loops

Slide 7 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Debugging Challenges of Dataflow Applications

Example

pipe pred_controller ipred hwcfg (asleep) ipf

  • The application is frozen, how can GDB help us?
  • red filters are starving, waiting for data from the red link
  • filter hwcfg was not scheduled for execution by pred_controller
  • hint: not much!

Slide 8 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Debugging Challenges of Dataflow Applications

Example

pipe pred_controller ipred hwcfg (asleep) ipf

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

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

Slide 9 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Debugging Challenges of Dataflow Applications

Example

pipe pred_controller ipred hwcfg (asleep) 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_command_completion(struct ... *) #3 0x0809596e in pred_controller_work_function() #4 0x08095cbc in entry(int, char**) () #5 0x0809740a in host_launcher_entry_point () #6 0xf7fc9aff in start_thread ()

Slide 10 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Debugging Challenges of Dataflow Applications

Example

pipe pred_controller ipred hwcfg (asleep) ipf

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=0xa0a0d18) #4 0x080bec81 in sc_core::sc_process_b::semantics (this=0xa0a3598) #5 0x080c12f0 in sc_core::sc_thread_cor_fn (arg=0xa0a3598) #6 0x08111831 in sc_core::sc_cor_qt_wrapper (...)

Slide 11 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Debugging Challenges of Dataflow Applications

Objective

Provide debugger users with means to better understand the state of the dataflow execution and easily reach key transition events.

Slide 12 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Agenda

1 Debugging Challenges of Dataflow Applications 2 Dataflow-Aware Interactive Debugging 3 Proof of Concept Implementation 4 Case Study: a H.264 Video Decoder 5 Conclusion

Slide 12 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Idea: Integrate dataflow programming model concepts in interactive debugging

Slide 13 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Application State

  • model the application as a graph
  • view token distribution
  • sent/received counters on filter interfaces
  • filter state: blocked waiting for more data? deadlocked ?

pipe pred_controller ipred hwcfg ipf

Slide 14 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Application State

  • model the application as a graph
  • view token distribution
  • sent/received counters on filter interfaces
  • filter state: blocked waiting for more data? deadlocked ?

pipe pred_controller ipred hwcfg ipf

1 1 2 3

Slide 14 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Application State

  • model the application as a graph
  • view token distribution
  • sent/received counters on filter interfaces
  • filter state: blocked waiting for more data? deadlocked ?

pipe pred_controller ipred hwcfg ipf

10 20 10

Slide 14 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Application State

  • model the application as a graph
  • view token distribution
  • sent/received counters on filter interfaces
  • filter state: blocked waiting for more data? deadlocked ?

pipe pred_controller ipred hwcfg (asleep) ipf

Slide 14 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Application State

  • model the application as a graph
  • view token distribution
  • sent/received counters on filter interfaces
  • filter state: blocked waiting for more data? deadlocked ?

pipe pred_controller ipred hwcfg ipf

Slide 14 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control

Catchpoints on dataflow events:

  • filter is activated or terminates
  • token generation/consumption
  • and allow conditional stops with token inspection

pipe pred_controller ipred hwcfg ipf

Slide 15 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control

Catchpoints on dataflow events:

  • filter is activated or terminates
  • token generation/consumption
  • and allow conditional stops with token inspection

pipe pred_controller ipred hwcfg ipf

Slide 15 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control

Catchpoints on dataflow events:

  • filter is activated or terminates
  • token generation/consumption
  • and allow conditional stops with token inspection

pipe pred_controller ipred hwcfg ipf

break

Slide 15 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control

Catchpoints on dataflow events:

  • filter is activated or terminates
  • token generation/consumption
  • and allow conditional stops with token inspection

pipe pred_controller ipred hwcfg ipf

1

Slide 15 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control

Catchpoints on dataflow events:

  • filter is activated or terminates
  • token generation/consumption
  • and allow conditional stops with token inspection

pipe pred_controller ipred hwcfg ipf

1 break

Slide 15 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control

Catchpoints on dataflow events:

  • filter is activated or terminates
  • token generation/consumption
  • and allow conditional stops with token inspection

pipe pred_controller ipred hwcfg ipf

1 1

Slide 15 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control

Catchpoints on dataflow events:

  • filter is activated or terminates
  • token generation/consumption
  • and allow conditional stops with token inspection

pipe pred_controller ipred hwcfg ipf

1 1 break

Slide 15 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control

Catchpoints on dataflow events:

  • filter is activated or terminates
  • token generation/consumption
  • and allow conditional stops with token inspection

pipe pred_controller ipred hwcfg ipf

1 1 1

Slide 15 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control

Catchpoints on dataflow events:

  • filter is activated or terminates
  • token generation/consumption
  • and allow conditional stops with token inspection

pipe pred_controller ipred hwcfg ipf

1 1 1 break

Slide 15 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control / Step-by-step

  • token exchange ⇐

⇒ function calls

pipe pred_controller ipred hwcfg ipf

Slide 16 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control / Step-by-step

  • token exchange ⇐

⇒ function calls

pipe pred_controller ipred hwcfg ipf

Z

Slide 16 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control / Step-by-step

  • token exchange ⇐

⇒ function calls

pipe pred_controller ipred hwcfg ipf

Z

Slide 16 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control / Step-by-step

  • token exchange ⇐

⇒ function calls

pipe pred_controller ipred hwcfg ipf

Z

Slide 16 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Flow Control / Step-by-step

  • token exchange ⇐

⇒ function calls

pipe pred_controller ipred hwcfg ipf

Z

Slide 16 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Dataflow-Aware Interactive Debugging

Integrate dataflow programming model concepts in interactive debugging

Two-level Debugging

  • source-code and symbol breakpoints
  • line-by-line
  • watchpoints, processor inspection, etc.

(gdb) next (gdb) step (gdb) break $pc + 0x45F (gdb) break hwcfgFilter.c:27 if *mbType != 0xFFFFFFFF (gdb) watch *pedf.attr.cHwcfgQuant

Slide 17 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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 Debugging Challenges of Dataflow Applications 2 Dataflow-Aware Interactive Debugging 3 Proof of Concept Implementation 4 Case Study: a H.264 Video Decoder 5 Conclusion

Slide 17 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Proof-of-concept environment

Platform 2012

ST/CEA MPSoC research platform

  • Heterogeneous
  • 4x16 CPU OS-less comp. fabric

Slide 18 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Proof-of-concept environment

Dataflow Programming Model

  • Predicated Execution DataFlow
  • Dataflow framework for H.265

Platform 2012

ST/CEA MPSoC research platform

  • Heterogeneous
  • 4x16 CPU OS-less comp. fabric

Slide 18 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Proof-of-concept environment

The Gnu Debugger

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

Dataflow Programming Model

  • Predicated Execution DataFlow
  • Dataflow framework for H.265

Platform 2012

ST/CEA MPSoC research platform

  • Heterogeneous
  • 4x16 CPU OS-less comp. fabric

Slide 18 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Proof-of-concept environment

The Gnu Debugger

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

Dataflow Programming Model

  • Predicated Execution DataFlow
  • Dataflow framework for H.265

Platform 2012

ST/CEA MPSoC research platform

  • Heterogeneous
  • 4x16 CPU OS-less comp. fabric

Slide 18 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Proof of Concept Implementation

Work with framework events

⇒ Detect and interpret key events in the programming framework

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Agenda

1 Debugging Challenges of Dataflow Applications 2 Dataflow-Aware Interactive Debugging 3 Proof of Concept Implementation 4 Case Study: a H.264 Video Decoder 5 Conclusion

Slide 19 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Case Study: a H.264 Video Decoder

Overview

  • dynamic dataflow application
  • exploit P2012 heterogeneous capabilities
  • eventually, filters ⇒ HW accelerators

front pred front_controller bh imvp pred_controller red pipe ipred hwcfg 3 ipf 4 2

H.264 logo by http://bullboykennels.deviantart.com Slide 20 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Case Study: a H.264 Video Decoder

Application State

  • Model the application as a graph
  • View token distribution

pred pred_controller pipe ipred hwcfg 3 ipf 4 2

(gdb) info connections pipe #tk #interface #remote itf #remote filter Red2PipeLumaDC_in < Red2PipeLumaDC_out front.red (3) HwcfgQuant_in < pipe_HwcfgQuant_out hwcfg Pipe2AddCrMB_out > Pipe2AddCrMB_in ipred (2) LumaCBF_out > LumaCBF_in ipf

Slide 21 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Case Study: a H.264 Video Decoder

Step-by-step

  • Next token send / received

(gdb) filter pipe next token out ... [Stopped on token enqueued in ‘Pipe2IpredCrMB_out -> ipred’] 120 pedf.io.Pipe2IpredCrMB_out[count++] = *Pipe2IpredCrMB; (gdb) filter ipred next token in ... [Stopped on token received from ‘Pipe2IpredCrMB_in <- pipe’] 204 pedf.data.Pipe2IpredCrMB = pedf.io.Pipe2IpredCrMB_in[count++];

Slide 22 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Case Study: a H.264 Video Decoder

Step-by-step

  • Next token send / received

(gdb) filter pipe next token out ... [Stopped on token enqueued in ‘Pipe2IpredCrMB_out -> ipred’] 120 pedf.io.Pipe2IpredCrMB_out[count++] = *Pipe2IpredCrMB; (gdb) filter ipred next token in ... [Stopped on token received from ‘Pipe2IpredCrMB_in <- pipe’] 204 pedf.data.Pipe2IpredCrMB = pedf.io.Pipe2IpredCrMB_in[count++]; (gdb) filter pipe itf Pipe2IpredCrMB_out follow last

Slide 22 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Agenda

1 Debugging Challenges of Dataflow Applications 2 Dataflow-Aware Interactive Debugging 3 Proof of Concept Implementation 4 Case Study: a H.264 Video Decoder 5 Conclusion

Slide 22 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Conclusion

  • Debugging complex applications is challenging
  • Lack of high level information about programming frameworks
  • Our work: bring debuggers closer to dataflow programming models
  • Better understanding application behavior
  • Keep programmers focused on bug tracking

Slide 23 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Conclusion

  • Debugging complex applications is challenging
  • Lack of high level information about programming frameworks
  • Our work: bring debuggers closer to dataflow programming models
  • Better understanding application behavior
  • Keep programmers focused on bug tracking
  • Proof-of-concept
  • P2012 dataflow programming environment
  • component debugging published earlier
  • different models, same approach

⇒ first step towards programming-model centric debugging

  • GDB and its Python interface
  • missing hooks contributed to the project

Slide 23 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Conclusion

  • Debugging complex applications is challenging
  • Lack of high level information about programming frameworks
  • Our work: bring debuggers closer to dataflow programming models
  • Better understanding application behavior
  • Keep programmers focused on bug tracking
  • Proof-of-concept
  • P2012 dataflow programming environment
  • component debugging published earlier
  • different models, same approach

⇒ first step towards programming-model centric debugging

  • GDB and its Python interface
  • missing hooks contributed to the project
  • Going further with programming-model aware debugging
  • GPU computing, OpenCL API
  • Visualization to aid in understanding app. behavior

Slide 23 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013

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

Thanks for your attention

Slide 24 — kevin.pouget@st.com — Dynamic Dataflow Applications Debugging — HIPS’13, Boston, USA — May 20th 2013