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]

Re: gprof profiling of multi-threaded Cygwin programs


On 18/02/2016 11:29, Mark Geisert wrote:
A brief search tells me that apparently glibc supports the
(undocumented) GMON_OUT_PREFIX env var which enables a similar behaviour.

Ah, I did not know about that.  It would be easy to implement.

So I'm leaning towards choosing file name as GMON_OUT_PREFIX.exename.pid
with GMON_OUT_PREFIX defaulting to "gmon.out" if unspecified.

I think if you are going to implement GMON_OUT_PREFIX, you should make the behaviour the same as glibc.

Do you think the expanded name should be used in all cases, or only when
there's a gmon.out already present?

I don't think you should be checking for an existing gmon.out file. In the simple case where the program doesn't fork, it's expected that gmon.out will get overwritten.


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