profiling for Coldfire

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

profiling for Coldfire

2,579 次查看
king
Contributor I
I tried to do profiling in CodeWarrior for a Coldfire platform, with simulator only. What I did is, added files timer.c, timer_simulator.c, Profiler.h, ProfilerTimer.h, ProfilerLibrary_4i_CF_Runtime.a to the project, and added the following lines to a C file:
   #include "Profiler.h"
   ProfilerInit(collectDetailed, bestTimeBase,3,3);
   ProfilerClear();
   ProfilerSetStatus(1);
   Function();
   ProfilerSetStatus(0);
   ProfilerDump("profiledump");
   ProfilerTerm();
 
The profile output profiledump is empty. What did I miss?
Thanks.
 
King
标签 (1)
标记 (1)
0 项奖励
回复
1 回复

959 次查看
CrasyCat
Specialist III
Hello
I assume you are using CodeWarrior for Coldfire V6.2. Am I right?
There is an example of profiler project in
     {Install}\(CodeWarrior_Examples)\SimpleProfiler
Just open the project SimpleProfiler.mcp and select the Build target "Profiler (5272 - Simulator)". This should be working.
 
Check in your project what you did do differently.
Make sure to check the box "Generate Code for Profiling" in the "Coldfire Processor" configuration Panel.
 
I hope this helps.
 
CrasyCat
0 项奖励
回复