Commit 9ac0bd93 authored by Shane Snyder's avatar Shane Snyder
Browse files

depracate old counters & update mod_register

parent 339ed251
...@@ -37,8 +37,8 @@ enum darshan_posix_indices ...@@ -37,8 +37,8 @@ enum darshan_posix_indices
MEM_NOT_ALIGNED, /* count of accesses not mem aligned */ MEM_NOT_ALIGNED, /* count of accesses not mem aligned */
MEM_ALIGNMENT, /* mem alignment in bytes */ MEM_ALIGNMENT, /* mem alignment in bytes */
FILE_NOT_ALIGNED, /* count of accesses not file aligned */ FILE_NOT_ALIGNED, /* count of accesses not file aligned */
#endif
FILE_ALIGNMENT, /* file alignment in bytes */ FILE_ALIGNMENT, /* file alignment in bytes */
#endif
POSIX_MAX_READ_TIME_SIZE, POSIX_MAX_READ_TIME_SIZE,
POSIX_MAX_WRITE_TIME_SIZE, POSIX_MAX_WRITE_TIME_SIZE,
#if 0 #if 0
......
...@@ -50,13 +50,6 @@ AC_ARG_ENABLE(group-readable-logs, ...@@ -50,13 +50,6 @@ AC_ARG_ENABLE(group-readable-logs,
fi] fi]
,) ,)
AC_ARG_ENABLE(stat-at-open,
[ --enable-stat-at-open Perform stat() call at open time to gather extra statistics],
[if test "x$enableval" = "xyes" ; then
AC_DEFINE(__CP_STAT_AT_OPEN, 1, Define if Darshan should stat files at open time to collect extra statistics)
fi]
,)
AC_ARG_WITH(mem-align, AC_ARG_WITH(mem-align,
[ --with-mem-align=<num> Memory alignment in bytes], [ --with-mem-align=<num> Memory alignment in bytes],
if test x$withval = xyes; then if test x$withval = xyes; then
......
...@@ -141,7 +141,8 @@ extern char* darshan_path_exclusions[]; /* defined in lib/darshan-core.c */ ...@@ -141,7 +141,8 @@ extern char* darshan_path_exclusions[]; /* defined in lib/darshan-core.c */
void darshan_core_register_module( void darshan_core_register_module(
darshan_module_id mod_id, darshan_module_id mod_id,
struct darshan_module_funcs *funcs, struct darshan_module_funcs *funcs,
int *runtime_mem_limit); int *mod_mem_limit,
int *sys_mem_alignment);
void darshan_core_unregister_module( void darshan_core_unregister_module(
darshan_module_id mod_id); darshan_module_id mod_id);
......
...@@ -1525,10 +1525,11 @@ static int darshan_log_append_all(MPI_File log_fh, struct darshan_core_runtime * ...@@ -1525,10 +1525,11 @@ static int darshan_log_append_all(MPI_File log_fh, struct darshan_core_runtime *
void darshan_core_register_module( void darshan_core_register_module(
darshan_module_id mod_id, darshan_module_id mod_id,
struct darshan_module_funcs *funcs, struct darshan_module_funcs *funcs,
int *runtime_mem_limit) int *mod_mem_limit,
int *sys_mem_alignment)
{ {
struct darshan_core_module* mod; struct darshan_core_module* mod;
*runtime_mem_limit = 0; *mod_mem_limit = 0;
if(!darshan_core || (mod_id >= DARSHAN_MAX_MODS)) if(!darshan_core || (mod_id >= DARSHAN_MAX_MODS))
return; return;
...@@ -1551,7 +1552,6 @@ void darshan_core_register_module( ...@@ -1551,7 +1552,6 @@ void darshan_core_register_module(
return; return;
} }
memset(mod, 0, sizeof(*mod)); memset(mod, 0, sizeof(*mod));
mod->id = mod_id; mod->id = mod_id;
mod->mod_funcs = *funcs; mod->mod_funcs = *funcs;
...@@ -1559,14 +1559,17 @@ void darshan_core_register_module( ...@@ -1559,14 +1559,17 @@ void darshan_core_register_module(
darshan_core->mod_array[mod_id] = mod; darshan_core->mod_array[mod_id] = mod;
/* TODO: something smarter than just 2 MiB per module */ /* TODO: something smarter than just 2 MiB per module */
*runtime_mem_limit = 2 * 1024 * 1024; *mod_mem_limit = 2 * 1024 * 1024;
if(sys_mem_alignment)
*sys_mem_alignment = darshan_mem_alignment;
DARSHAN_CORE_UNLOCK(); DARSHAN_CORE_UNLOCK();
return; return;
} }
/* TODO: implement & test*/ /* TODO: test */
void darshan_core_unregister_module( void darshan_core_unregister_module(
darshan_module_id mod_id) darshan_module_id mod_id)
{ {
......
...@@ -206,7 +206,8 @@ static void mpiio_runtime_initialize() ...@@ -206,7 +206,8 @@ static void mpiio_runtime_initialize()
darshan_core_register_module( darshan_core_register_module(
DARSHAN_MPIIO_MOD, DARSHAN_MPIIO_MOD,
&mpiio_mod_fns, &mpiio_mod_fns,
&mem_limit); &mem_limit,
NULL);
/* return if no memory assigned by darshan core */ /* return if no memory assigned by darshan core */
if(mem_limit == 0) if(mem_limit == 0)
......
...@@ -181,6 +181,7 @@ static struct posix_runtime *posix_runtime = NULL; ...@@ -181,6 +181,7 @@ static struct posix_runtime *posix_runtime = NULL;
static pthread_mutex_t posix_runtime_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; static pthread_mutex_t posix_runtime_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
static int instrumentation_disabled = 0; static int instrumentation_disabled = 0;
static int my_rank = -1; static int my_rank = -1;
static int darshan_mem_alignment = 1;
#define POSIX_LOCK() pthread_mutex_lock(&posix_runtime_mutex) #define POSIX_LOCK() pthread_mutex_lock(&posix_runtime_mutex)
#define POSIX_UNLOCK() pthread_mutex_unlock(&posix_runtime_mutex) #define POSIX_UNLOCK() pthread_mutex_unlock(&posix_runtime_mutex)
...@@ -1246,7 +1247,8 @@ static void posix_runtime_initialize() ...@@ -1246,7 +1247,8 @@ static void posix_runtime_initialize()
darshan_core_register_module( darshan_core_register_module(
DARSHAN_POSIX_MOD, DARSHAN_POSIX_MOD,
&posix_mod_fns, &posix_mod_fns,
&mem_limit); &mem_limit,
&darshan_mem_alignment);
/* return if no memory assigned by darshan core */ /* return if no memory assigned by darshan core */
if(mem_limit == 0) if(mem_limit == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment