userspace probe breakage with gcc 4.8 due to inablility to locate semaphore variable

Frank Ch. Eigler fche@redhat.com
Thu Apr 16 14:29:00 GMT 2015


Mayuresh Kulkarni <mkulkarni@kcg.com> writes:

> [...]
> I had a userspace probe (details below) and this worked fine with stap 1.6 and gcc 4.6.  After upgrading to gcc 4.8, this has stopped working. (I believe this to be the only change, everything else on the box is the same)
> [...]
> But, stap -g -vvvvv with the following probe fails with failure to find foo_bar_semaphore

If you use relatively recent <sys/sdt.h> with semaphores (i.e., your C
program #defines _SDT_HAS_SEMAPHORES), you also need to run
"/usr/bin/dtrace -G ..." to create an object file that contains that
semaphore.  That .o needs to be linked into your executable.

- FChE



More information about the Systemtap mailing list