[PATCH] you can use this patch to profile cygwin

Corinna Vinschen corinna-cygwin@cygwin.com
Sat Aug 20 08:50:00 GMT 2011


Hi Jin-woo,

On Aug 20 06:59, jojelino wrote:
> On 2011-08-20 AM 6:48, jojelino wrote:
> > cd i686-pc-cygwin/winsup/cygwin;rm *.o;make profile=1
> >
> > it would work.
> Please ignore attachment from 6:48, i have mistaken by attaching
> invalid winsup-profile-support.diff
> 
> So i am replying.

Yes, but to the wrong list ;-)

Would you mind to resend your patches as a reply to your original
threada on the cygwin-patches list?  That's where the official
patch submissions are suppsoed to go.

Btw., you don't have to attach the ChangeLog.  For the lazy reader
it's easier if the ChangeLog is just inline in your mail.  If you
want to avoid more spam, just omit your email address from the
ChangeLog date/name/email header.

But there's something I don't grok in your patch:

In dll_crt0_0:

  +  _monstartup();

but

  +#ifdef PROFILE
  +  atexit (&_mcleanup);
  +#endif

Shouldn't the call to _monstartup also be guarded with #ifdef PROFILE?
Same question for calls to profile_thread_off and any other profiling
code in other places.

In gcrt0.c:

  +#ifndef PROFILE
  void _monstartup (void) __attribute__((__constructor__));
  -
  +#endif

#if*n*def?  Is that a typo?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-developers mailing list