Static probing

Mikael Östlund mikael.ostlund.93 at gmail.com
Wed Jun 3 08:17:18 UTC 2015


Hello,

I'm experimenting with DTrace on my system and I'm not able to use static
probing in my code.

Here's my c code:

#include "provider.h"

int main(void) {
  TESTPROVIDER_TEST_START("hello");
  return (0);
}

And here's my provider.d file:

provider testprovider {
    probe test__start(char *);
    probe test__done(char *);
};

This is the error message I get when I try to compile my c file:

# gcc dtracetest.c
/tmp//ccjWNu6v.o: In function `main':
dtracetest.c:(.text+0xa): undefined reference to
`__dtrace_testprovider___test__start'
collect2: error: ld returned 1 exit status

(Same message no matter what compiler I try), any ideas?


More information about the freebsd-dtrace mailing list