This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 in
        turn to profthr_byhandle().
        * external.cc (cygwin_internal): Add case CW_CYGHEAP_PROFTHR_ALL.
        * gmon.c (_mcleanup): Add support for multiple simultaneous
        gmon.out* files named via environment variable GMON_OUT_PREFIX.
        * gmon.h (struct gmonparam): Make state decl volatile.
        * mcount.c (_MCOUNT_DECL): Change stores into gmonparam.state to use
        Interlocked operations. Add #include "winsup.h", update commentary.
        * profil.c (profthr_byhandle): New function abstracting out the
        updating of profile counters based on a thread handle.
        (profthr_func): Update to call profthr_byhandle() to sample the main
        thread then call cygheap_profthr_all() indirectly through
        cygwin_internal(CW_CYGHEAP_PROFTHR_ALL) to sample all other threads.

Thanks,

..mark

Attachment: 0001-gprof-profiling-of-multi-threaded-Cygwin-programs.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]