This is the mail archive of the libc-help@sourceware.org mailing list for the glibc 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]

Is gprof profiling (-pg) reentrant/thread-safe?


I was seeing some mysterious segmentation faults in my multi-threaded Linux application which was built with the -pg option for gprof profiling.  They went away when I turned -pg off.  I took a look at the mcount source for the version of glibc that I'm using (2.2.5) and see that it is updating linked lists in a single global structure (_gmonparam) with no synchronization mechanism to keep multiple threads from accessing this structure simultaneously. Am I missing something, or is gprof profiling not reentrant/thread-safe?

Thanks,

Stu Juengst


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