Profiler stuck in ReturnHook function

Sysprogs forums Forums VisualGDB Profiler stuck in ReturnHook function

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31048
    curtis.hendrix
    Participant

    I’m trying to profile my firmware, and the firmware falls into a loop in the profiler.  The call stack only goes back to SysprogsInstrumentingProfiler::ReturnHook.

    It appears to be a problem with interrupts.  I have a SysTick interrupt and an ADC interrupt.  SysTick goes off every millisecond.  The ADC triggers every 50µsec.  The profiler works when all interrupts are disabled.

    Attachments:
    You must be logged in to view attached files.
    #31050
    curtis.hendrix
    Participant

    This appears to be an issue only when the SysTick handler is instrumented for profiling.

    #31055
    support
    Keymaster

    Hi,

    Instrumenting functions for profiling changes their timing and also increases the stack footprint (the code that outputs profiling information takes extra time and requires non-trivial amounts of stack). Most likely, in your scenario this triggers a stack overflow, or makes the interrupt handler run longer than the period between the interrupts.

    Unfortunately, there is no fully automated way to troubleshoot such issues. Our best advice would be to try excluding some functions from instrumentation, and to experiment with increasing the stack size and decreasing the complexity of the affected functions.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.