This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: WCET and GCC



charfi asma wrote:
> 
> suppose that we know the WCET ( worst case execution time) related to any
> function of our program.
> can we pass this parameter to GCC to take this WCET into acount and never
> exceed it (optimize the execution time of this function in a way that it
> can not exceed WCET parameter).
> 

Hi,

If the number you have truly is the WCET, by definition your function will
never exceed this. However, without tool support to determine WCET, I know
it's difficult to get this value.

to check current executed time against an estimate of WCET, you need a
measurement of time spent in the current thread (excluding time in
interrupts and doing context switched) - in other words, execution time. If
you are using an RTOS, it may be able to provide this information for you. I
believe that Windows (yes, I know it's not an RTOS) has an API that gives
time spent in a thread - downside is that it has low resolution and high
execution time overhead.

Hope this helps

Andrew
-- 
View this message in context: http://old.nabble.com/WCET-and-GCC-tp28267105p28287619.html
Sent from the gcc - Help mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]