dtrace_program_exec
() Function
After the D program is compiled, the consumer calls the dtrace_program_exec
() function to create the object file for the program and download the object file to the kernel. The object file contains all the information necessary for the DTrace framework in the kernel to execute the D program.
int dtrace_program_exec(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, dtrace_proginfo_t *pip)
The arguments to the dtrace_program_exec
() function are as follows:
-
The DTrace handle.
-
A pointer to the data structure representing the compiled program. This pointer is returned by the
dtrace_strcompile
() function. -
A pass-by-reference variable, which contains information about the D program. The definition of the
dtrace_proginfo_t
structure is provided in the/usr/include/dtrace.h
file.