Re: AU processor load
Re: AU processor load
- Subject: Re: AU processor load
- From: philippe wicker <email@hidden>
- Date: Tue, 27 Jan 2009 08:48:24 +0100
On 27 janv. 09, at 08:01, Jens Alfke wrote:
On Jan 26, 2009, at 9:47 PM, Walt wrote:
In your process frames code, record the system time on entry/exit.
Starting with the second buffer processed, you know how much time
you took to process buffer N-1, and can derive how much time was
spent outside of your processing by looking at the exit time of the
previous buffer.
That assumes that (a) your processing code is the only part of the
chain using up any CPU,
and that (b) your code will never get blocked or pre-empted by
another task. I don't think either of those are necessarily true.
When your Process code is called it runs on a single core unless it is
preempted and that your process code does not try to synchronize with
some other threads that may have not finished their job. Sampling the
time at input and exit of Process is meaningful as long as b) is
satisfied.
The process code runs within a high priority time constrained thread
which is of the kind that is not easily pre-empted (though there
certainly exist some system threads with higher priority), so b) is
"almost" true. Managing min/max and average value may give a more
accurate view of the cpu actually used.
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden