context switching and profiling
context switching and profiling
- Subject: context switching and profiling
- From: Jonathan Hess <email@hidden>
- Date: Fri, 21 Jun 2002 09:50:02 -0700
How would one receive notification (signal or otherwise) that the
current thread is about to be or was just swapped out and that the
current thread is about to be or was just swapped back in?
With present compilers and the PPC RTC register "active" profilers
are a real possibility. But, to make them robust on a preemptive
multi-cpu OS the question above must be resolved.
I've thought about instrumenting semaphore and mutex abstractions and
finding and instrumenting the time slice expired signal. To be
generally useful, all calls that would likely block the current
thread (read, write, accept, glFlush, etc, etc) would have to be
instrumented. But these all just seem like problematic hacks that
avoid finding the real solution.
Is there an exposed relatively hi-level way in the shipping kernel to
do this? If not, any pointers on where to look in the kernel?
--
Jonathan Hess
ViviStar Consulting
http://www.vivistar.com/
mailto:jahess@vivistar dot com
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.