| ??? 08/01/05 09:21 Read: times |
#98560 - The compiler knows Responding to: ???'s previous message |
Andy, I didn't know what's the proper name - profiler then, thank you. I have not seen any, is it standalone or integrated with the compiler/linker/whatever other tool?
But if there is none available for '51, I will return to my original idea: Andy Neil said:
There is absolutely no guarantee whatsoever that any particular sequence of source statements will generate any specific set of machine instructions; therefore it is impossible to predict execution timings from 'C' source code. My point is, the compiler knows what is the source/it's "fundamental" blocks and the corresponding assembler output so the compiler is the best place where I would expect to such "profiling" should be integrated into. Of course it is far from being straighforward, of course, but provide at least some baseline tool - anyway, cycle counting will apply only to a couple of limited cases, usually to a short fragment of code (e.g. timer ISR). Andy Neil said: As I can use any other simulator/debugger for the same task; but here the major drawback is, that you need to perform the simulation/cycle counting each time whan you recompile, while the integrated "profiler" will return the up-to-date result upon each compilation.
Although not automated, you could use the Performance Analyser in Keil's simulator/debugger to do this manually. Jan Waclawek |
| Topic | Author | Date |
| Counting cycles... possible in C? | 01/01/70 00:00 | |
| You need a Profiler | 01/01/70 00:00 | |
| The compiler knows | 01/01/70 00:00 | |
| Source code useless | 01/01/70 00:00 | |
| That's why you need Assembler! | 01/01/70 00:00 | |
| nohohoho | 01/01/70 00:00 | |
| Speed is not everything! | 01/01/70 00:00 | |
| Cycles vary? | 01/01/70 00:00 | |
| I know | 01/01/70 00:00 | |
| absolutely, but what good does it do | 01/01/70 00:00 | |
| other way round | 01/01/70 00:00 | |
| Yes, the things posted apply in this cas | 01/01/70 00:00 | |
| exactly for this reason | 01/01/70 00:00 | |
| how can you automate that it is small en | 01/01/70 00:00 | |
| Use Microsoft Excel | 01/01/70 00:00 | |
| excel and conditional branches ? | 01/01/70 00:00 | |
| That's why | 01/01/70 00:00 | |
That makes absolutotally no difference, | 01/01/70 00:00 |



