dax_set_debug, DAX_DEBUG_EXTRA - set debugging options
cc [ flag... ] file... -ldax [ library...] #include <dax.h> dax_status_t dax_set_debug(dax_context_t *ctx, uint64_t options);
This function sets options to check arguments in the libdax functions that use ctx.
The following are the values for the options parameter, and they can be logically OR'd together:
Check function arguments for validity before submitting them to DAX. Checks all conditions that return DAX_EINVAL and DAX_ETHREAD. If this option is disabled, skips the checking of DAX_EINVAL and DAX_ETHREAD. This reduces function CPU call time for programs that have been debugged. The results are undefined if checking is skipped and the arguments are not valid.
Perform more expensive consistency checks on the data that requires accessing multiple elements of a vector, such as summing aux_data lengths. Not recommended for production code.
Wait for the DAX command to complete before returning from the post functions. In other words, execute the command synchronously. This flag can only be set if there are no outstanding requests in the queue. If the command is posted with one of the dax_post() DAX_PIPE_XXXX flags, the pipe is not used. Not recommended for production code.
Enable the DAX DTrace probes. If you omit this option, DTrace probes are not invoked.
Enable all debugging options
Disable all debugging options
In addition, adds the options specified by the DAX_DEBUG_OPTIONS environment variable to the enabled set. Its format is a comma separated list of option names with no whitespace. Recognized names are arg, extra, and all.
Disables an option if it is not specified either in options or in DAX_DEBUG_OPTIONS.
If the function returns an error, there is no change in the debug options.
Operation completed successfully
The calling thread did not create ctx
Unrecognized flag in the options
DAX_DEBUG_SYNC is requested and one of the queues in ctx has outstanding requests.
After debugging the application, to optimize performance, disable debugging by using the DAX_DEBUG_OFF option. Bugs that would be caught on function entry with DAX_DEBUG_ARG may instead be caught during DAX execution and cause errors such as DAX_EPARSE or DAX_EDATAFMT, but this is not guaranteed; the function may return DAX_SUCCESS but produce incorrect output.
See attributes(5) for descriptions of the following attributes: