Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20031013081818.16448.qmail@linuxmail.org> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "peter garrone" To: cygwin AT cygwin DOT com Date: Mon, 13 Oct 2003 16:18:17 +0800 Subject: Re: Is multithreaded profiling on cygwin possible? X-Originating-Ip: 192.10.200.223 X-Originating-Server: ws5-3.us4.outblaze.com Brian Ford wrote: >2.) Paraphrasing, the UNIX profil call (that gprof.c is currently using), >has a contiguous flat address space model. It hashes address samples over >that space into a buffer. The starting and ending address are >automatically pulled from the executable and are in its address space. >DLLs are mapped outside this space non-contiguously. > >4.) Paraphrasing, gprof doesn't know how to find and read the symbol >tables from DLLs linked into the executable. I'm not even sure if the >addresses are deterministic. > As you have suggested, I have tried setting up a list of threads in profil.c, calling SuspendThread, GetThreadTimes, to get timing information for all threads, and to create a reasonably accurate profile for non-dll user space using gprof. My plan now is to create new dll import libraries so that when these dll functions are called, a flag is set in the thread structure list, and the profiling thread assigns cpu ticks against the statically linked small import functions, so that hopefully gprof will pick it up and assign some sort of cpu usage and call frequency count to all the functions in the import libraries. If you can see any obvious pitfalls with this approach, I would be grateful. -- ______________________________________________ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/