Skip to content

Commit e89c29e

Browse files
committed
Define varaible __darshan_disabled only in those files that make use of it
1 parent 6e76c4c commit e89c29e

File tree

12 files changed

+22
-2
lines changed

12 files changed

+22
-2
lines changed

darshan-runtime/lib/darshan-core-init-finalize.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "darshan.h"
2121
#include "darshan-dynamic.h"
2222

23+
static int __darshan_disabled;
24+
2325
#ifdef HAVE_MPI
2426
DARSHAN_FORWARD_DECL(PMPI_Finalize, int, ());
2527
DARSHAN_FORWARD_DECL(PMPI_Init, int, (int *argc, char ***argv));

darshan-runtime/lib/darshan-core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
#include <lustre/lustre_user.h>
5353
#endif
5454

55+
static int __darshan_disabled;
56+
5557
extern char* __progname;
5658
extern char* __progname_full;
5759
struct darshan_core_runtime *__darshan_core = NULL;

darshan-runtime/lib/darshan-daos.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
#include <daos_obj.h>
3535
#include <daos_array.h>
3636

37+
static int __darshan_disabled;
38+
3739
/* container access routines intercepted for maintaining pool/container UUIDs */
3840
DARSHAN_FORWARD_DECL(daos_cont_open, int, (daos_handle_t poh, const char *cont, unsigned int flags, daos_handle_t *coh, daos_cont_info_t *info, daos_event_t *ev));
3941
DARSHAN_FORWARD_DECL(daos_cont_global2local, int, (daos_handle_t poh, d_iov_t glob, daos_handle_t *coh));

darshan-runtime/lib/darshan-dfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#include <daos_array.h>
3636
#include <daos_fs.h>
3737

38+
static int __darshan_disabled;
39+
3840
DARSHAN_FORWARD_DECL(dfs_mount, int, (daos_handle_t poh, daos_handle_t coh, int flags, dfs_t **dfs));
3941
DARSHAN_FORWARD_DECL(dfs_global2local, int, (daos_handle_t poh, daos_handle_t coh, int flags, d_iov_t glob, dfs_t **dfs));
4042
DARSHAN_FORWARD_DECL(dfs_umount, int, (dfs_t *dfs));

darshan-runtime/lib/darshan-hdf5.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
#include <hdf5.h>
3232

33+
static int __darshan_disabled;
34+
3335
/* H5F prototypes */
3436
DARSHAN_FORWARD_DECL(H5Fcreate, hid_t, (const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist));
3537
DARSHAN_FORWARD_DECL(H5Fopen, hid_t, (const char *filename, unsigned flags, hid_t access_plist));

darshan-runtime/lib/darshan-mdhim.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include "darshan.h"
2525
#include "darshan-dynamic.h"
2626

27+
static int __darshan_disabled;
28+
2729
#define RECORD_STRING "total-mdhim-obj-stats"
2830

2931
/* The DARSHAN_FORWARD_DECL macro (defined in darshan.h) is used to provide forward

darshan-runtime/lib/darshan-mpiio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include "darshan-heatmap.h"
3232
#include "darshan-ldms.h"
3333

34+
static int __darshan_disabled;
35+
3436
DARSHAN_FORWARD_DECL(PMPI_File_close, int, (MPI_File *fh));
3537
DARSHAN_FORWARD_DECL(PMPI_File_iread, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));
3638
DARSHAN_FORWARD_DECL(PMPI_File_iread_all, int, (MPI_File fh, void *buf, int count, MPI_Datatype datatype, __D_MPI_REQUEST *request));

darshan-runtime/lib/darshan-null.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include "darshan.h"
2222
#include "darshan-dynamic.h"
2323

24+
static int __darshan_disabled;
25+
2426
/* module-specific macro to retrieve current time stamp. It first checks to
2527
* see if Darshan has been disabled at run time; in that case the module can
2628
* skip potentially costly timer calls.

darshan-runtime/lib/darshan-pnetcdf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
#include <pnetcdf.h>
3131

32+
static int __darshan_disabled;
33+
3234
/* structure that can track i/o stats for a given PnetCDF file record at runtime */
3335
struct pnetcdf_file_record_ref
3436
{

darshan-runtime/lib/darshan-posix.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
#include "darshan-heatmap.h"
3838
#include "darshan-ldms.h"
3939

40+
static int __darshan_disabled;
41+
4042
#ifndef HAVE_OFF64_T
4143
typedef int64_t off64_t;
4244
#endif

0 commit comments

Comments
 (0)