Skip to content

Commit

Permalink
mark ZoL custom 'dtrace' macros ifdef __linux__
Browse files Browse the repository at this point in the history
    Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
  • Loading branch information
mattmacy committed Jul 9, 2019
1 parent cf67162 commit aa310e8
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/sys/zfs_context.h
Expand Up @@ -63,8 +63,8 @@
#include <sys/sunddi.h>
#include <sys/ctype.h>
#include <sys/disp.h>
#include <sys/trace.h>
#if defined(__linux__)
#include <sys/trace.h>
#include <sys/procfs_list.h>
#include <linux/dcache_compat.h>
#include <linux/utsname_compat.h>
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/arc.c
Expand Up @@ -297,6 +297,7 @@
#include <sys/vmsystm.h>
#include <sys/zpl.h>
#include <linux/page_compat.h>
#include <sys/trace_arc.h>
#elif defined(__FreeBSD__)
#include <sys/eventhandler.h>
#endif
Expand All @@ -306,7 +307,6 @@
#include <sys/zthr.h>
#include <zfs_fletcher.h>
#include <sys/arc_impl.h>
#include <sys/trace_arc.h>
#include <sys/aggsum.h>
#include <sys/cityhash.h>

Expand Down
2 changes: 2 additions & 0 deletions module/zfs/dbuf.c
Expand Up @@ -44,7 +44,9 @@
#include <sys/zfeature.h>
#include <sys/blkptr.h>
#include <sys/range_tree.h>
#ifdef __linux__
#include <sys/trace_dbuf.h>
#endif
#include <sys/callb.h>
#include <sys/abd.h>
#include <sys/vdev.h>
Expand Down
2 changes: 2 additions & 0 deletions module/zfs/dmu.c
Expand Up @@ -49,7 +49,9 @@
#include <sys/sa.h>
#include <sys/zfeature.h>
#include <sys/abd.h>
#ifdef __linux__
#include <sys/trace_dmu.h>
#endif
#include <sys/zfs_rlock.h>
#ifdef _KERNEL
#include <sys/vmsystm.h>
Expand Down
2 changes: 2 additions & 0 deletions module/zfs/dmu_tx.c
Expand Up @@ -37,7 +37,9 @@
#include <sys/sa.h>
#include <sys/sa_impl.h>
#include <sys/zfs_context.h>
#ifdef __linux__
#include <sys/trace_dmu.h>
#endif

typedef void (*dmu_tx_hold_func_t)(dmu_tx_t *tx, struct dnode *dn,
uint64_t arg1, uint64_t arg2);
Expand Down
6 changes: 5 additions & 1 deletion module/zfs/dnode.c
Expand Up @@ -37,8 +37,12 @@
#include <sys/zio.h>
#include <sys/dmu_zfetch.h>
#include <sys/range_tree.h>
#include <sys/trace_dnode.h>
#include <sys/zfs_project.h>
#include <sys/sdt.h>

#ifdef __linux__
#include <sys/trace_dnode.h>
#endif

dnode_stats_t dnode_stats = {
{ "dnode_hold_dbuf_hold", KSTAT_DATA_UINT64 },
Expand Down
6 changes: 5 additions & 1 deletion module/zfs/dsl_pool.c
Expand Up @@ -48,9 +48,13 @@
#include <sys/zfeature.h>
#include <sys/zil_impl.h>
#include <sys/dsl_userhold.h>
#include <sys/trace_txg.h>
#include <sys/sdt.h>
#include <sys/mmp.h>

#ifdef __linux__
#include <sys/trace_txg.h>
#endif

/*
* ZFS Write Throttle
* ------------------
Expand Down
2 changes: 2 additions & 0 deletions module/zfs/multilist.c
Expand Up @@ -18,7 +18,9 @@

#include <sys/zfs_context.h>
#include <sys/multilist.h>
#ifdef __linux__
#include <sys/trace_multilist.h>
#endif

/* needed for spa_get_random() */
#include <sys/spa.h>
Expand Down
2 changes: 2 additions & 0 deletions module/zfs/rrwlock.c
Expand Up @@ -28,7 +28,9 @@

#include <sys/refcount.h>
#include <sys/rrwlock.h>
#ifdef __linux__
#include <sys/trace_rrwlock.h>
#endif

/*
* This file contains the implementation of a re-entrant read
Expand Down
2 changes: 2 additions & 0 deletions module/zfs/trace.c
Expand Up @@ -38,6 +38,7 @@
#include <sys/zil_impl.h>
#include <sys/zrlock.h>

#ifdef __linux__
#define CREATE_TRACE_POINTS
#include <sys/trace.h>
#include <sys/trace_acl.h>
Expand All @@ -52,3 +53,4 @@
#include <sys/trace_zil.h>
#include <sys/trace_zio.h>
#include <sys/trace_zrlock.h>
#endif
2 changes: 2 additions & 0 deletions module/zfs/txg.c
Expand Up @@ -33,7 +33,9 @@
#include <sys/dsl_scan.h>
#include <sys/zil.h>
#include <sys/callb.h>
#ifdef __linux__
#include <sys/trace_txg.h>
#endif

/*
* ZFS Transaction Groups
Expand Down
2 changes: 2 additions & 0 deletions module/zfs/vdev_removal.c
Expand Up @@ -46,7 +46,9 @@
#include <sys/abd.h>
#include <sys/vdev_initialize.h>
#include <sys/vdev_trim.h>
#ifdef __linux__
#include <sys/trace_vdev.h>
#endif

/*
* This file contains the necessary logic to remove vdevs from a
Expand Down
5 changes: 4 additions & 1 deletion module/zfs/zil.c
Expand Up @@ -41,9 +41,12 @@
#include <sys/dmu_tx.h>
#include <sys/dsl_pool.h>
#include <sys/metaslab.h>
#include <sys/trace_zil.h>
#include <sys/abd.h>

#ifdef __linux__
#include <sys/trace_zil.h>
#endif

/*
* The ZFS Intent Log (ZIL) saves "transaction records" (itxs) of system
* calls that change the file system. Each itx has enough information to
Expand Down
5 changes: 4 additions & 1 deletion module/zfs/zio.c
Expand Up @@ -44,11 +44,14 @@
#include <sys/dsl_scan.h>
#include <sys/metaslab_impl.h>
#include <sys/time.h>
#include <sys/trace_zio.h>
#include <sys/abd.h>
#include <sys/dsl_crypt.h>
#include <sys/cityhash.h>

#ifdef __linux__
#include <sys/trace_zio.h>
#endif

/*
* ==========================================================================
* I/O type descriptions
Expand Down
2 changes: 2 additions & 0 deletions module/zfs/zrlock.c
Expand Up @@ -39,7 +39,9 @@
* function calls.
*/
#include <sys/zrlock.h>
#ifdef __linux__
#include <sys/trace_zrlock.h>
#endif

/*
* A ZRL can be locked only while there are zero references, so ZRL_LOCKED is
Expand Down

0 comments on commit aa310e8

Please sign in to comment.