This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to get CPU cycles of a function using DS5 (or Streamline)?

Hello, I'm trying to optimize some functions in ARM Cortex A9 architecture. Now, I want to judge whether the optimization is valid by reading and comparing the executed CPU cycles. But I can't find some tools in DS-5 to do this job. Could you give me some suggestion?

Parents
  • By default DS-5 is a time-based profile - so it takes samples of the program counter every 1ms, and over a period of many samples it can build up a statistical picture of what the program is doing, and where the CPU time is being spent. The tool doesn't report cycles - it reports load in each function as a percentage of runtime. If you optimize a function which was taking 5% of run-time and after modification it takes 2% of run-time then you have made it faster.

    You get the best view of the data if you enable call chains (compile with -g -fno-omit-frame-pointer) and enable stack unwinding in the target configuration dialog of DS-5 Streamline.

    HTH,
    Pete

Reply
  • By default DS-5 is a time-based profile - so it takes samples of the program counter every 1ms, and over a period of many samples it can build up a statistical picture of what the program is doing, and where the CPU time is being spent. The tool doesn't report cycles - it reports load in each function as a percentage of runtime. If you optimize a function which was taking 5% of run-time and after modification it takes 2% of run-time then you have made it faster.

    You get the best view of the data if you enable call chains (compile with -g -fno-omit-frame-pointer) and enable stack unwinding in the target configuration dialog of DS-5 Streamline.

    HTH,
    Pete

Children