From 5ee3f305e81fd2e1953d8a74530326f728a33ce8 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 18 Sep 2009 16:13:24 +0200 Subject: Always mark .probes section as writable. Allocated section needs to be writable when creating pic shared objects because we store relocatable addresses in them. We used to make this read only for non-pic executables, but the new semaphore support relies on having a writable .probes section to put the enabled variables in. * includes/sys/sdt.h (ALLOCSEC): Define unconditionally as "aw". --- includes/sys/sdt.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h index 104973df..7affade6 100644 --- a/includes/sys/sdt.h +++ b/includes/sys/sdt.h @@ -18,12 +18,10 @@ #endif /* Allocated section needs to be writable when creating pic shared objects - because we store relocatable addresses in them. */ -#ifdef __PIC__ + because we store relocatable addresses in them. We used to make this + read only for non-pic executables, but the new semaphore support relies + on having a writable .probes section to put the enabled variables in. */ #define ALLOCSEC "\"aw\"" -#else -#define ALLOCSEC "\"a\"" -#endif /* An allocated section .probes that holds the probe names and addrs. */ #define STAP_PROBE_DATA_(probe,guard,arg) \ -- cgit From 296970e4051e45e672d39ecc78fb31e626852043 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Fri, 18 Sep 2009 10:36:37 -0400 Subject: Uprobes not currently supported on ia64. --- runtime/uprobes/uprobes.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/runtime/uprobes/uprobes.txt b/runtime/uprobes/uprobes.txt index edd524be..98219eb9 100644 --- a/runtime/uprobes/uprobes.txt +++ b/runtime/uprobes/uprobes.txt @@ -143,7 +143,6 @@ architectures: - i386 - x86_64 (AMD-64, EM64T) - ppc64 -- ia64 - s390x 3. Configuring Uprobes -- cgit From 9500f4e4861b057f2335c76e7342aab0c8d9faf4 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 18 Sep 2009 19:40:23 +0200 Subject: Don't mark print_ustack() as pure, it has side effects (printing the stack). * tapset/ucontext-symbols.stp (print_ustack): Remove /* pure */ --- tapset/ucontext-symbols.stp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tapset/ucontext-symbols.stp b/tapset/ucontext-symbols.stp index e884a36b..574a32be 100644 --- a/tapset/ucontext-symbols.stp +++ b/tapset/ucontext-symbols.stp @@ -64,7 +64,7 @@ function usymdata:string (addr: long) %{ /* pure */ /* unprivileged */ * name of the function containing the address, and an estimate of * its position within that function. Return nothing. */ -function print_ustack(stk:string) %{ /* pure */ /* unprivileged */ +function print_ustack(stk:string) %{ /* unprivileged */ char *ptr = THIS->stk; char *tok = strsep(&ptr, " "); assert_is_myproc(); -- cgit From f2fb67a7c9c55986455644754ff84190b299f7b0 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 18 Sep 2009 21:38:35 +0200 Subject: * vta-test.c: Include sdt.h under test, not system installed sys/sdt.h. --- testsuite/systemtap.base/vta-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/systemtap.base/vta-test.c b/testsuite/systemtap.base/vta-test.c index 70d965c4..40986db9 100644 --- a/testsuite/systemtap.base/vta-test.c +++ b/testsuite/systemtap.base/vta-test.c @@ -1,5 +1,5 @@ #include -#include +#include "sdt.h" void t1 (int i) -- cgit From 60d4b7b28e659ad182ee318b77b28c866bb614ad Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 18 Sep 2009 22:10:04 +0200 Subject: buildok netdev.stp file shouldn't be using /usr/bin/env, but stap directly. --- testsuite/buildok/netdev.stp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/buildok/netdev.stp b/testsuite/buildok/netdev.stp index 25510379..49a1eb5c 100755 --- a/testsuite/buildok/netdev.stp +++ b/testsuite/buildok/netdev.stp @@ -1,4 +1,4 @@ -#! /usr/bin/env stap -wp4 +#! stap -wp4 probe netdev.get_stats{ printf("%s", dev_name) -- cgit From 0d8829d380af5a6fa909a37fb26ba88867e69a81 Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 18 Sep 2009 15:11:12 -0500 Subject: Fixed relay_old.c by providing ppoll(). * runtime/staprun/staprun.h: Put ppoll() declaration here (so that relay_old.c can use it). * runtime/staprun/relay.c (ppoll): Made ppoll() non-static so that relay_old.c can use it. --- runtime/staprun/relay.c | 11 ++--------- runtime/staprun/staprun.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/runtime/staprun/relay.c b/runtime/staprun/relay.c index 0c009235..59d7ac9a 100644 --- a/runtime/staprun/relay.c +++ b/runtime/staprun/relay.c @@ -22,16 +22,9 @@ static time_t *time_backlog[NR_CPUS]; static int backlog_order=0; #define BACKLOG_MASK ((1 << backlog_order) - 1) -/* - * ppoll exists in glibc >= 2.4 - */ -#if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 4)) -#define NEED_PPOLL -#endif - #ifdef NEED_PPOLL -static int ppoll(struct pollfd *fds, nfds_t nfds, - const struct timespec *timeout, const sigset_t *sigmask) +int ppoll(struct pollfd *fds, nfds_t nfds, + const struct timespec *timeout, const sigset_t *sigmask) { sigset_t origmask; int ready; diff --git a/runtime/staprun/staprun.h b/runtime/staprun/staprun.h index 1dcfabbe..f9f01003 100644 --- a/runtime/staprun/staprun.h +++ b/runtime/staprun/staprun.h @@ -186,3 +186,13 @@ extern int out_fd[NR_CPUS]; /* relay_old uses these. Set in ctl.c */ extern unsigned subbuf_size; extern unsigned n_subbufs; + +/* + * ppoll exists in glibc >= 2.4 + */ +#if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 4)) +#define NEED_PPOLL + +extern int ppoll(struct pollfd *fds, nfds_t nfds, + const struct timespec *timeout, const sigset_t *sigmask); +#endif -- cgit