This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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: revamp sdt.h


> On 09/03/2010 04:38 PM, Roland McGrath wrote:
> >> On 08/09/2010 12:37 PM, Roland McGrath wrote:
> >>> The translator work has yet to be done.
> >>
> >> The roland/new-sdt branch now has a version of the translator that supports
> >> version 3 sdt.h.  The only regressions are a couple sdt.exp tests that are
> >> failing with -pedantic.
> >
> > I'll look into those.
> 
> Thanks Roland.

Your systemtap.exp changes look all wrong to me.  
Please explain their rationale.

Your log entry fails to use correct file names for subdirectory files.

Your addition of _SDT_SEMAPHORE was cosmetically sloppy,
and also uses a symbol name that is not name space clean.
I thought we had abandoned the semaphore thing, or that 
someone would have answered me about that and asked me to
encode it right in the macros.


diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
index d9dc7cc..0000000 100644  
--- a/includes/sys/sdt.h
+++ b/includes/sys/sdt.h
@@ -77,6 +77,12 @@
 # define _SDT_ASM_AUTOGROUP ""
 #endif
 
+#ifdef _SDT_HAS_SEMAPHORES
+# define _SDT_SEMAPHORE(provider, name)	_sdt_semaphore_##provider##name
+#else
+# define _SDT_SEMAPHORE(provider, name)	0
+#endif
+
 #define _SDT_ASM_BODY(provider, name, pack_args, args)			      \
   _SDT_ASM_1(990:	_SDT_NOP)					      \
   _SDT_ASM_3(		.pushsection .note.stapsdt,_SDT_ASM_AUTOGROUP,"note") \
@@ -86,7 +92,7 @@
   _SDT_ASM_1(992:	.balign 4)					      \
   _SDT_ASM_1(993:	_SDT_ASM_ADDR 990b)				      \
   _SDT_ASM_1(		_SDT_ASM_ADDR _.stapsdt.base)			      \
-  _SDT_SEMAPHORE(provider,name)						      \
+  _SDT_ASM_1(		_SDT_ASM_ADDR _SDT_SEMAPHORE(provider, name))	      \
   _SDT_ASM_STRING(provider)						      \
   _SDT_ASM_STRING(name)							      \
   pack_args args							      \
@@ -102,12 +108,6 @@
   _SDT_ASM_1(		.popsection)					      \
   _SDT_ASM_1(.endif)
 
-#if defined _SDT_HAS_SEMAPHORES
-#define _SDT_SEMAPHORE(p,n) _SDT_ASM_1(		_SDT_ASM_ADDR p##_##n##_semaphore)
-#else
-#define _SDT_SEMAPHORE(p,n) _SDT_ASM_1(		_SDT_ASM_ADDR 0)
-#endif
-
 #define _SDT_ASM_TEMPLATE_0		/* no arguments */
 #define _SDT_ASM_TEMPLATE_1		_SDT_ARGFMT(1)
 #define _SDT_ASM_TEMPLATE_2		_SDT_ASM_TEMPLATE_1 _SDT_ARGFMT(2)


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