ARC: Cache arc_c value during arc_evict()
[zfs.git] / lib / libspl / include / sys / trace_zfs.h
blob87ed5ad3c3be718565d12d838b0dd2043f858ef6
1 /* Here to keep the libspl build happy */
3 #ifndef _LIBSPL_ZFS_TRACE_H
4 #define _LIBSPL_ZFS_TRACE_H
6 /*
7 * The set-error SDT probe is extra static, in that we declare its fake
8 * function literally, rather than with the DTRACE_PROBE1() macro. This is
9 * necessary so that SET_ERROR() can evaluate to a value, which wouldn't
10 * be possible if it required multiple statements (to declare the function
11 * and then call it).
13 * SET_ERROR() uses the comma operator so that it can be used without much
14 * additional code. For example, "return (EINVAL);" becomes
15 * "return (SET_ERROR(EINVAL));". Note that the argument will be evaluated
16 * twice, so it should not have side effects (e.g. something like:
17 * "return (SET_ERROR(log_error(EINVAL, info)));" would log the error twice).
19 #undef SET_ERROR
20 #define SET_ERROR(err) \
21 (__set_error(__FILE__, __func__, __LINE__, err), err)
24 #endif