This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Ideas for improving profil.c
- From: Brian Ford <ford at vss dot fsi dot com>
- To: cygwin-developers at cygwin dot com
- Date: Tue, 22 Apr 2003 18:10:25 -0500 (CDT)
- Subject: Ideas for improving profil.c
I tracked down my pc sampling (profiling) problems mentioned here:
http://cygwin.com/ml/cygwin/2003-04/msg01781.html
My problem was that the eip returned was almost never in the profiling
range. It was usually way down in the bowels of Windows that I have yet
to understand. Something like 0x7ffe0304.
Raising the profiling thread priority helped catch a few more valid
addresses. I would be glad to submit a one line patch for this if anyone
is interested.
I think most OS's are able to trace processes in the kernel back to the
entering trap, thus finding an in-range pc. So, my idea was to (and I do
have a rough version working) naively try and walk the stack back some
maximum number of frames until I hit the range. Better yet, only
walk back if we are below a cygwin entry point and only up to that point.
Is there any way to know this from the pc? I am probably just a rambling
lunatic, so feel free to shut me up.
--
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax: 314-551-8444