public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Patch: add systemtap-style marker to _Unwind_DebugHook
@ 2011-01-14 19:30 Tom Tromey
  2011-01-14 19:37 ` Rainer Orth
  2011-01-16 20:09 ` Roland McGrath
  0 siblings, 2 replies; 16+ messages in thread
From: Tom Tromey @ 2011-01-14 19:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: systemtap

This patch adds a systemtap-style static marker to the existing
_Unwind_DebugHook function in the unwinder.  The benefit of doing this
is that it will enable GDB's exception-handling code to work even in the
absence of debuginfo.

The cost of this probe is very small.  I believe that with the "v3"
probes it expands to a nop in the code, plus an extra note section in
the .o.

Some more info on static markers is here:

http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps

I tested this by building it two ways (once with sdt.h installed and
once without) on x86 F13, and then examining the resulting libgcc.so
using stap and readelf.

Tom

2011-01-14  Tom Tromey  <tromey@redhat.com>

	* unwind-dw2.c: Include sys/sdt.h if it exists.
	(_Unwind_DebugHook): Use STAP_PROBE2.
	* config.in, configure: Rebuild.
	* configure.ac: Check for sys/sdt.h.

diff --git a/gcc/configure.ac b/gcc/configure.ac
index 776c71f..44a963d 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4313,6 +4313,16 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
 	    [Define if your target C library provides stack protector support])
 fi
 
+# Test for <sys/sdt.h> on the target.
+GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
+AC_MSG_CHECKING(sys/sdt.h in the target C library)
+have_sys_sdt_h=no
+if test -f $target_header_dir/sys/sdt.h; then
+  AC_DEFINE(HAVE_SYS_SDT_H, 1,
+            [Define if your target C library provides sys/sdt.h])
+fi
+AC_MSG_RESULT($have_sys_sdt_h)
+
 # Check if TFmode long double should be used by default or not.
 # Some glibc targets used DFmode long double, but with glibc 2.4
 # and later they can use TFmode.
diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c
index 2ea9adb..ca5e95c 100644
--- a/gcc/unwind-dw2.c
+++ b/gcc/unwind-dw2.c
@@ -1,6 +1,6 @@
 /* DWARF2 exception handling and frame unwind runtime interface routines.
    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2008, 2009, 2010  Free Software Foundation, Inc.
+   2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -37,6 +37,10 @@
 #include "gthr.h"
 #include "unwind-dw2.h"
 
+#ifdef HAVE_SYS_SDT_H
+#include <sys/sdt.h>
+#endif
+
 #ifndef __USING_SJLJ_EXCEPTIONS__
 
 #ifndef STACK_GROWS_DOWNWARD
@@ -1493,7 +1497,11 @@ static void
 _Unwind_DebugHook (void *cfa __attribute__ ((__unused__)),
 		   void *handler __attribute__ ((__unused__)))
 {
+#ifdef HAVE_SYS_SDT_H
+  STAP_PROBE2 (libgcc, unwind, cfa, handler);
+#else
   asm ("");
+#endif
 }
 
 /* Install TARGET into CURRENT so that we can return to it.  This is a

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-14 19:30 Patch: add systemtap-style marker to _Unwind_DebugHook Tom Tromey
@ 2011-01-14 19:37 ` Rainer Orth
  2011-01-14 19:41   ` Tom Tromey
  2011-01-14 19:45   ` Josh Stone
  2011-01-16 20:09 ` Roland McGrath
  1 sibling, 2 replies; 16+ messages in thread
From: Rainer Orth @ 2011-01-14 19:37 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gcc-patches, systemtap

Tom Tromey <tromey@redhat.com> writes:

> @@ -1493,7 +1497,11 @@ static void
>  _Unwind_DebugHook (void *cfa __attribute__ ((__unused__)),
>  		   void *handler __attribute__ ((__unused__)))
>  {
> +#ifdef HAVE_SYS_SDT_H
> +  STAP_PROBE2 (libgcc, unwind, cfa, handler);
> +#else
>    asm ("");
> +#endif
>  }
>  
>  /* Install TARGET into CURRENT so that we can return to it.  This is a

This is wrong: Solaris 10+ has <sys/sdt.h> for DTrace, but only defines
DTRACE_* there.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-14 19:37 ` Rainer Orth
@ 2011-01-14 19:41   ` Tom Tromey
  2011-01-14 19:46     ` Rainer Orth
  2011-01-14 19:45   ` Josh Stone
  1 sibling, 1 reply; 16+ messages in thread
From: Tom Tromey @ 2011-01-14 19:41 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, systemtap

>>>>> "Rainer" == Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

Rainer> This is wrong: Solaris 10+ has <sys/sdt.h> for DTrace, but only defines
Rainer> DTRACE_* there.

Oops, I forgot that this was a compatibility header.

I think I will make it check for the existence of STAP_PROBE2, unless
there is some better plan.  I don't know anything about dtrace and have
no way to test it, so if we want to use the DTRACE_* macro, somebody
will have to help.

Tom

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-14 19:37 ` Rainer Orth
  2011-01-14 19:41   ` Tom Tromey
@ 2011-01-14 19:45   ` Josh Stone
  2011-01-14 19:48     ` Rainer Orth
  1 sibling, 1 reply; 16+ messages in thread
From: Josh Stone @ 2011-01-14 19:45 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Tom Tromey, gcc-patches, systemtap

On 01/14/2011 11:37 AM, Rainer Orth wrote:
> Tom Tromey <tromey@redhat.com> writes:
> 
>> @@ -1493,7 +1497,11 @@ static void
>>  _Unwind_DebugHook (void *cfa __attribute__ ((__unused__)),
>>  		   void *handler __attribute__ ((__unused__)))
>>  {
>> +#ifdef HAVE_SYS_SDT_H
>> +  STAP_PROBE2 (libgcc, unwind, cfa, handler);
>> +#else
>>    asm ("");
>> +#endif
>>  }
>>  
>>  /* Install TARGET into CURRENT so that we can return to it.  This is a
> 
> This is wrong: Solaris 10+ has <sys/sdt.h> for DTrace, but only defines
> DTRACE_* there.

SystemTap's header also defines DTRACE_PROBE2 for compatibility, so you
could use that instead.  The parsing for GDB to use it on Solaris will
be very different though.

Josh

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-14 19:41   ` Tom Tromey
@ 2011-01-14 19:46     ` Rainer Orth
  2011-01-14 21:17       ` Tom Tromey
  0 siblings, 1 reply; 16+ messages in thread
From: Rainer Orth @ 2011-01-14 19:46 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gcc-patches, systemtap

Tom Tromey <tromey@redhat.com> writes:

>>>>>> "Rainer" == Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
>
> Rainer> This is wrong: Solaris 10+ has <sys/sdt.h> for DTrace, but only defines
> Rainer> DTRACE_* there.
>
> Oops, I forgot that this was a compatibility header.
>
> I think I will make it check for the existence of STAP_PROBE2, unless
> there is some better plan.  I don't know anything about dtrace and have

For the moment, that should do.

> no way to test it, so if we want to use the DTRACE_* macro, somebody
> will have to help.

Adding DTrace probes to the unwinder sounds like an excellent idea: I
recently had to debug lots of unwinder issues on Solaris, and such
probes would certainly have helped.  I'll add this to my agenda.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-14 19:45   ` Josh Stone
@ 2011-01-14 19:48     ` Rainer Orth
  0 siblings, 0 replies; 16+ messages in thread
From: Rainer Orth @ 2011-01-14 19:48 UTC (permalink / raw)
  To: Josh Stone; +Cc: Tom Tromey, gcc-patches, systemtap

Josh Stone <jistone@redhat.com> writes:

>> This is wrong: Solaris 10+ has <sys/sdt.h> for DTrace, but only defines
>> DTRACE_* there.
>
> SystemTap's header also defines DTRACE_PROBE2 for compatibility, so you
> could use that instead.  The parsing for GDB to use it on Solaris will
> be very different though.

Sounds like a plan: I can give it a try.

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-14 19:46     ` Rainer Orth
@ 2011-01-14 21:17       ` Tom Tromey
  2011-01-14 21:31         ` Richard Henderson
  0 siblings, 1 reply; 16+ messages in thread
From: Tom Tromey @ 2011-01-14 21:17 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, systemtap

Tom> I think I will make it check for the existence of STAP_PROBE2, unless
Tom> there is some better plan.  I don't know anything about dtrace and have

Rainer> For the moment, that should do.

Here is an updated version.

Tom> no way to test it, so if we want to use the DTRACE_* macro, somebody
Tom> will have to help.

Rainer> Adding DTrace probes to the unwinder sounds like an excellent idea: I
Rainer> recently had to debug lots of unwinder issues on Solaris, and such
Rainer> probes would certainly have helped.  I'll add this to my agenda.

From reading on the web it was unclear to me whether Solaris+DTrace
requires a .d file, an invocation of dtrace, and a new .o file in order
to make this work.

If so then it is further unclear what should be done when building a
cross compiler.

The below ought to work ok in cross scenarios.  I think it would be
mildly nicer if we did not use a .d file on Linux, though the cost is
very small (one global variable for the semaphore).

Tom

2011-01-14  Tom Tromey  <tromey@redhat.com>

	* unwind-dw2.c: Include sys/sdt.h if it exists.
	(_Unwind_DebugHook): Use STAP_PROBE2.
	* config.in, configure: Rebuild.
	* configure.ac: Check for sys/sdt.h.

diff --git a/gcc/configure.ac b/gcc/configure.ac
index 776c71f..44a963d 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4313,6 +4313,16 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
 	    [Define if your target C library provides stack protector support])
 fi
 
+# Test for <sys/sdt.h> on the target.
+GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
+AC_MSG_CHECKING(sys/sdt.h in the target C library)
+have_sys_sdt_h=no
+if test -f $target_header_dir/sys/sdt.h; then
+  AC_DEFINE(HAVE_SYS_SDT_H, 1,
+            [Define if your target C library provides sys/sdt.h])
+fi
+AC_MSG_RESULT($have_sys_sdt_h)
+
 # Check if TFmode long double should be used by default or not.
 # Some glibc targets used DFmode long double, but with glibc 2.4
 # and later they can use TFmode.
diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c
index 2ea9adb..6f9b224 100644
--- a/gcc/unwind-dw2.c
+++ b/gcc/unwind-dw2.c
@@ -1,6 +1,6 @@
 /* DWARF2 exception handling and frame unwind runtime interface routines.
    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2008, 2009, 2010  Free Software Foundation, Inc.
+   2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -37,6 +37,10 @@
 #include "gthr.h"
 #include "unwind-dw2.h"
 
+#ifdef HAVE_SYS_SDT_H
+#include <sys/sdt.h>
+#endif
+
 #ifndef __USING_SJLJ_EXCEPTIONS__
 
 #ifndef STACK_GROWS_DOWNWARD
@@ -1493,7 +1497,11 @@ static void
 _Unwind_DebugHook (void *cfa __attribute__ ((__unused__)),
 		   void *handler __attribute__ ((__unused__)))
 {
+#if defined (HAVE_SYS_SDT_H) && defined (STAP_PROBE2)
+  STAP_PROBE2 (libgcc, unwind, cfa, handler);
+#else
   asm ("");
+#endif
 }
 
 /* Install TARGET into CURRENT so that we can return to it.  This is a

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-14 21:17       ` Tom Tromey
@ 2011-01-14 21:31         ` Richard Henderson
  0 siblings, 0 replies; 16+ messages in thread
From: Richard Henderson @ 2011-01-14 21:31 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Rainer Orth, gcc-patches, systemtap

On 01/14/2011 01:17 PM, Tom Tromey wrote:
> 	* unwind-dw2.c: Include sys/sdt.h if it exists.
> 	(_Unwind_DebugHook): Use STAP_PROBE2.
> 	* config.in, configure: Rebuild.
> 	* configure.ac: Check for sys/sdt.h.

Ok by me.


r~

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-14 19:30 Patch: add systemtap-style marker to _Unwind_DebugHook Tom Tromey
  2011-01-14 19:37 ` Rainer Orth
@ 2011-01-16 20:09 ` Roland McGrath
  2011-01-17 14:34   ` Tom Tromey
  1 sibling, 1 reply; 16+ messages in thread
From: Roland McGrath @ 2011-01-16 20:09 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gcc-patches, systemtap

As was mentioned, systemtap's sys/sdt.h has wrapper macros that are
source-compatible with dtrace's sys/sdt.h that you can use without any
material difference.  Systemtap also provides a dtrace wrapper script
intended to be compatible with the build-time uses of dtrace, though using
it adds nothing you need for the systemtap probes to be built right.

In versions of systemtap prior to the forthcoming 1.4, the probes produced
some undesireable overhead in PIC code, in the form of some extra dynamic
relocation records in the resultant DSO, adding to the startup cost in the
dynamic linker.  This added startup cost might be judged unacceptable for
the shared libgcc.so, since in practice it's paid by every process in the
system in its initialization.  So you might want either to make compiling
in the probe conditional on a configure option, or to use an autoconf test
that would only accept the most recent versions of sys/sdt.h (and perhaps
also accept dtrace's versions, if you are going to support dtrace too).


Thanks,
Roland

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-16 20:09 ` Roland McGrath
@ 2011-01-17 14:34   ` Tom Tromey
  2011-01-17 17:06     ` Roland McGrath
  0 siblings, 1 reply; 16+ messages in thread
From: Tom Tromey @ 2011-01-17 14:34 UTC (permalink / raw)
  To: Roland McGrath; +Cc: gcc-patches, systemtap

>>>>> "Roland" == Roland McGrath <roland@redhat.com> writes:

Roland> As was mentioned, systemtap's sys/sdt.h has wrapper macros that
Roland> are source-compatible with dtrace's sys/sdt.h that you can use
Roland> without any material difference.

stap's are better because you can use them with a .d file and a new .o
file to define a semaphore variable; what I have read on the web
suggests that Solaris (but not some other DTrace ports) requires this
stuff.  This matters to GCC because it lets us avoid dealing with cross
compilation stuff.

Roland> In versions of systemtap prior to the forthcoming 1.4, the
Roland> probes produced some undesireable overhead in PIC code, in the
Roland> form of some extra dynamic relocation records in the resultant
Roland> DSO, adding to the startup cost in the dynamic linker.  This
Roland> added startup cost might be judged unacceptable for the shared
Roland> libgcc.so, since in practice it's paid by every process in the
Roland> system in its initialization.  So you might want either to make
Roland> compiling in the probe conditional on a configure option, or to
Roland> use an autoconf test that would only accept the most recent
Roland> versions of sys/sdt.h (and perhaps also accept dtrace's
Roland> versions, if you are going to support dtrace too).

I think gcc's configure has too many options already.

What if I check `_SDT_NOTE_TYPE >= 3'?
I'd rather sdt.h advertise its version than try to write a configure
check.  Testing target headers in gcc is a pain.

Tom

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-17 14:34   ` Tom Tromey
@ 2011-01-17 17:06     ` Roland McGrath
  2011-01-17 17:23       ` Tom Tromey
  0 siblings, 1 reply; 16+ messages in thread
From: Roland McGrath @ 2011-01-17 17:06 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gcc-patches, systemtap

> What if I check `_SDT_NOTE_TYPE >= 3'?
> I'd rather sdt.h advertise its version than try to write a configure
> check.  Testing target headers in gcc is a pain.

That test would work.  (That macro is not defined at all in earlier versions.)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-17 17:06     ` Roland McGrath
@ 2011-01-17 17:23       ` Tom Tromey
  2011-01-17 17:26         ` Roland McGrath
                           ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Tom Tromey @ 2011-01-17 17:23 UTC (permalink / raw)
  To: Roland McGrath; +Cc: gcc-patches, systemtap

>>>>> "Roland" == Roland McGrath <roland@redhat.com> writes:

Roland> That test would work.  (That macro is not defined at all in
Roland> earlier versions.)

Here is an updated version.

Tom

2011-01-14  Tom Tromey  <tromey@redhat.com>

	* unwind-dw2.c: Include sys/sdt.h if it exists.
	(_Unwind_DebugHook): Use STAP_PROBE2.
	* config.in, configure: Rebuild.
	* configure.ac: Check for sys/sdt.h.

diff --git a/gcc/configure.ac b/gcc/configure.ac
index 776c71f..44a963d 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4313,6 +4313,16 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
 	    [Define if your target C library provides stack protector support])
 fi
 
+# Test for <sys/sdt.h> on the target.
+GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
+AC_MSG_CHECKING(sys/sdt.h in the target C library)
+have_sys_sdt_h=no
+if test -f $target_header_dir/sys/sdt.h; then
+  AC_DEFINE(HAVE_SYS_SDT_H, 1,
+            [Define if your target C library provides sys/sdt.h])
+fi
+AC_MSG_RESULT($have_sys_sdt_h)
+
 # Check if TFmode long double should be used by default or not.
 # Some glibc targets used DFmode long double, but with glibc 2.4
 # and later they can use TFmode.
diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c
index 2ea9adb..25990b4 100644
--- a/gcc/unwind-dw2.c
+++ b/gcc/unwind-dw2.c
@@ -1,6 +1,6 @@
 /* DWARF2 exception handling and frame unwind runtime interface routines.
    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2008, 2009, 2010  Free Software Foundation, Inc.
+   2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -37,6 +37,10 @@
 #include "gthr.h"
 #include "unwind-dw2.h"
 
+#ifdef HAVE_SYS_SDT_H
+#include <sys/sdt.h>
+#endif
+
 #ifndef __USING_SJLJ_EXCEPTIONS__
 
 #ifndef STACK_GROWS_DOWNWARD
@@ -1493,7 +1497,13 @@ static void
 _Unwind_DebugHook (void *cfa __attribute__ ((__unused__)),
 		   void *handler __attribute__ ((__unused__)))
 {
+  /* We only want to use stap probes starting with v3.  Earlier
+     versions added too much startup cost.  */
+#if defined (HAVE_SYS_SDT_H) && defined (STAP_PROBE2) && _SDT_NOTE_TYPE >= 3
+  STAP_PROBE2 (libgcc, unwind, cfa, handler);
+#else
   asm ("");
+#endif
 }
 
 /* Install TARGET into CURRENT so that we can return to it.  This is a

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-17 17:23       ` Tom Tromey
@ 2011-01-17 17:26         ` Roland McGrath
  2011-01-20 17:30         ` Rainer Orth
  2011-03-14 18:12         ` Tom Tromey
  2 siblings, 0 replies; 16+ messages in thread
From: Roland McGrath @ 2011-01-17 17:26 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gcc-patches, systemtap

> Here is an updated version.

This looks good to me, modulo the question of going for Solaris/dtrace
compatibility (on which I have no opinion).


Thanks,
Roland

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-17 17:23       ` Tom Tromey
  2011-01-17 17:26         ` Roland McGrath
@ 2011-01-20 17:30         ` Rainer Orth
  2011-01-28  9:09           ` Tom Tromey
  2011-03-14 18:12         ` Tom Tromey
  2 siblings, 1 reply; 16+ messages in thread
From: Rainer Orth @ 2011-01-20 17:30 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Roland McGrath, gcc-patches, systemtap

Tom,

> Here is an updated version.

I'm fine with that version since it guarantees that it won't break
Solaris bootstrap, as the initial one would have done.

As for DTrace support proper, we can postpone that IMO.  To be honest,
from my experience getting the libgcc unwinder to work with dl_iterate_phdr
on Solaris 11, a single probe in _Unwind_DebugHook may not be enough,
but it's certainly a start.  Maybe we can get at a list of additional
probes to add to the unwinder, perhaps conditionally compiled if there is
unacceptable overhead in production.

Thanks, and sorry for letting the ball drop.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-20 17:30         ` Rainer Orth
@ 2011-01-28  9:09           ` Tom Tromey
  0 siblings, 0 replies; 16+ messages in thread
From: Tom Tromey @ 2011-01-28  9:09 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Roland McGrath, gcc-patches, systemtap

>>>>> "Rainer" == Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

Tom> Here is an updated version.

Rainer> I'm fine with that version since it guarantees that it won't break
Rainer> Solaris bootstrap, as the initial one would have done.

Rainer> As for DTrace support proper, we can postpone that IMO.  To be
Rainer> honest, from my experience getting the libgcc unwinder to work
Rainer> with dl_iterate_phdr on Solaris 11, a single probe in
Rainer> _Unwind_DebugHook may not be enough, but it's certainly a start.

Yeah ... the motivation for this specific probe is that it lets gdb work
nicely in the presence of exceptions, nothing more.  If you want to look
more deeply into the unwinder itself, you may want more.

Rainer> Thanks, and sorry for letting the ball drop.

It is no trouble, this is waiting for Stage 1 anyhow :-)

Tom

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Patch: add systemtap-style marker to _Unwind_DebugHook
  2011-01-17 17:23       ` Tom Tromey
  2011-01-17 17:26         ` Roland McGrath
  2011-01-20 17:30         ` Rainer Orth
@ 2011-03-14 18:12         ` Tom Tromey
  2 siblings, 0 replies; 16+ messages in thread
From: Tom Tromey @ 2011-03-14 18:12 UTC (permalink / raw)
  To: gcc-patches; +Cc: systemtap

Roland> That test would work.  (That macro is not defined at all in
Roland> earlier versions.)

Tom> Here is an updated version.

Tom> 2011-01-14  Tom Tromey  <tromey@redhat.com>
Tom> 	* unwind-dw2.c: Include sys/sdt.h if it exists.
Tom> 	(_Unwind_DebugHook): Use STAP_PROBE2.
Tom> 	* config.in, configure: Rebuild.
Tom> 	* configure.ac: Check for sys/sdt.h.

Now that Stage 1 is open, I am checking this in.

Tom

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-03-14 18:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-14 19:30 Patch: add systemtap-style marker to _Unwind_DebugHook Tom Tromey
2011-01-14 19:37 ` Rainer Orth
2011-01-14 19:41   ` Tom Tromey
2011-01-14 19:46     ` Rainer Orth
2011-01-14 21:17       ` Tom Tromey
2011-01-14 21:31         ` Richard Henderson
2011-01-14 19:45   ` Josh Stone
2011-01-14 19:48     ` Rainer Orth
2011-01-16 20:09 ` Roland McGrath
2011-01-17 14:34   ` Tom Tromey
2011-01-17 17:06     ` Roland McGrath
2011-01-17 17:23       ` Tom Tromey
2011-01-17 17:26         ` Roland McGrath
2011-01-20 17:30         ` Rainer Orth
2011-01-28  9:09           ` Tom Tromey
2011-03-14 18:12         ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).