diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-10-10 13:26:15 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-10-10 13:26:15 +0100 |
commit | c155330f04f933d13298d5cddab6b7f3dc9d218f (patch) | |
tree | 61d18967a14806cc8c60c4043cb5554b27372816 /src/guestfs-internal.h | |
parent | d6622d7636d592eb1c01fbcb8b8ad52c2b20615b (diff) | |
download | libguestfs-c155330f04f933d13298d5cddab6b7f3dc9d218f.tar.gz libguestfs-c155330f04f933d13298d5cddab6b7f3dc9d218f.tar.xz libguestfs-c155330f04f933d13298d5cddab6b7f3dc9d218f.zip |
Add systemtap/DTrace probes.
Mainly this is a documentation change. However a sample of
DTrace-compatible userspace probes are also added.
Diffstat (limited to 'src/guestfs-internal.h')
-rw-r--r-- | src/guestfs-internal.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 494003ef..64cf6960 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -43,6 +43,26 @@ #define N_(str) str #endif +#ifdef HAVE_SYS_SDT_H +#include <sys/sdt.h> +/* NB: The 'name' parameter is a literal identifier, NOT a string! */ +#define TRACE0(name) DTRACE_PROBE(guestfs, name) +#define TRACE1(name, arg1) \ + DTRACE_PROBE(guestfs, name, (arg1)) +#define TRACE2(name, arg1, arg2) \ + DTRACE_PROBE(guestfs, name, (arg1), (arg2)) +#define TRACE3(name, arg1, arg2, arg3) \ + DTRACE_PROBE(guestfs, name, (arg1), (arg2), (arg3)) +#define TRACE4(name, arg1, arg2, arg3, arg4) \ + DTRACE_PROBE(guestfs, name, (arg1), (arg2), (arg3), (arg4)) +#else +#define TRACE0(name) +#define TRACE1(name, arg1) +#define TRACE2(name, arg1, arg2) +#define TRACE3(name, arg1, arg2, arg3) +#define TRACE4(name, arg1, arg2, arg3, arg4) +#endif + #define TMP_TEMPLATE_ON_STACK(var) \ const char *ttos_tmpdir = guestfs_tmpdir (); \ char var[strlen (ttos_tmpdir) + 32]; \ |