I'm trying to profile DOSEMU using -pg, but I have a problem: the mcount() implementation here depends on GS being set to the value that libc (or the kernel) initialized it to. (Presumably, mcount() needs access to thread local state.)
However, DOSEMU has some signal handlers that might be called from DPMI context, where GS is presumably going to have a different setting, and the Linux kernel does not (cannot?) restore GS to it's former value for signal handlers. Soo... I sought an __attribute__ to disable the instrumentation of these signal handlers, but the only one I could find, __attribute__((no_instrument_function)), does not seem to cover this case -- it neither overrides -pg, nor is it documented to do so. Failing that, I sought a command-line flag to cancel the effect of -pg for just this subdirectory (or the file), but I couldn't find one of those, either. Please add an __attribute__ for this, and perhaps a negative form of -pg as well. -- Summary: There is neither a negative form of -pg nor an __attribute__ to disable instrumentation of a specific function Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: naesten at gmail dot com GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40498