[PATCH] Support profiling of multi-threaded apps.

Mark Geisert mark@maxrnd.com
Thu Mar 10 19:12:00 GMT 2016

On Thu, 10 Mar 2016, Corinna Vinschen wrote:
> On Mar 10 10:39, Corinna Vinschen wrote:
>> On Mar 10 00:35, Mark Geisert wrote:
>>> This is Version 4 incorporating review comments of Version 3.  This is just
>>> the code patch; a separate doc patch is forthcoming.
>> Uhm...
>>> +		long divisor = 1000*1000*1000; // covers positive pid_t values
>> ...still "long"?
>> Was that an oversight or did you decide to keep it a long?  Either way,
>> no reason to resend another patch version.  If you want an int32_t here,
>> I fix that locally before pushing the patch.

Oversight.  Now corrected like this in my local repository:

-               long divisor = 1000*1000*1000; // covers positive pid_t values
+               int32_t divisor = 1000*1000*1000; // covers +ve pid_t values

Hopefully this mailer won't fold those two lines.

> Oh, btw., do you have a sentence or two for the release text?  Just
> a short description what's new or changed or fixed.  Have a look at
> winsup/cygwin/release/2.5.0 for an informal howto.

What's new:

- Environment variable GMON_OUT_PREFIX enables multiple gmon.out files to
   preserve profiling data after fork or from multiple program runs.

What changed:

- Profiling data, specifically pc sampling, now covers all threads of a
   program and not just the main thread.

OK with me if you prefer both sentences in one category or the other.  I 
hope to have the doc patch ready in the next day or two.


More information about the Cygwin-patches mailing list