programming model centric debugging for multicore
play

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


  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 Background: MPSoC Programming and Debugging Programming Models for Sthorm MPSoC Components Dataflow Kernels • code/data encapsulation • software reuse • service contracts (language-free interfaces) Type 1 interface component 2a Type 2 interface «Runnable» interface component 1 component 2b component 3 Interface not connected Slide 8 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 Background: MPSoC Programming and Debugging Programming Models for Sthorm MPSoC Components Dataflow Kernels • emphasis put on the stream of data • implicit parallelism • roots in graph theory actor 1 actor 3 actor 4 actor 2 Slide 8 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 Background: MPSoC Programming and Debugging Programming Models for Sthorm MPSoC Components Dataflow Kernels • data parallelism • massively parallel • work offloaded to accel- erator (GPU/ Sthorm ) buffer a buffer b1 kernel 2 kernel 3 kernel 1 Slide 8 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 Programming Models for Sthorm MPSoC Components Dataflow Kernels • code/data encapsulation • emphasis put on the • data parallelism stream of data • software reuse • massively parallel • implicit parallelism • service contracts • work offloaded to accel- • roots in graph theory (language-free interfaces) 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 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Write Validate the Execute code results Pre-Execution Live Post-Mortem Analysis Debugging Debugging Slide 9 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Write Validate the Execute code results Pre-Execution Live Post-Mortem Analysis Debugging Debugging 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 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Write Validate the Execute code results Pre-Execution Live Post-Mortem Analysis Debugging Debugging 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 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Write Validate the Execute code results Pre-Execution Live Post-Mortem Analysis Debugging Debugging Static / Formal Analysis Trace Analysis + May be exhaustive • Manual/data-mining • synchronous dataflow + long/time critical run − Not always feasible • What to trace? • dynamic behaviors - fixed # of trace-points Slide 9 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Interactive Debugging • Developers mental representation VS . actual execution • Understand the different steps of the execution • Instruction breakpoints • Step-by-step execution • Source code or assembly level • Memory watchpoints • Memory and processor inspection • Event catchpoints push push Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Interactive Debugging • Developers mental representation VS . actual execution • Understand the different steps of the execution • Instruction breakpoints • Step-by-step execution • Source code or assembly level • Memory watchpoints • Memory and processor inspection • Event catchpoints What about the Supportive Environment? push push Slide 10 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Interactive Debugging • Developers mental representation VS . actual execution • Understand the different steps of the execution • Instruction breakpoints • Step-by-step execution • Source code or assembly level • Memory watchpoints • Memory and processor inspection • Event catchpoints 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 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Interactive Debugging • Developers mental representation VS . actual execution • Understand the different steps of the execution • Instruction breakpoints • Step-by-step execution • Source code or assembly level • Memory watchpoints • Memory and processor inspection • Event catchpoints 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 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Interactive Debugging • Developers mental representation VS . actual execution • Understand the different steps of the execution • Instruction breakpoints • Step-by-step execution • Source code or assembly level • Memory watchpoints • Memory and processor inspection • Event catchpoints 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 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Interactive Debugging • Developers mental representation VS . actual execution • Understand the different steps of the execution • Instruction breakpoints • Step-by-step execution • Source code or assembly level • Memory watchpoints • Memory and processor inspection • Event catchpoints 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 3 rd , 2014

  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 Tools and Techniques, Advantages of Interactive Debugging Interactive Debugging • Developers mental representation VS . actual execution • Understand the different steps of the execution • Instruction breakpoints • Step-by-step execution • Source code or assembly level • Memory watchpoints • Memory and processor inspection • Event catchpoints 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 hwcfg ipred pipe ipf pred_controller red bh front_controller imvp pushpushpushpush Graph of a dataflow from the case-study Slide 13 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 X actor 3 actor 4 Catch all actor 2 messages Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 X actor 3 actor 4 Catch all actor 2 messages Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 break actor 3 actor 4 Catch all actor 2 messages Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 X actor 3 actor 4 Catch all actor 2 messages Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 break X actor 3 actor 4 Catch all actor 2 messages Slide 14 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 ipred hwcfg pipe ipf cycles in the graph of blocking communications = ⇒ deadlock Slide 17 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 Capture Mechanism Evaluation and Alternatives Breakpoints and Debug Information Capturable Info. High Execution Overhead Significant Cooperation btw. None Debug and Env. Portability Low Slide 21 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 Capture Mechanism Evaluation and Alternatives Breakpoints Preloaded and Debug Library Information Capturable Info. High Limited to API Execution Overhead Significant Limited Cooperation btw. Low None Debug and Env. Portability Low Very Good Slide 21 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 Capture Mechanism Evaluation and Alternatives Breakpoints Specialized Preloaded and Debug Debug Library Information Module Capturable Info. High Limited to API Full Execution Overhead Significant Limited Limited Cooperation btw. Low Strong None Debug and Env. Vendor Portability Low Very Good Specific Slide 21 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 mcGDB Case-Studies A PEDF Dataflow H.264 Video Decoder logo by bullboykennels Dataflow Environment (PEDF) • Dynamic dataflow programming • Flexible video decoding standard • for HD television, blu-ray disks, • Good for multimedia application broadcast, telephony, . . . • No verification/validation help • Good dataflow decomposition • Heterogeneous computing: • Developed to validate PEDF design • actors ⇒ HW accelerators Slide 22 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 ipf hwcfg pipe (static graph provided by the compiler) Slide 23 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 mcGDB Case-Studies: A PEDF Dataflow H.264 Video Decoder The application is frozen, how can GDB help us? pred_controller ipred ipf hwcfg pipe (gdb) info threads Id Target Id Frame 1 Thread 0xf7e77b 0xf7ffd430 in __kernel_vsyscall () * 2 Thread 0xf7e797 operator= (val=..., this=0xa0a1330) Slide 23 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 mcGDB Case-Studies: A PEDF Dataflow H.264 Video Decoder The application is frozen, how can GDB help us? pred_controller ipred ipf hwcfg pipe (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 3 rd , 2014

  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 mcGDB Case-Studies: A PEDF Dataflow H.264 Video Decoder The application is frozen, how can GDB help us? pred_controller ipred ipf X hwcfg pipe (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 3 rd , 2014

  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 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 ipf hwcfg pipe z • pipe, ipred and ipf are blocked • hwcfg is asleep Slide 23 — Kevin Pouget — Programming-Model Centric Debugging — Thesis Defense, Grenoble — February 3 rd , 2014

  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 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 ipf hwcfg pipe z (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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

  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 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 3 rd , 2014

Recommend


More recommend