how does tha stack analyser utility works in vxworks? - VxWorks

This is a discussion on how does tha stack analyser utility works in vxworks? - VxWorks ; how does tha stack analyser utility works in vxworks? I want to know the working of a stack analyser that checks the worst case stack utilization in a real time environment.....

+ Reply to Thread
Results 1 to 2 of 2

Thread: how does tha stack analyser utility works in vxworks?

  1. how does tha stack analyser utility works in vxworks?

    how does tha stack analyser utility works in vxworks?
    I want to know the working of a stack analyser that checks the worst
    case stack utilization in a real time environment..

  2. Re: how does tha stack analyser utility works in vxworks?

    pssreek@gmail.com wrote:
    > how does tha stack analyser utility works in vxworks?
    > I want to know the working of a stack analyser that checks the worst
    > case stack utilization in a real time environment..


    You don't mention what version of vxWorks so I'll answer for vxWorks 5.X
    and older which may or may not be true for all/any cases in vxWorks 6
    or higher as I have not looked.

    In the older vxWorks versions you could spawn a task with an option
    called something like (not at desk) VX_STACK_FILL that initializes the
    tasks stack to some known value (forget but I think it is 0xff's)

    Then the code that looks for worst case (so far) stack usage simply
    looks for where the 0xff's stop.

    This has some limitations including that what you are getting is worst
    case *so far* usage rather than (sometimes) actual worst case.

    I know for Ada (at least GNAT) there are tools like gnatstack that can
    statically determine (offline on host machine) what the actual worst
    case stack usage will be at runtime (and/or tell you that your worst
    case stack usage can't be statically known).

    Not sure if recent vxWorks versions have that feature for other languages...

+ Reply to Thread