Hi all I have a problem regarding the use of profiling(CCS version 2.10.00). The DSP board used is C5402-DSK. I want to know the average running cycles for a function "A". Function "A" is called (in a loop) in the main function. Now I use two methods to profile function "A": Method 1 Open the main function and select the function "A" from where it is called. Drag this function into the profile window under the "Range" option. Method 2 Open the function "A" and drag the function into the profile window under the "Function" option. The results from these two profiling methos are completely different. The result from method 2 is much larger (several times) than the result from method 1. I don't know which method is a proper one to get the information I want. Can anyone tell me the reason why this happens? Thanks. Regards, Wei |
|
about profiling
Started by ●June 14, 2002
Reply by ●June 15, 20022002-06-15
> I want to know the average running cycles for a > function "A". > Function "A" is called (in a loop) in the main > function. Now > I use two methods to profile function "A": > > Method 1 > Open the main function and select the function "A" > from where > it is called. Drag this function into the profile > window under > the "Range" option. > > Method 2 > Open the function "A" and drag the function into the > profile window > under the "Function" option. > > The results from these two profiling methos are > completely > different. The result from method 2 is much larger > (several > times) than the result from method 1. I don't know > which > method is a proper one to get the information I > want. Can > anyone tell me the reason why this happens? Thanks. I hope this helps.. if you are using CCS, why not run the program from function A to the next function say B and see the clock cycles? You start the counter once A is executed and check the counter once B commences. You can do this by setting pofile points at A and B, run the program, reset clock (or counter) when execution reaches A, step out of A and read counter when B is reached then the reading will be the number of cycles from profile point A to point B. You will obtain more accurate cycle counts by choosing a third profile point, say C, which is at least 4 cycles past point B. Subtract number of cycles between B and C from that between A and C to get cycles between A and B. the reason for this has something to do with the profiling itself, which consumes some cycles. i dont know the details of the explanation so i suggest consulting the CCS manual. best regards, marlo |