Clean up CSTYLEDs

69 CSTYLED BEGINs remain, appx. 30 of which can be removed if cstyle(1)
had a useful policy regarding
  CALL(ARG1,
  	ARG2,
  	ARG3);
above 2 lines. As it stands, it spits out *both*
  sysctl_os.c: 385: continuation line should be indented by 4 spaces
  sysctl_os.c: 385: indent by spaces instead of tabs
which is very cool

Another >10 could be fixed by removing "ulong" &al. handling.
I don't foresee anyone actually using it intentionally
(does it even exist in modern headers? why did it in the first place?).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12993
This commit is contained in:
наб
2022-01-21 17:07:15 +01:00
committed by Brian Behlendorf
parent a3fecf4f10
commit 7ada752a93
127 changed files with 522 additions and 748 deletions
+15 -15
View File
@@ -40,13 +40,13 @@ typedef struct kernel_param zfs_kernel_param_t;
#define ZMOD_RW 0644
#define ZMOD_RD 0444
/* BEGIN CSTYLED */
#define INT int
#define LONG long
/* BEGIN CSTYLED */
#define UINT uint
#define ULONG ulong
#define LONG long
#define STRING charp
/* END CSTYLED */
#define STRING charp
enum scope_prefix_types {
zfs,
@@ -108,12 +108,11 @@ enum scope_prefix_types {
* on Linux:
* dmu_prefetch_max
*/
/* BEGIN CSTYLED */
#define ZFS_MODULE_PARAM(scope_prefix, name_prefix, name, type, perm, desc) \
CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \
CTASSERT_GLOBAL( \
sizeof (scope_prefix) == sizeof (enum scope_prefix_types)); \
module_param(name_prefix ## name, type, perm); \
MODULE_PARM_DESC(name_prefix ## name, desc)
/* END CSTYLED */
/*
* Declare a module parameter / sysctl node
@@ -137,23 +136,24 @@ enum scope_prefix_types {
* on Linux:
* spa_slop_shift
*/
/* BEGIN CSTYLED */
#define ZFS_MODULE_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \
module_param_call(name_prefix ## name, setfunc, getfunc, &name_prefix ## name, perm); \
#define ZFS_MODULE_PARAM_CALL( \
scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
CTASSERT_GLOBAL( \
sizeof (scope_prefix) == sizeof (enum scope_prefix_types)); \
module_param_call(name_prefix ## name, setfunc, getfunc, \
&name_prefix ## name, perm); \
MODULE_PARM_DESC(name_prefix ## name, desc)
/* END CSTYLED */
/*
* As above, but there is no variable with the name name_prefix ## name,
* so NULL is passed to module_param_call instead.
*/
/* BEGIN CSTYLED */
#define ZFS_MODULE_VIRTUAL_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \
#define ZFS_MODULE_VIRTUAL_PARAM_CALL( \
scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
CTASSERT_GLOBAL(\
sizeof (scope_prefix) == sizeof (enum scope_prefix_types)); \
module_param_call(name_prefix ## name, setfunc, getfunc, NULL, perm); \
MODULE_PARM_DESC(name_prefix ## name, desc)
/* END CSTYLED */
#define ZFS_MODULE_PARAM_ARGS const char *buf, zfs_kernel_param_t *kp
+4 -6
View File
@@ -102,13 +102,11 @@ typedef struct ace_object {
#define ACE_TYPE_FLAGS (ACE_OWNER|ACE_GROUP|ACE_EVERYONE|ACE_IDENTIFIER_GROUP)
/* BEGIN CSTYLED */
#define ACE_ALL_PERMS (ACE_READ_DATA|ACE_LIST_DIRECTORY|ACE_WRITE_DATA| \
ACE_ADD_FILE|ACE_APPEND_DATA|ACE_ADD_SUBDIRECTORY|ACE_READ_NAMED_ATTRS| \
ACE_WRITE_NAMED_ATTRS|ACE_EXECUTE|ACE_DELETE_CHILD|ACE_READ_ATTRIBUTES| \
ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_WRITE_ACL| \
ACE_WRITE_OWNER|ACE_SYNCHRONIZE)
/* END CSTYLED */
ACE_ADD_FILE|ACE_APPEND_DATA|ACE_ADD_SUBDIRECTORY|ACE_READ_NAMED_ATTRS|\
ACE_WRITE_NAMED_ATTRS|ACE_EXECUTE|ACE_DELETE_CHILD|ACE_READ_ATTRIBUTES|\
ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_WRITE_ACL| \
ACE_WRITE_OWNER|ACE_SYNCHRONIZE)
#define VSA_ACE 0x0010
#define VSA_ACECNT 0x0020
+26 -28
View File
@@ -58,74 +58,73 @@ int spl_panic(const char *file, const char *func, int line,
const char *fmt, ...);
void spl_dumpstack(void);
/* BEGIN CSTYLED */
#define PANIC(fmt, a...) \
spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a)
#define VERIFY(cond) \
(void) (unlikely(!(cond)) && \
#define VERIFY(cond) \
(void) (unlikely(!(cond)) && \
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
"%s", "VERIFY(" #cond ") failed\n"))
#define VERIFY3B(LEFT, OP, RIGHT) do { \
#define VERIFY3B(LEFT, OP, RIGHT) do { \
const boolean_t _verify3_left = (boolean_t)(LEFT); \
const boolean_t _verify3_right = (boolean_t)(RIGHT);\
const boolean_t _verify3_right = (boolean_t)(RIGHT); \
if (unlikely(!(_verify3_left OP _verify3_right))) \
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
"failed (%d " #OP " %d)\n", \
(boolean_t) (_verify3_left), \
(boolean_t) (_verify3_right)); \
"failed (%d " #OP " %d)\n", \
(boolean_t)(_verify3_left), \
(boolean_t)(_verify3_right)); \
} while (0)
#define VERIFY3S(LEFT, OP, RIGHT) do { \
#define VERIFY3S(LEFT, OP, RIGHT) do { \
const int64_t _verify3_left = (int64_t)(LEFT); \
const int64_t _verify3_right = (int64_t)(RIGHT); \
if (unlikely(!(_verify3_left OP _verify3_right))) \
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
"failed (%lld " #OP " %lld)\n", \
(long long) (_verify3_left), \
(long long) (_verify3_right)); \
"failed (%lld " #OP " %lld)\n", \
(long long)(_verify3_left), \
(long long)(_verify3_right)); \
} while (0)
#define VERIFY3U(LEFT, OP, RIGHT) do { \
#define VERIFY3U(LEFT, OP, RIGHT) do { \
const uint64_t _verify3_left = (uint64_t)(LEFT); \
const uint64_t _verify3_right = (uint64_t)(RIGHT); \
if (unlikely(!(_verify3_left OP _verify3_right))) \
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
"failed (%llu " #OP " %llu)\n", \
(unsigned long long) (_verify3_left), \
(unsigned long long) (_verify3_right)); \
"failed (%llu " #OP " %llu)\n", \
(unsigned long long)(_verify3_left), \
(unsigned long long)(_verify3_right)); \
} while (0)
#define VERIFY3P(LEFT, OP, RIGHT) do { \
#define VERIFY3P(LEFT, OP, RIGHT) do { \
const uintptr_t _verify3_left = (uintptr_t)(LEFT); \
const uintptr_t _verify3_right = (uintptr_t)(RIGHT);\
const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \
if (unlikely(!(_verify3_left OP _verify3_right))) \
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
"failed (%px " #OP " %px)\n", \
(void *) (_verify3_left), \
(void *) (_verify3_right)); \
"failed (%px " #OP " %px)\n", \
(void *) (_verify3_left), \
(void *) (_verify3_right)); \
} while (0)
#define VERIFY0(RIGHT) do { \
const int64_t _verify3_left = (int64_t)(0); \
#define VERIFY0(RIGHT) do { \
const int64_t _verify3_left = (int64_t)(0); \
const int64_t _verify3_right = (int64_t)(RIGHT); \
if (unlikely(!(_verify3_left == _verify3_right))) \
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
"VERIFY3(0 == " #RIGHT ") " \
"failed (0 == %lld)\n", \
(long long) (_verify3_right)); \
"VERIFY3(0 == " #RIGHT ") " \
"failed (0 == %lld)\n", \
(long long) (_verify3_right)); \
} while (0)
#define CTASSERT_GLOBAL(x) _CTASSERT(x, __LINE__)
#define CTASSERT(x) { _CTASSERT(x, __LINE__); }
#define _CTASSERT(x, y) __CTASSERT(x, y)
#define __CTASSERT(x, y) \
typedef char __attribute__ ((unused)) \
typedef char __attribute__((unused)) \
__compile_time_assertion__ ## y[(x) ? 1 : -1]
/*
@@ -167,7 +166,6 @@ void spl_dumpstack(void);
((void)(likely(!!(A) == !!(B)) || \
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
"(" #A ") is equivalent to (" #B ")")))
/* END CSTYLED */
#endif /* NDEBUG */
+1 -2
View File
@@ -113,8 +113,8 @@ spl_mutex_lockdep_on_maybe(kmutex_t *mp) \
VERIFY3P(mutex_owner(mp), ==, NULL); \
}
/* BEGIN CSTYLED */
#define mutex_tryenter(mp) \
/* CSTYLED */ \
({ \
int _rc_; \
\
@@ -125,7 +125,6 @@ spl_mutex_lockdep_on_maybe(kmutex_t *mp) \
\
_rc_; \
})
/* END CSTYLED */
#define NESTED_SINGLE 1
+5 -7
View File
@@ -116,8 +116,7 @@ RW_READ_HELD(krwlock_t *rwp)
* will be correctly located in the users code which is important
* for the built in kernel lock analysis tools
*/
/* BEGIN CSTYLED */
#define rw_init(rwp, name, type, arg) \
#define rw_init(rwp, name, type, arg) /* CSTYLED */ \
({ \
static struct lock_class_key __key; \
ASSERT(type == RW_DEFAULT || type == RW_NOLOCKDEP); \
@@ -138,7 +137,7 @@ RW_READ_HELD(krwlock_t *rwp)
*/
#define rw_tryupgrade(rwp) RW_WRITE_HELD(rwp)
#define rw_tryenter(rwp, rw) \
#define rw_tryenter(rwp, rw) /* CSTYLED */ \
({ \
int _rc_ = 0; \
\
@@ -158,7 +157,7 @@ RW_READ_HELD(krwlock_t *rwp)
_rc_; \
})
#define rw_enter(rwp, rw) \
#define rw_enter(rwp, rw) /* CSTYLED */ \
({ \
spl_rw_lockdep_off_maybe(rwp); \
switch (rw) { \
@@ -175,7 +174,7 @@ RW_READ_HELD(krwlock_t *rwp)
spl_rw_lockdep_on_maybe(rwp); \
})
#define rw_exit(rwp) \
#define rw_exit(rwp) /* CSTYLED */ \
({ \
spl_rw_lockdep_off_maybe(rwp); \
if (RW_WRITE_HELD(rwp)) { \
@@ -188,13 +187,12 @@ RW_READ_HELD(krwlock_t *rwp)
spl_rw_lockdep_on_maybe(rwp); \
})
#define rw_downgrade(rwp) \
#define rw_downgrade(rwp) /* CSTYLED */ \
({ \
spl_rw_lockdep_off_maybe(rwp); \
spl_rw_clear_owner(rwp); \
downgrade_write(SEM(rwp)); \
spl_rw_lockdep_on_maybe(rwp); \
})
/* END CSTYLED */
#endif /* _SPL_RWLOCK_H */
+2 -4
View File
@@ -49,11 +49,9 @@ typedef void (*thread_func_t)(void *);
__thread_create(stk, stksize, (thread_func_t)func, \
name, arg, len, pp, state, pri)
/* BEGIN CSTYLED */
#define thread_create(stk, stksize, func, arg, len, pp, state, pri) \
__thread_create(stk, stksize, (thread_func_t)func, \
#func, arg, len, pp, state, pri)
/* END CSTYLED */
__thread_create(stk, stksize, (thread_func_t)func, #func, \
arg, len, pp, state, pri)
#define thread_exit() __thread_exit()
#define thread_join(t) VERIFY(0)
+10 -16
View File
@@ -40,26 +40,20 @@
* DTRACE_PROBE1(...,
* taskq_ent_t *, ...);
*/
/* BEGIN CSTYLED */
DECLARE_EVENT_CLASS(zfs_taskq_ent_class,
TP_PROTO(taskq_ent_t *taskq_ent),
TP_ARGS(taskq_ent),
TP_STRUCT__entry(
__field(taskq_ent_t *, taskq_ent)
),
TP_fast_assign(
__entry->taskq_ent = taskq_ent;
),
TP_printk("taskq_ent %p", __entry->taskq_ent)
TP_PROTO(taskq_ent_t *taskq_ent),
TP_ARGS(taskq_ent),
TP_STRUCT__entry(__field(taskq_ent_t *, taskq_ent)),
TP_fast_assign(
__entry->taskq_ent = taskq_ent;
),
TP_printk("taskq_ent %p", __entry->taskq_ent)
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_TASKQ_EVENT(name) \
#define DEFINE_TASKQ_EVENT(name) \
DEFINE_EVENT(zfs_taskq_ent_class, name, \
TP_PROTO(taskq_ent_t *taskq_ent), \
TP_ARGS(taskq_ent))
/* END CSTYLED */
TP_PROTO(taskq_ent_t *taskq_ent), \
TP_ARGS(taskq_ent))
DEFINE_TASKQ_EVENT(zfs_taskq_ent__birth);
DEFINE_TASKQ_EVENT(zfs_taskq_ent__start);
DEFINE_TASKQ_EVENT(zfs_taskq_ent__finish);
+2 -4
View File
@@ -135,12 +135,10 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_ACE_EVENT(name) \
DEFINE_EVENT(zfs_ace_class, name, \
TP_PROTO(znode_t *zn, zfs_ace_hdr_t *ace, uint32_t mask_matched), \
TP_ARGS(zn, ace, mask_matched))
/* END CSTYLED */
TP_PROTO(znode_t *zn, zfs_ace_hdr_t *ace, uint32_t mask_matched), \
TP_ARGS(zn, ace, mask_matched))
DEFINE_ACE_EVENT(zfs_zfs__ace__denies);
DEFINE_ACE_EVENT(zfs_zfs__ace__allows);
+13 -26
View File
@@ -98,12 +98,10 @@ DECLARE_EVENT_CLASS(zfs_arc_buf_hdr_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_ARC_BUF_HDR_EVENT(name) \
DEFINE_EVENT(zfs_arc_buf_hdr_class, name, \
TP_PROTO(arc_buf_hdr_t *ab), \
TP_ARGS(ab))
/* END CSTYLED */
TP_PROTO(arc_buf_hdr_t *ab), \
TP_ARGS(ab))
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__hit);
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__evict);
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__delete);
@@ -143,12 +141,10 @@ DECLARE_EVENT_CLASS(zfs_l2arc_rw_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_L2ARC_RW_EVENT(name) \
DEFINE_EVENT(zfs_l2arc_rw_class, name, \
TP_PROTO(vdev_t *vd, zio_t *zio), \
TP_ARGS(vd, zio))
/* END CSTYLED */
TP_PROTO(vdev_t *vd, zio_t *zio), \
TP_ARGS(vd, zio))
DEFINE_L2ARC_RW_EVENT(zfs_l2arc__read);
DEFINE_L2ARC_RW_EVENT(zfs_l2arc__write);
@@ -170,12 +166,10 @@ DECLARE_EVENT_CLASS(zfs_l2arc_iodone_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_L2ARC_IODONE_EVENT(name) \
DEFINE_EVENT(zfs_l2arc_iodone_class, name, \
TP_PROTO(zio_t *zio, l2arc_write_callback_t *cb), \
TP_ARGS(zio, cb))
/* END CSTYLED */
TP_PROTO(zio_t *zio, l2arc_write_callback_t *cb), \
TP_ARGS(zio, cb))
DEFINE_L2ARC_IODONE_EVENT(zfs_l2arc__iodone);
@@ -284,13 +278,11 @@ DECLARE_EVENT_CLASS(zfs_arc_miss_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_ARC_MISS_EVENT(name) \
DEFINE_EVENT(zfs_arc_miss_class, name, \
TP_PROTO(arc_buf_hdr_t *hdr, \
const blkptr_t *bp, uint64_t size, const zbookmark_phys_t *zb), \
TP_ARGS(hdr, bp, size, zb))
/* END CSTYLED */
TP_PROTO(arc_buf_hdr_t *hdr, \
const blkptr_t *bp, uint64_t size, const zbookmark_phys_t *zb), \
TP_ARGS(hdr, bp, size, zb))
DEFINE_ARC_MISS_EVENT(zfs_arc__miss);
/*
@@ -345,13 +337,10 @@ DECLARE_EVENT_CLASS(zfs_l2arc_evict_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_L2ARC_EVICT_EVENT(name) \
DEFINE_EVENT(zfs_l2arc_evict_class, name, \
TP_PROTO(l2arc_dev_t *dev, \
list_t *buflist, uint64_t taddr, boolean_t all), \
TP_ARGS(dev, buflist, taddr, all))
/* END CSTYLED */
TP_PROTO(l2arc_dev_t *dev, list_t *buflist, uint64_t taddr, boolean_t all),\
TP_ARGS(dev, buflist, taddr, all))
DEFINE_L2ARC_EVICT_EVENT(zfs_l2arc__evict);
/*
@@ -381,12 +370,10 @@ DECLARE_EVENT_CLASS(zfs_arc_wait_for_eviction_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_ARC_WAIT_FOR_EVICTION_EVENT(name) \
DEFINE_EVENT(zfs_arc_wait_for_eviction_class, name, \
TP_PROTO(uint64_t amount, uint64_t arc_evict_count, uint64_t aew_count), \
TP_ARGS(amount, arc_evict_count, aew_count))
/* END CSTYLED */
TP_PROTO(uint64_t amount, uint64_t arc_evict_count, uint64_t aew_count), \
TP_ARGS(amount, arc_evict_count, aew_count))
DEFINE_ARC_WAIT_FOR_EVICTION_EVENT(zfs_arc__wait__for__eviction);
#endif /* _TRACE_ARC_H */
+2 -4
View File
@@ -65,12 +65,10 @@ DECLARE_EVENT_CLASS(zfs_dprintf_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_DPRINTF_EVENT(name) \
DEFINE_EVENT(zfs_dprintf_class, name, \
TP_PROTO(const char *msg), \
TP_ARGS(msg))
/* END CSTYLED */
TP_PROTO(const char *msg), \
TP_ARGS(msg))
DEFINE_DPRINTF_EVENT(zfs_zfs__dprintf);
#endif /* _TRACE_DBGMSG_H */
+6 -12
View File
@@ -117,20 +117,16 @@ DECLARE_EVENT_CLASS(zfs_dbuf_state_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_DBUF_EVENT(name) \
DEFINE_EVENT(zfs_dbuf_class, name, \
TP_PROTO(dmu_buf_impl_t *db, zio_t *zio), \
TP_ARGS(db, zio))
/* END CSTYLED */
TP_PROTO(dmu_buf_impl_t *db, zio_t *zio), \
TP_ARGS(db, zio))
DEFINE_DBUF_EVENT(zfs_blocked__read);
/* BEGIN CSTYLED */
#define DEFINE_DBUF_STATE_EVENT(name) \
DEFINE_EVENT(zfs_dbuf_state_class, name, \
TP_PROTO(dmu_buf_impl_t *db, const char *why), \
TP_ARGS(db, why))
/* END CSTYLED */
TP_PROTO(dmu_buf_impl_t *db, const char *why), \
TP_ARGS(db, why))
DEFINE_DBUF_STATE_EVENT(zfs_dbuf__state_change);
/* BEGIN CSTYLED */
@@ -143,12 +139,10 @@ DECLARE_EVENT_CLASS(zfs_dbuf_evict_one_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_DBUF_EVICT_ONE_EVENT(name) \
DEFINE_EVENT(zfs_dbuf_evict_one_class, name, \
TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls), \
TP_ARGS(db, mls))
/* END CSTYLED */
TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls), \
TP_ARGS(db, mls))
DEFINE_DBUF_EVICT_ONE_EVENT(zfs_dbuf__evict__one);
#endif /* _TRACE_DBUF_H */
+5 -9
View File
@@ -81,12 +81,10 @@ DECLARE_EVENT_CLASS(zfs_delay_mintime_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_DELAY_MINTIME_EVENT(name) \
DEFINE_EVENT(zfs_delay_mintime_class, name, \
TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time), \
TP_ARGS(tx, dirty, min_tx_time))
/* END CSTYLED */
TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time), \
TP_ARGS(tx, dirty, min_tx_time))
DEFINE_DELAY_MINTIME_EVENT(zfs_delay__mintime);
/* BEGIN CSTYLED */
@@ -110,13 +108,11 @@ DECLARE_EVENT_CLASS(zfs_free_long_range_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_FREE_LONG_RANGE_EVENT(name) \
DEFINE_EVENT(zfs_free_long_range_class, name, \
TP_PROTO(uint64_t long_free_dirty_all_txgs, \
uint64_t chunk_len, uint64_t txg), \
TP_ARGS(long_free_dirty_all_txgs, chunk_len, txg))
/* END CSTYLED */
TP_PROTO(uint64_t long_free_dirty_all_txgs, \
uint64_t chunk_len, uint64_t txg), \
TP_ARGS(long_free_dirty_all_txgs, chunk_len, txg))
DEFINE_FREE_LONG_RANGE_EVENT(zfs_free__long__range);
#endif /* _TRACE_DMU_H */
+2 -4
View File
@@ -105,12 +105,10 @@ DECLARE_EVENT_CLASS(zfs_dnode_move_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_DNODE_MOVE_EVENT(name) \
DEFINE_EVENT(zfs_dnode_move_class, name, \
TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), \
TP_ARGS(dn, refcount, dbufs))
/* END CSTYLED */
TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), \
TP_ARGS(dn, refcount, dbufs))
DEFINE_DNODE_MOVE_EVENT(zfs_dnode__move);
#endif /* _TRACE_DNODE_H */
+2 -4
View File
@@ -63,12 +63,10 @@ DECLARE_EVENT_CLASS(zfs_multilist_insert_remove_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_MULTILIST_INSERT_REMOVE_EVENT(name) \
DEFINE_EVENT(zfs_multilist_insert_remove_class, name, \
TP_PROTO(multilist_t *ml, unsigned int sublist_idx, void *obj), \
TP_ARGS(ml, sublist_idx, obj))
/* END CSTYLED */
TP_PROTO(multilist_t *ml, unsigned int sublist_idx, void *obj), \
TP_ARGS(ml, sublist_idx, obj))
DEFINE_MULTILIST_INSERT_REMOVE_EVENT(zfs_multilist__insert);
DEFINE_MULTILIST_INSERT_REMOVE_EVENT(zfs_multilist__remove);
+2 -4
View File
@@ -55,12 +55,10 @@ DECLARE_EVENT_CLASS(zfs_txg_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_TXG_EVENT(name) \
DEFINE_EVENT(zfs_txg_class, name, \
TP_PROTO(dsl_pool_t *dp, uint64_t txg), \
TP_ARGS(dp, txg))
/* END CSTYLED */
TP_PROTO(dsl_pool_t *dp, uint64_t txg), \
TP_ARGS(dp, txg))
DEFINE_TXG_EVENT(zfs_dsl_pool_sync__done);
DEFINE_TXG_EVENT(zfs_txg__quiescing);
DEFINE_TXG_EVENT(zfs_txg__opened);
+5 -9
View File
@@ -68,12 +68,10 @@ DECLARE_EVENT_CLASS(zfs_removing_class_3,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_REMOVE_FREE_EVENT(name) \
#define DEFINE_REMOVE_FREE_EVENT(name) \
DEFINE_EVENT(zfs_removing_class_3, name, \
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size), \
TP_ARGS(spa, offset, size))
/* END CSTYLED */
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size), \
TP_ARGS(spa, offset, size))
DEFINE_REMOVE_FREE_EVENT(zfs_remove__free__synced);
DEFINE_REMOVE_FREE_EVENT(zfs_remove__free__unvisited);
@@ -107,12 +105,10 @@ DECLARE_EVENT_CLASS(zfs_removing_class_4,
__entry->vdev_size, __entry->vdev_txg)
);
/* BEGIN CSTYLED */
#define DEFINE_REMOVE_FREE_EVENT_TXG(name) \
DEFINE_EVENT(zfs_removing_class_4, name, \
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size,uint64_t txg), \
TP_ARGS(spa, offset, size, txg))
/* END CSTYLED */
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size,uint64_t txg), \
TP_ARGS(spa, offset, size, txg))
DEFINE_REMOVE_FREE_EVENT_TXG(zfs_remove__free__inflight);
#endif /* _TRACE_VDEV_H */
+4 -8
View File
@@ -170,14 +170,12 @@ DECLARE_EVENT_CLASS(zfs_zil_process_itx_class,
);
/* END CSTYLED */
/* BEGIN CSTYLED */
#define DEFINE_ZIL_PROCESS_ITX_EVENT(name) \
DEFINE_EVENT(zfs_zil_process_itx_class, name, \
TP_PROTO(zilog_t *zilog, itx_t *itx), \
TP_ARGS(zilog, itx))
TP_PROTO(zilog_t *zilog, itx_t *itx), \
TP_ARGS(zilog, itx))
DEFINE_ZIL_PROCESS_ITX_EVENT(zfs_zil__process__commit__itx);
DEFINE_ZIL_PROCESS_ITX_EVENT(zfs_zil__process__normal__itx);
/* END CSTYLED */
/*
* Generic support for two argument tracepoints of the form:
@@ -203,13 +201,11 @@ DECLARE_EVENT_CLASS(zfs_zil_commit_io_error_class,
ZILOG_TP_PRINTK_ARGS, ZCW_TP_PRINTK_ARGS)
);
/* BEGIN CSTYLED */
#define DEFINE_ZIL_COMMIT_IO_ERROR_EVENT(name) \
DEFINE_EVENT(zfs_zil_commit_io_error_class, name, \
TP_PROTO(zilog_t *zilog, zil_commit_waiter_t *zcw), \
TP_ARGS(zilog, zcw))
TP_PROTO(zilog_t *zilog, zil_commit_waiter_t *zcw), \
TP_ARGS(zilog, zcw))
DEFINE_ZIL_COMMIT_IO_ERROR_EVENT(zfs_zil__commit__io__error);
/* END CSTYLED */
#endif /* _TRACE_ZIL_H */
+3 -3
View File
@@ -70,12 +70,12 @@ DECLARE_EVENT_CLASS(zfs_zrlock_class,
__entry->refcount, __entry->n)
#endif
);
/* END_CSTYLED */
/* END CSTYLED */
#define DEFINE_ZRLOCK_EVENT(name) \
DEFINE_EVENT(zfs_zrlock_class, name, \
TP_PROTO(zrlock_t *zrl, kthread_t *owner, uint32_t n), \
TP_ARGS(zrl, owner, n))
TP_PROTO(zrlock_t *zrl, kthread_t *owner, uint32_t n), \
TP_ARGS(zrl, owner, n))
DEFINE_ZRLOCK_EVENT(zfs_zrlock__reentry);
#endif /* _TRACE_ZRLOCK_H */