WARNING: This server is unstable and will be retired in the next days.
If you want to keep this forum available, please request immediately a migration
on the Nabble Support forum.
Forums that don't receive any migration request will be deleted forever.
> What exactly were the problems, how far did you come?
> Maybe add an instruction in the compiled code that is inserted in the
> beginning of each function, when a (new) profiling compilation flag is
> When that instruction is executed, a counter that counts how many time that
> function is incremented. Also one instruction can be inserted just before
> Return. Then the running time can be measured. (Exceptions must also be
> Gprof uses a similar method.
> Or skip new instructions and implement it directly in the interpreter "if
> (profiling_active) ...", but that extra if-statement might slow down the
> execution when profiling is not active...
> There are surely more ways to implement it ;)
I wanted to use setitimer() and note which function we are executing
each microsecond (for example).
The other solution (yours) seems to be better. I'd like to note the time
spent in each line too, it may be useful. I will see!