Alexander Leidinger wrote: > Hi, > > while working on adding dtrace probes to the linuxulator, I thought it > may be interesting for some people to know how to do this, so I added > some text/examples into the wiki how to add static dtrace probes in the > kernel: > http://wiki.freebsd.org/HOWTO-dtrace-sdt > > If you are interested in the great debugging possibilities of dtrace, > don't be afraid to add some probes to the kernel. It's cheap and easy. Great, thank you! I have some questions about the document: Can you document a bit more the construction of the probe: SDT_PROBE_DEFINE(foobar, source_file1, foo, entry); SDT_PROBE_ARGTYPE(foobar, source_file1, foo, entry, 0, "int"); SDT_PROBE_ARGTYPE(foobar, source_file1, foo, entry, 1, "const char *"); SDT_PROBE_DEFINE(foobar, source_file1, foo, return); SDT_PROBE_ARGTYPE(foobar, source_file1, foo, return, 0, "int"); What is the meaning of "source_file1" and "foo"? SDT_PROBE_DEFINE(foobar, source_file2, bar, entry); SDT_PROBE_DEFINE(foobar, source_file2, bar, my_error_condition_name); SDT_PROBE_DEFINE(foobar, source_file2, bar, return); Here: what is my_error_condition_name? SDT_PROBE(foobar, source_file1, foo, entry, a, b, 0, 0, 0); Here: why are the last three arguments zeroes? From the context it looks like it should be possible to trace an arbitrary number of data - here a,b. Is the number of arguments implicitly constructed from the probe definition (STD_PROBE_ARGTYPE(...0...), STD_PROBE_ARGTYPE(...1...))?
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:38 UTC