Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-25 Thread Corinna Vinschen
On Feb 25 00:47, Mark Geisert wrote: > On Tue, 23 Feb 2016, Corinna Vinschen wrote: > >On Feb 22 23:36, Mark Geisert wrote: > >>On Mon, 22 Feb 2016, Jon Turney wrote: > >>>There doesn't seem to be anything specific to profiling about this, so it > >>>could be written in a more generic way, as "call

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-25 Thread Mark Geisert
On Tue, 23 Feb 2016, Corinna Vinschen wrote: On Feb 22 23:36, Mark Geisert wrote: On Mon, 22 Feb 2016, Jon Turney wrote: There doesn't seem to be anything specific to profiling about this, so it could be written in a more generic way, as "call a callback function for each thread". I saw your

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-23 Thread Corinna Vinschen
On Feb 22 23:36, Mark Geisert wrote: > Hi Jon, > > On Mon, 22 Feb 2016, Jon Turney wrote: > >Thanks for this. A few comments inline. > > > >On 20/02/2016 08:16, Mark Geisert wrote: > >>+/* Called from profil.c to sample all non-main thread PC values for > >>profiling */ > >>+extern "C" void > >>+

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-23 Thread Corinna Vinschen
On Feb 22 22:58, Mark Geisert wrote: > On Mon, 22 Feb 2016, Corinna Vinschen wrote: > >One is, for completeness it would be nice if you could add a > >description to the git comment along the lines of your original > >comment so we have a description in the log. > > Sorry, can't parse this; git ne

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-22 Thread Mark Geisert
Hi Jon, On Mon, 22 Feb 2016, Jon Turney wrote: Thanks for this. A few comments inline. On 20/02/2016 08:16, Mark Geisert wrote: +/* Called from profil.c to sample all non-main thread PC values for profiling */ +extern "C" void +cygheap_profthr_all (void (*profthr_byhandle) (HANDLE)) +{ + fo

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-22 Thread Mark Geisert
On Mon, 22 Feb 2016, Corinna Vinschen wrote: One is, for completeness it would be nice if you could add a description to the git comment along the lines of your original comment so we have a description in the log. Sorry, can't parse this; git newbie here. Did you mean the 'git commit' I'm do

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-22 Thread Jon Turney
On 22/02/2016 16:55, Corinna Vinschen wrote: On Feb 22 16:14, Jon Turney wrote: On 22/02/2016 14:25, Corinna Vinschen wrote: On Feb 22 11:44, Jon Turney wrote: Thanks for this. A few comments inline. [...] On 20/02/2016 08:16, Mark Geisert wrote: + // record profiling samples for other

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-22 Thread Corinna Vinschen
On Feb 22 16:14, Jon Turney wrote: > On 22/02/2016 14:25, Corinna Vinschen wrote: > >On Feb 22 11:44, Jon Turney wrote: > >>Thanks for this. A few comments inline. > >>[...] > >>On 20/02/2016 08:16, Mark Geisert wrote: > >>>+ // record profiling samples for other pthreads, if any > >>>+

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-22 Thread Jon Turney
On 22/02/2016 14:25, Corinna Vinschen wrote: On Feb 22 11:44, Jon Turney wrote: Thanks for this. A few comments inline. [...] On 20/02/2016 08:16, Mark Geisert wrote: + // record profiling samples for other pthreads, if any + cygwin_internal (CW_CYGHEAP_PROFTHR_ALL, profthr_byhandle)

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-22 Thread Corinna Vinschen
On Feb 22 11:44, Jon Turney wrote: > Thanks for this. A few comments inline. > [...] > On 20/02/2016 08:16, Mark Geisert wrote: > >+ // record profiling samples for other pthreads, if any > >+ cygwin_internal (CW_CYGHEAP_PROFTHR_ALL, profthr_byhandle); > >+ > > Hmm.. so why isn't this w

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-22 Thread Jon Turney
Thanks for this. A few comments inline. On 20/02/2016 08:16, Mark Geisert wrote: diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 6493485..4932cf0 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -744,3 +744,15 @@ init_cygheap::find_tls (int sig, boo

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-22 Thread Corinna Vinschen
Hi Mark, On Feb 20 00:16, Mark Geisert wrote: > Version 2 incorporating review comments of version 1. I'm afraid we need a v3, two points. One is, for completeness it would be nice if you could add a description to the git comment along the lines of your original comment so we have a description

[PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-20 Thread Mark Geisert
Version 2 incorporating review comments of version 1. Change log relative to winsup/cygwin: * include/sys/cygwin.h: Add CW_CYGHEAP_PROFTHR_ALL. * cygheap.cc (cygheap_profthr_all): New C-callable function that runs cygheap's threadlist handing each pthread's thread handle