SlideShare a Scribd company logo
XDS560 Trace Daniel Rinkes Texas Instruments [email_address] Advanced Use Cases for Profiling
Agenda AET / XDS560Trace Overview  Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
Agenda AET / XDS560Trace Overview  Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
What is AET / XDS560 Trace XDS560 Trace Allows Cycle Accurate Logging of CPU Address Bus and Data Bus Activity Non-Intrusively, in Real Time Advanced Event Triggering (AET) is logic that allows us to smartly turn trace on in interesting locations and off in non-interesting locations so as to preserve the trace buffer for interesting data
XDS560 Trace Architecture Additional JTAG Emulation Pins DATA ADDRESS BUSSES  DATA BUSSES  PROGRAM BUS DSP XDS560T POD CPU XDS560T POD RECORDING UNIT Current Buffer Size: 224K Future: 64 MB To/from host PC Trace & AET Jobs Comparators Compressor Cycle counter
Required Software and Hardware 60 Pin emulation header Target must support Trace (Full-Gem) Blackhawk USB 560 XDS560T Trace Pod/Cable CCS 3.30 or higher
64x+ Device Support For Trace SUPPORT TRACE C6455 C6488 DM647/DM648 DO NOT SUPPORT TRACE DM6443/DM6446 Any LC Device
Agenda AET / XDS560Trace Overview  Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
Interrupt Profiling Overview Capture Program Address and Timestamp whenever the PC is within the Interrupt Vector Table Generate a cycle accurate picture of when each interrupt starts executing Graphically display interrupt cycle accurate interrupt servicing frequency
102462 102463 Cycle Count 102456 102457 102458 102459 102460 102461 Trace Log PC Cycles 0x00897C68 102458 0x00897C64 102457 0x00897C6C 102459 0x00897C70 102460 0x00897C74 102461 0x00897C78 102462 0x00897C7C 102463 0x00897C60 102456
Data Captured Raw Trace Data Processed Data
Results
Results - 2
Agenda AET / XDS560Trace Overview  Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
Statistical Profiling GOAL Get a quick overall view of which functions in an application consume the most cycles Sampling every Program Counter in an application quickly consumes Trace Buffer Bandwidth, preventing analysis of the entire application We can eliminate this problem by only capturing a statistical sample of application execution
Statistical Profiling Overview The Program Address is sampled at regular intervals Statistical Analysis is performed on the captured samples As in any statistical analysis, the determinations made on the statistical sample can be related to the general population
Statistical Profiling - 2 AET contains all of the hardware needed to capture trace samples at a specified interval Interval should be carefully chose so as not to coincide with a periodic function Application instrumentation can switch AET off in locations that are not of interest
Statistical Profiling - Results Comma Separated Value Format Sorted from most intensive functions to least
Agenda AET / XDS560Trace Overview  Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
Thread Aware Profiling GOAL Generate a cycle accurate execution graph of a Thread/Task based application
Solution Instrument the task/thread switch function to write the task/thread ID to a well known location (global variable) Operating systems typically provide hooks to insert functions in this location Trace all of the writes to that location, and get a timestamp with each.
Results
Agenda AET / XDS560Trace Overview  Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
Thread Aware Dynamic Call Graph GOAL Display a Thread Based representation of actual function execution in an application
Capturing the Data Thread/Task Hook function writes address of task Function Entry/Exit points instrumented with Mark 0/ Mark 1 instructions* Mark 0 inlined at each function entry point Mark 1 inlined at each function exit point Trace captures each of these locations with timestamp * CGT 6.0.1 enables function hooks
Presentation Graphical Displays become impractical as the number of functions increase At right is a sample call graph displayed by the Guess graphing package
GPROF Like Format Modeled after Unix GPROF Each Thread separated into it’s own subsection Each function section contains only immediate callers and callees
A Closer Look Primary Line - describes the function which the entry is about and gives the overall statistics for this function  Lines for a Functions Callers Lines for a Functions Callees
Future Display – Tree View Thread: 0x828194 _DEC_tcp2DeintUnpunctsoft3 _DEC_tcp2QuantizeSoft _DEC_tcp2PreProc _varianceEstim _COM_spoolTsk _COM_spoolPost _DEC_tcp2EdmaIsr _DEC_tcp2DeintUnpunctsoft3 Callers Callees _DEC_tcp2DeintUnpunctsoft3 Callers _DEC_tcp2PreProc Calls = 388/388 Exclusive Cycles = 14491050
Questions?
Backup Material
Comparison vs. Traditional The Results of the statistical profile tend to approximate those found using traditional profiling.
Advanced Event Triggering Overview
Use Case Examples Simple Read/Write Data Location Read/Write Data Range Specific Value Read/Write to/from Specific Location Medium Read/Write to location A, but only after executing instruction B Complex Read/Write to location A, but only after executing instruction B at least 20 times CPU Halt Interrupt Start/Advance Counter Stop/Reload Counter Start Trace Store Trace Sample End Trace External Trigger (EMU 0/1) State Transition
AET Target LIbrary What is it? A Target Library to allow programming of AET resources from the target application Advantages over CCS AET Plug-in? Context based control of where AET is enabled/disabled Ability to reallocate AET resources on the fly Some functionality not inherently contained in the plug-in Disadvantages Some Application cycles consumed Some Application footprint used
Use Case Consider: Thread based application crashing because of a suspected overflow of one of the task stacks. Would like to use AET to monitor the top of the task stacks and generate an interrupt when we get too close to the top Problems All of the threads are dynamically created at run time, so there’s no way to know where the top of the dynamically allocated stack will be located at load time. There are numerous threads, and AET resources are consumed by ONE “Watchpoint In Range” job
Solution Use the AET Target Library All Operating Systems (DSP/Bios, OSE, etc) have a thread switch function that occurs when switching tasks.  The user can place code in this hook that gets executed every time a thread switches context. In this function, program AET to watch the top of the stack of the  NEXT  thread. Every subsequent time that the thread is switched, delete the old AET job, and program a new one.
Solution - 2 What does this accomplish? Reuse of resources By removing the prior AET job, you are reclaiming the resources (trigger builder and comparators) that were used. Additionally, AET is only watching the  CURRENT  stack at a given time.  Thus we’re able to manage with the 4 data comparators that are available. Dynamic Task Location By programming AET at run time, we can know where the dynamically allocated tasks are placing their stack.  This method also works perfectly well for statically allocated tasks.

More Related Content

PPT
Real time-embedded-system-lec-07
University of Computer Science and Technology
 
PPT
Real time-embedded-system-lec-06
University of Computer Science and Technology
 
PDF
Data Analytics and Simulation in Parallel with MATLAB*
Intel® Software
 
PPTX
Floating point ALU using VHDL implemented on FPGA
Azhar Syed
 
PPTX
Optimized Floating-point Complex number multiplier on FPGA
Dr. Pushpa Kotipalli
 
PPT
On Applying Or-Parallelism and Tabling to Logic Programs
Lino Possamai
 
PPTX
(Recursion)ads
Ravi Rao
 
PDF
Dsp lab pdf
shareslidesplease
 
Real time-embedded-system-lec-07
University of Computer Science and Technology
 
Real time-embedded-system-lec-06
University of Computer Science and Technology
 
Data Analytics and Simulation in Parallel with MATLAB*
Intel® Software
 
Floating point ALU using VHDL implemented on FPGA
Azhar Syed
 
Optimized Floating-point Complex number multiplier on FPGA
Dr. Pushpa Kotipalli
 
On Applying Or-Parallelism and Tabling to Logic Programs
Lino Possamai
 
(Recursion)ads
Ravi Rao
 
Dsp lab pdf
shareslidesplease
 

What's hot (20)

PPTX
Introduction to theano, case study of Word Embeddings
Shashank Gupta
 
PPT
Pointer
manish840
 
PPT
Coding style for good synthesis
Vinchipsytm Vlsitraining
 
PDF
IRJET - Design and Implementation of FFT using Compressor with XOR Gate Topology
IRJET Journal
 
PPT
Fpga 11-sequence-detector-fir-iir-filter
Malik Tauqir Hasan
 
PPTX
64 BIT FPU
Surendra Bommavarapu
 
PDF
Combining out - of - band monitoring with AI and big data for datacenter aut...
Ganesan Narayanasamy
 
PPTX
Datapath design
Md Nazmul Hossain Mir
 
PPTX
Datapath Design of Computer Architecture
Abu Zaman
 
PPT
Branch prediction
Aneesh Raveendran
 
PPT
Pipelining and co processor.
Piyush Rochwani
 
PPTX
Clone cloud
Bhagavathi Dhass
 
PPT
Synthesis
dennis gookyi
 
PPSX
Dsp Datapath
Abhishek Tiwari
 
PDF
Dsp lab manual 15 11-2016
Gopinath.B.L Naidu
 
PDF
IRJET- A Review on Single Precision Floating Point Arithmetic Unit of 32 Bit ...
IRJET Journal
 
PPT
MICROPROCESSOR
fakirmalamgir
 
PDF
Modeling and Real-Time Simulation of Induction Motor Using RT-LAB
International Journal of Power Electronics and Drive Systems
 
PPTX
Data flow architecture
Sourav Routh
 
PDF
IRJET- A Study on Algorithms for FFT Computations
IRJET Journal
 
Introduction to theano, case study of Word Embeddings
Shashank Gupta
 
Pointer
manish840
 
Coding style for good synthesis
Vinchipsytm Vlsitraining
 
IRJET - Design and Implementation of FFT using Compressor with XOR Gate Topology
IRJET Journal
 
Fpga 11-sequence-detector-fir-iir-filter
Malik Tauqir Hasan
 
Combining out - of - band monitoring with AI and big data for datacenter aut...
Ganesan Narayanasamy
 
Datapath design
Md Nazmul Hossain Mir
 
Datapath Design of Computer Architecture
Abu Zaman
 
Branch prediction
Aneesh Raveendran
 
Pipelining and co processor.
Piyush Rochwani
 
Clone cloud
Bhagavathi Dhass
 
Synthesis
dennis gookyi
 
Dsp Datapath
Abhishek Tiwari
 
Dsp lab manual 15 11-2016
Gopinath.B.L Naidu
 
IRJET- A Review on Single Precision Floating Point Arithmetic Unit of 32 Bit ...
IRJET Journal
 
MICROPROCESSOR
fakirmalamgir
 
Modeling and Real-Time Simulation of Induction Motor Using RT-LAB
International Journal of Power Electronics and Drive Systems
 
Data flow architecture
Sourav Routh
 
IRJET- A Study on Algorithms for FFT Computations
IRJET Journal
 
Ad

Similar to 2007 Tidc India Profiling (20)

PPTX
Dpdk applications
Vipin Varghese
 
PDF
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
Databricks
 
PDF
Taking Spark Streaming to the Next Level with Datasets and DataFrames
Databricks
 
PDF
The CAOS framework: democratize the acceleration of compute intensive applica...
NECST Lab @ Politecnico di Milano
 
PPTX
Microprocessor (1)
Muhd Azlan
 
PPTX
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
Databricks
 
PDF
Cao 2012
Raja Basharat
 
PPT
Jboss World 2011 Infinispan
cbo_
 
PDF
9Tuts.Com New CCNA 200-120 New CCNA New Questions 2
Lori Head
 
PDF
Assembly_80x86- Assembly languages programming and 80x861.pdf
ahmedmohammed246810a
 
PDF
Intelligent Monitoring
Intelie
 
PPTX
Performance and Power Profiling on Intel Android Devices
Intel® Software
 
PDF
ASIC DESIGN OF MINI-STEREO DIGITAL AUDIO PROCESSOR UNDER SMIC 180NM TECHNOLOGY
Ilango Jeyasubramanian
 
PDF
Cooperative Task Execution for Apache Spark
Databricks
 
PPT
Low cost embedded system
ece svit
 
PDF
User-space Network Processing
Ryousei Takano
 
PPT
Microprocessor Systems and Interfacing Slides
maxpaines2005
 
PDF
Door control embedded system using accelerometer sensor
Vikrant Gupta
 
PDF
Stream Processing Overview
Maycon Viana Bordin
 
PDF
MCSoC'13 Keynote Talk "Taming Big Data Streams"
Hideyuki Kawashima
 
Dpdk applications
Vipin Varghese
 
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das
Databricks
 
Taking Spark Streaming to the Next Level with Datasets and DataFrames
Databricks
 
The CAOS framework: democratize the acceleration of compute intensive applica...
NECST Lab @ Politecnico di Milano
 
Microprocessor (1)
Muhd Azlan
 
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
Databricks
 
Cao 2012
Raja Basharat
 
Jboss World 2011 Infinispan
cbo_
 
9Tuts.Com New CCNA 200-120 New CCNA New Questions 2
Lori Head
 
Assembly_80x86- Assembly languages programming and 80x861.pdf
ahmedmohammed246810a
 
Intelligent Monitoring
Intelie
 
Performance and Power Profiling on Intel Android Devices
Intel® Software
 
ASIC DESIGN OF MINI-STEREO DIGITAL AUDIO PROCESSOR UNDER SMIC 180NM TECHNOLOGY
Ilango Jeyasubramanian
 
Cooperative Task Execution for Apache Spark
Databricks
 
Low cost embedded system
ece svit
 
User-space Network Processing
Ryousei Takano
 
Microprocessor Systems and Interfacing Slides
maxpaines2005
 
Door control embedded system using accelerometer sensor
Vikrant Gupta
 
Stream Processing Overview
Maycon Viana Bordin
 
MCSoC'13 Keynote Talk "Taming Big Data Streams"
Hideyuki Kawashima
 
Ad

Recently uploaded (20)

PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 

2007 Tidc India Profiling

  • 1. XDS560 Trace Daniel Rinkes Texas Instruments [email_address] Advanced Use Cases for Profiling
  • 2. Agenda AET / XDS560Trace Overview Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
  • 3. Agenda AET / XDS560Trace Overview Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
  • 4. What is AET / XDS560 Trace XDS560 Trace Allows Cycle Accurate Logging of CPU Address Bus and Data Bus Activity Non-Intrusively, in Real Time Advanced Event Triggering (AET) is logic that allows us to smartly turn trace on in interesting locations and off in non-interesting locations so as to preserve the trace buffer for interesting data
  • 5. XDS560 Trace Architecture Additional JTAG Emulation Pins DATA ADDRESS BUSSES DATA BUSSES PROGRAM BUS DSP XDS560T POD CPU XDS560T POD RECORDING UNIT Current Buffer Size: 224K Future: 64 MB To/from host PC Trace & AET Jobs Comparators Compressor Cycle counter
  • 6. Required Software and Hardware 60 Pin emulation header Target must support Trace (Full-Gem) Blackhawk USB 560 XDS560T Trace Pod/Cable CCS 3.30 or higher
  • 7. 64x+ Device Support For Trace SUPPORT TRACE C6455 C6488 DM647/DM648 DO NOT SUPPORT TRACE DM6443/DM6446 Any LC Device
  • 8. Agenda AET / XDS560Trace Overview Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
  • 9. Interrupt Profiling Overview Capture Program Address and Timestamp whenever the PC is within the Interrupt Vector Table Generate a cycle accurate picture of when each interrupt starts executing Graphically display interrupt cycle accurate interrupt servicing frequency
  • 10. 102462 102463 Cycle Count 102456 102457 102458 102459 102460 102461 Trace Log PC Cycles 0x00897C68 102458 0x00897C64 102457 0x00897C6C 102459 0x00897C70 102460 0x00897C74 102461 0x00897C78 102462 0x00897C7C 102463 0x00897C60 102456
  • 11. Data Captured Raw Trace Data Processed Data
  • 14. Agenda AET / XDS560Trace Overview Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
  • 15. Statistical Profiling GOAL Get a quick overall view of which functions in an application consume the most cycles Sampling every Program Counter in an application quickly consumes Trace Buffer Bandwidth, preventing analysis of the entire application We can eliminate this problem by only capturing a statistical sample of application execution
  • 16. Statistical Profiling Overview The Program Address is sampled at regular intervals Statistical Analysis is performed on the captured samples As in any statistical analysis, the determinations made on the statistical sample can be related to the general population
  • 17. Statistical Profiling - 2 AET contains all of the hardware needed to capture trace samples at a specified interval Interval should be carefully chose so as not to coincide with a periodic function Application instrumentation can switch AET off in locations that are not of interest
  • 18. Statistical Profiling - Results Comma Separated Value Format Sorted from most intensive functions to least
  • 19. Agenda AET / XDS560Trace Overview Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
  • 20. Thread Aware Profiling GOAL Generate a cycle accurate execution graph of a Thread/Task based application
  • 21. Solution Instrument the task/thread switch function to write the task/thread ID to a well known location (global variable) Operating systems typically provide hooks to insert functions in this location Trace all of the writes to that location, and get a timestamp with each.
  • 23. Agenda AET / XDS560Trace Overview Interrupt Profiling Statistical Profiling Thread Aware Profiling Thread Aware Dynamic Call Graph
  • 24. Thread Aware Dynamic Call Graph GOAL Display a Thread Based representation of actual function execution in an application
  • 25. Capturing the Data Thread/Task Hook function writes address of task Function Entry/Exit points instrumented with Mark 0/ Mark 1 instructions* Mark 0 inlined at each function entry point Mark 1 inlined at each function exit point Trace captures each of these locations with timestamp * CGT 6.0.1 enables function hooks
  • 26. Presentation Graphical Displays become impractical as the number of functions increase At right is a sample call graph displayed by the Guess graphing package
  • 27. GPROF Like Format Modeled after Unix GPROF Each Thread separated into it’s own subsection Each function section contains only immediate callers and callees
  • 28. A Closer Look Primary Line - describes the function which the entry is about and gives the overall statistics for this function Lines for a Functions Callers Lines for a Functions Callees
  • 29. Future Display – Tree View Thread: 0x828194 _DEC_tcp2DeintUnpunctsoft3 _DEC_tcp2QuantizeSoft _DEC_tcp2PreProc _varianceEstim _COM_spoolTsk _COM_spoolPost _DEC_tcp2EdmaIsr _DEC_tcp2DeintUnpunctsoft3 Callers Callees _DEC_tcp2DeintUnpunctsoft3 Callers _DEC_tcp2PreProc Calls = 388/388 Exclusive Cycles = 14491050
  • 32. Comparison vs. Traditional The Results of the statistical profile tend to approximate those found using traditional profiling.
  • 34. Use Case Examples Simple Read/Write Data Location Read/Write Data Range Specific Value Read/Write to/from Specific Location Medium Read/Write to location A, but only after executing instruction B Complex Read/Write to location A, but only after executing instruction B at least 20 times CPU Halt Interrupt Start/Advance Counter Stop/Reload Counter Start Trace Store Trace Sample End Trace External Trigger (EMU 0/1) State Transition
  • 35. AET Target LIbrary What is it? A Target Library to allow programming of AET resources from the target application Advantages over CCS AET Plug-in? Context based control of where AET is enabled/disabled Ability to reallocate AET resources on the fly Some functionality not inherently contained in the plug-in Disadvantages Some Application cycles consumed Some Application footprint used
  • 36. Use Case Consider: Thread based application crashing because of a suspected overflow of one of the task stacks. Would like to use AET to monitor the top of the task stacks and generate an interrupt when we get too close to the top Problems All of the threads are dynamically created at run time, so there’s no way to know where the top of the dynamically allocated stack will be located at load time. There are numerous threads, and AET resources are consumed by ONE “Watchpoint In Range” job
  • 37. Solution Use the AET Target Library All Operating Systems (DSP/Bios, OSE, etc) have a thread switch function that occurs when switching tasks. The user can place code in this hook that gets executed every time a thread switches context. In this function, program AET to watch the top of the stack of the NEXT thread. Every subsequent time that the thread is switched, delete the old AET job, and program a new one.
  • 38. Solution - 2 What does this accomplish? Reuse of resources By removing the prior AET job, you are reclaiming the resources (trigger builder and comparators) that were used. Additionally, AET is only watching the CURRENT stack at a given time. Thus we’re able to manage with the 4 data comparators that are available. Dynamic Task Location By programming AET at run time, we can know where the dynamically allocated tasks are placing their stack. This method also works perfectly well for statically allocated tasks.