]> sourceware.org Git - systemtap.git/commit
stapdyn: Add semaphore handling to dynsdt
authorJosh Stone <jistone@redhat.com>
Tue, 15 May 2012 23:41:22 +0000 (16:41 -0700)
committerJosh Stone <jistone@redhat.com>
Tue, 15 May 2012 23:41:22 +0000 (16:41 -0700)
commit91101b9c2d0f896be6aee7ab97c37b6079f9fe40
tree0ee579fe240f7c83a3af1f9941f6caa89f3fd87c
parent002d7a983ee63d44fc302bd3ddbfa35849db2fd0
stapdyn: Add semaphore handling to dynsdt

To test data-offset handling, this patch fleshes out SDT semaphore
support in the dynsdt test program.

It actually required a bit of section gymnastics to figure out the raw
file offset of the semaphore, mainly because of the padding between the
load addresses of the text and data segments.

This code appears to work fine tested on a small executable (the
heapsort example, modified to gate on the semaphore).  For unknown
reasons, it doesn't seem to work on the semaphored SDT in libpython.
The semaphore address appears to be computed and value incremented
correctly, but the instrumentation never fires.  The semaphore even
appears already incremented with a simultaneous stap -DDEBUG_UPROBES,
and that handler does fire on the python function probes.  This may be a
case of dyninst failing silently, as it does with longjmp SDT, but more
investigation is required...
stapdyn/dynsdt.cxx
This page took 0.028612 seconds and 5 git commands to generate.