This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: RFC: add some static probes to libstdc++
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: libstdc <libstdc++ at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 28 Feb 2013 12:32:28 +0000
- Subject: Re: RFC: add some static probes to libstdc++
- References: <87sj4hzap2.fsf@fleche.redhat.com>
On 27/02/2013 21:52, Tom Tromey wrote:
> I'm posting this now to get reactions to the probe before cleaning up
> the corresponding gdb patches for submission. I've built it both with
> and without sys/sdt.h, but I haven't yet run the test suite.
How did it build in the without sys/sdt.h case?
> +#ifdef HAVE_SYS_SDT_H
> +#include <sys/sdt.h>
> +/* We only want to use stap probes starting with v3. Earlier versions
> + added too much startup cost. */
> +#if defined (STAP_PROBE2) && _SDT_NOTE_TYPE >= 3
> +#define PROBE2(name, arg1, arg2) STAP_PROBE2 (libstdcxx, name, arg1, arg2)
> +#else
> +#define PROBE2(name, arg1, arg2)
> +#endif
> +#endif
> +
Without HAVE_SYS_SDT_H, there's no definition of PROBE2 at all, but you use
it unconditionally in eh_{catch,throw}.cc. Am I missing something?
cheers,
DaveK