delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/13/05:47:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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>
MIME-Version: 1.0
From: "peter garrone" <pgarrone AT linuxmail DOT org>
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:
<snipped prior discussion>
>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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019