public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Remove <stdint.h> from <sys/sdt.h>
@ 2014-10-21  9:09 Chung-Lin Tang
  2014-10-21 14:29 ` Josh Stone
  0 siblings, 1 reply; 3+ messages in thread
From: Chung-Lin Tang @ 2014-10-21  9:09 UTC (permalink / raw)
  To: systemtap

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

Hi,
We're in the process of considering adding the <sys/sdt.h> header during
the build of a full toolchain, which will allow the enabling of
SystemTap probes in some target libraries (e.g. glibc).

There's a small problem that I'm encountering:  we're configuring glibc
with --enable-systemtap, but the configure tests tries a test compile
with <sys/sdt.h> before we even have glibc (headers) installed, a small
circular dependency actually.

I'm guessing the [u]int(8/16/32)_t types were probably historically used
in the <sys/sdt.h> header, but as of currently I see no need of
<stdint.h> in there. May I suggest to simply remove the #include?  (I've
attached the one-liner patch to be clear)

Thanks,
Chung-Lin

[-- Attachment #2: s.diff --]
[-- Type: text/plain, Size: 479 bytes --]

diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
index ba04c12..c2de2a9 100644
--- a/includes/sys/sdt.h
+++ b/includes/sys/sdt.h
@@ -30,7 +30,6 @@
 # define _SDT_DEPAREN_11(a,b,c,d,e,f,g,h,i,j,k)		a b c d e f g h i j k
 # define _SDT_DEPAREN_12(a,b,c,d,e,f,g,h,i,j,k,l)	a b c d e f g h i j k l
 #else
-# include <stdint.h>
 # define _SDT_PROBE(provider, name, n, arglist) \
   do {									    \
     __asm__ __volatile__ (_SDT_ASM_BODY(provider, name, _SDT_ASM_ARGS, (n)) \

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

* Re: [PATCH] Remove <stdint.h> from <sys/sdt.h>
  2014-10-21  9:09 [PATCH] Remove <stdint.h> from <sys/sdt.h> Chung-Lin Tang
@ 2014-10-21 14:29 ` Josh Stone
  2014-10-23 15:27   ` Chung-Lin Tang
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Stone @ 2014-10-21 14:29 UTC (permalink / raw)
  To: Chung-Lin Tang, systemtap

On 10/21/2014 05:09 AM, Chung-Lin Tang wrote:
> Hi,
> We're in the process of considering adding the <sys/sdt.h> header during
> the build of a full toolchain, which will allow the enabling of
> SystemTap probes in some target libraries (e.g. glibc).
> 
> There's a small problem that I'm encountering:  we're configuring glibc
> with --enable-systemtap, but the configure tests tries a test compile
> with <sys/sdt.h> before we even have glibc (headers) installed, a small
> circular dependency actually.

That is a nice ordering problem indeed...

> I'm guessing the [u]int(8/16/32)_t types were probably historically used
> in the <sys/sdt.h> header, but as of currently I see no need of
> <stdint.h> in there. May I suggest to simply remove the #include?  (I've
> attached the one-liner patch to be clear)

I'm trying to see why we had that even historically, and I'm not sure.
As of now, the only thing I see is __CHAR_BIT__, which is builtin by
gcc.  Roland also mentioned a while ago that we might remove stdint.h:
https://lists.fedoraproject.org/pipermail/devel/2011-January/147999.html

The only risk is that someone may have come to depend on this indirect
inclusion, but any such user really ought to include stdint.h directly.

Have you tried the testsuite with that line removed?

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

* Re: [PATCH] Remove <stdint.h> from <sys/sdt.h>
  2014-10-21 14:29 ` Josh Stone
@ 2014-10-23 15:27   ` Chung-Lin Tang
  0 siblings, 0 replies; 3+ messages in thread
From: Chung-Lin Tang @ 2014-10-23 15:27 UTC (permalink / raw)
  To: Josh Stone, systemtap

On 2014/10/21 10:29 PM, Josh Stone wrote:
> On 10/21/2014 05:09 AM, Chung-Lin Tang wrote:
>> Hi,
>> We're in the process of considering adding the <sys/sdt.h> header during
>> the build of a full toolchain, which will allow the enabling of
>> SystemTap probes in some target libraries (e.g. glibc).
>>
>> There's a small problem that I'm encountering:  we're configuring glibc
>> with --enable-systemtap, but the configure tests tries a test compile
>> with <sys/sdt.h> before we even have glibc (headers) installed, a small
>> circular dependency actually.
> 
> That is a nice ordering problem indeed...
> 
>> I'm guessing the [u]int(8/16/32)_t types were probably historically used
>> in the <sys/sdt.h> header, but as of currently I see no need of
>> <stdint.h> in there. May I suggest to simply remove the #include?  (I've
>> attached the one-liner patch to be clear)
> 
> I'm trying to see why we had that even historically, and I'm not sure.
> As of now, the only thing I see is __CHAR_BIT__, which is builtin by
> gcc.  Roland also mentioned a while ago that we might remove stdint.h:
> https://lists.fedoraproject.org/pipermail/devel/2011-January/147999.html
> 
> The only risk is that someone may have come to depend on this indirect
> inclusion, but any such user really ought to include stdint.h directly.
> 
> Have you tried the testsuite with that line removed?

I tried 'make installcheck' on a x86_64 machine. I see no regressions
before/after removing #include <stdint.h>  (actually I saw a single
FAIL->PASS in systemtap.samples/tcptest.stp, though I doubt it's because
of this change)

Thanks,
Chung-Lin

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

end of thread, other threads:[~2014-10-23 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-21  9:09 [PATCH] Remove <stdint.h> from <sys/sdt.h> Chung-Lin Tang
2014-10-21 14:29 ` Josh Stone
2014-10-23 15:27   ` Chung-Lin Tang

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).