Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Jan Waclawek
08/01/05 03:21
Read: 795 times

#98560 - The compiler knows
Responding to: Andy Neil'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:
Although not automated, you could use the Performance Analyser in Keil's simulator/debugger to do this manually.
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.

Jan Waclawek

List of 18 messages in thread
Counting cycles... possible in C?      Jan Waclawek      07/28/05 01:03      
   You need a Profiler      Andy Neil      08/01/05 00:00      
      The compiler knows      Jan Waclawek      08/01/05 03:21      
         Source code useless      Andy Neil      08/01/05 04:50      
         That's why you need Assembler!      Andy Neil      08/01/05 04:56      
            nohohoho      Jan Waclawek      08/01/05 05:12      
               Speed is not everything!      Andy Neil      08/01/05 05:54      
   Cycles vary?      James Krushlucki      08/01/05 01:37      
      I know      Jan Waclawek      08/01/05 03:23      
   absolutely, but what good does it do      Erik Malund      08/01/05 06:27      
      other way round      Jan Waclawek      08/01/05 07:10      
         Yes, the things posted apply in this cas      Erik Malund      08/01/05 07:23      
            exactly for this reason      Jan Waclawek      08/01/05 08:29      
               how can you automate that it is small en      Erik Malund      08/01/05 08:35      
   Use Microsoft Excel      Aubrey Kagan      08/01/05 18:04      
      excel and conditional branches ?      Erik Malund      08/02/05 05:53      
         That's why      Aubrey Kagan      08/02/05 07:13      
            That makes absolutotally no difference,      Erik Malund      08/02/05 07:23      

Back to Subject List