FreeBSD 9.0-RC1 and DTrace Userland Probes

看板FB_questions作者時間14年前 (2011/10/27 12:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
I upgraded my box so that I can rock the userland DTrace probes. I have been following the example at: http://wiki.freebsd.org/DTrace/userland When I am ready to build my test probe, I run 'make' as the example shows. The result of that is the following: cc -O2 -pipe -fno-omit-frame-pointer -std=gnu99 -fstack-protector -c test.c cc -O2 -pipe -fno-omit-frame-pointer -std=gnu99 -fstack-protector -o test test.o test.o: In function `main': test.c:(.text+0x29): undefined reference to `__dtrace_prober___probe__before' test.c:(.text+0x45): undefined reference to `__dtrace_prober___probe__after' *** Error code 1 Same idea as the example, but I just changed the names around. Well, so I thought I would be smart and compile just the object file with: dtrace -G -s prober.d And that stalls. `truss` is showing that dtrace is stalling after a mmap, with what looks to be a valid returned address. /* provider.d */ provider prober { probe probe__before(char *); probe probe__after(char *); }; /* test.c */ #include <unistd.h> #include <sys/time.h> #include "provider.h" int main(void) { struct timeval tv; for ( ;; ) { sleep(1); PROBER_PROBE_BEFORE("foo"); gettimeofday(&tv, NULL); PROBER_PROBE_AFTER("bar"); } return 0; } Any insight would be wonderful. Thanks! -Matt _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1EgDx21i (FB_questions)