Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sudheer Chunduri
darshan
Commits
9ac0bd93
Commit
9ac0bd93
authored
Apr 01, 2015
by
Shane Snyder
Browse files
depracate old counters & update mod_register
parent
339ed251
Changes
6
Hide whitespace changes
Inline
Side-by-side
darshan-posix-log-format.h
View file @
9ac0bd93
...
...
@@ -37,8 +37,8 @@ enum darshan_posix_indices
MEM_NOT_ALIGNED, /* count of accesses not mem aligned */
MEM_ALIGNMENT, /* mem alignment in bytes */
FILE_NOT_ALIGNED, /* count of accesses not file aligned */
#endif
FILE_ALIGNMENT, /* file alignment in bytes */
#endif
POSIX_MAX_READ_TIME_SIZE
,
POSIX_MAX_WRITE_TIME_SIZE
,
#if 0
...
...
darshan-runtime/configure.in
View file @
9ac0bd93
...
...
@@ -50,13 +50,6 @@ AC_ARG_ENABLE(group-readable-logs,
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,
[ --with-mem-align=<num> Memory alignment in bytes],
if test x$withval = xyes; then
...
...
darshan-runtime/darshan.h
View file @
9ac0bd93
...
...
@@ -141,7 +141,8 @@ extern char* darshan_path_exclusions[]; /* defined in lib/darshan-core.c */
void
darshan_core_register_module
(
darshan_module_id
mod_id
,
struct
darshan_module_funcs
*
funcs
,
int
*
runtime_mem_limit
);
int
*
mod_mem_limit
,
int
*
sys_mem_alignment
);
void
darshan_core_unregister_module
(
darshan_module_id
mod_id
);
...
...
darshan-runtime/lib/darshan-core.c
View file @
9ac0bd93
...
...
@@ -1525,10 +1525,11 @@ static int darshan_log_append_all(MPI_File log_fh, struct darshan_core_runtime *
void
darshan_core_register_module
(
darshan_module_id
mod_id
,
struct
darshan_module_funcs
*
funcs
,
int
*
runtime_mem_limit
)
int
*
mod_mem_limit
,
int
*
sys_mem_alignment
)
{
struct
darshan_core_module
*
mod
;
*
runtime
_mem_limit
=
0
;
*
mod
_mem_limit
=
0
;
if
(
!
darshan_core
||
(
mod_id
>=
DARSHAN_MAX_MODS
))
return
;
...
...
@@ -1551,7 +1552,6 @@ void darshan_core_register_module(
return
;
}
memset
(
mod
,
0
,
sizeof
(
*
mod
));
mod
->
id
=
mod_id
;
mod
->
mod_funcs
=
*
funcs
;
...
...
@@ -1559,14 +1559,17 @@ void darshan_core_register_module(
darshan_core
->
mod_array
[
mod_id
]
=
mod
;
/* 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
();
return
;
}
/* TODO:
implement &
test*/
/* TODO: test
*/
void
darshan_core_unregister_module
(
darshan_module_id
mod_id
)
{
...
...
darshan-runtime/lib/darshan-mpiio.c
View file @
9ac0bd93
...
...
@@ -206,7 +206,8 @@ static void mpiio_runtime_initialize()
darshan_core_register_module
(
DARSHAN_MPIIO_MOD
,
&
mpiio_mod_fns
,
&
mem_limit
);
&
mem_limit
,
NULL
);
/* return if no memory assigned by darshan core */
if
(
mem_limit
==
0
)
...
...
darshan-runtime/lib/darshan-posix.c
View file @
9ac0bd93
...
...
@@ -181,6 +181,7 @@ static struct posix_runtime *posix_runtime = NULL;
static
pthread_mutex_t
posix_runtime_mutex
=
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
;
static
int
instrumentation_disabled
=
0
;
static
int
my_rank
=
-
1
;
static
int
darshan_mem_alignment
=
1
;
#define POSIX_LOCK() pthread_mutex_lock(&posix_runtime_mutex)
#define POSIX_UNLOCK() pthread_mutex_unlock(&posix_runtime_mutex)
...
...
@@ -1246,7 +1247,8 @@ static void posix_runtime_initialize()
darshan_core_register_module
(
DARSHAN_POSIX_MOD
,
&
posix_mod_fns
,
&
mem_limit
);
&
mem_limit
,
&
darshan_mem_alignment
);
/* return if no memory assigned by darshan core */
if
(
mem_limit
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment