[SOLVED] J-Trace and Ozone capabilities for function execution time

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] J-Trace and Ozone capabilities for function execution time

    Hello everyone,

    first time user of the J-Trace Pro and Ozone. I am looking into how to measure execution time of functions.
    Now what i was able to do until now is to record the timeline and export the code profile where you can see the instructions per functions.
    As i understood, ozone calculates the execution time purely on an average instruction time and instructions per function.

    Is measuring the actual time not purely based on the instructions also possible?
    Estimating execution time on instructions is fine for some applications but for dynamic communication it depends on the amount of data that is exchanged.
    I found seggers systemview tool which should be capable from its description but J-Trace might also be enough at least in my case.

    Any help is appreciated thanks :)
  • Hi scal8,

    if you want to be quite exact, SystemView is your solution. In SystemView upon every monitored event a time stamp is generated.

    When using instruction trace, however, a time stamp is generated only every now and then. Ozone cannot do better than interpolate between two time stamps based on the instructions executed in the meantime. You may adjust the frequency at which the trace unit generates time stamps. For details on this please refer to this article in our knowledge base: kb.segger.com/J-Link_Command_S…CE_SetEnableITMTimestamps. Maybe this improves your measurements to an acceptable level. Please note that the time stamps share the same very limited bandwidth used for instruction tracing, so the additional load might lead to data loss and therefore gaps in your trace.

    When it comes to measuring execution time of a function you may also wish to export the instruction trace window and do some post processing based on that file. If you know the addresses of the entry point and the exit point(s) of a function you may search for those addresses in the trace and based on the time stamp information calculate the time spent in-between.

    Best regards
    -- AlexD
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi scal8,
    good to see you are up and running again.
    Best regards
    -- AlexD
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.