Commit 67efd831 authored by Shane Snyder's avatar Shane Snyder

add darshan_core_fprintf routine

parent 4c900db7
......@@ -47,7 +47,7 @@
{ \
__real_ ## __func = dlsym(RTLD_NEXT, #__func); \
if(!(__real_ ## __func)) { \
fprintf(stderr, "Darshan failed to map symbol: %s\n", #__func); \
darshan_core_fprintf(stderr, "Darshan failed to map symbol: %s\n", #__func); \
exit(1); \
} \
}
......@@ -185,6 +185,15 @@ void *darshan_core_register_record(
*/
double darshan_core_wtime(void);
/* darshan_core_fprintf()
*
* Prints internal Darshan output on a given stream.
*/
void darshan_core_fprintf(
FILE *stream,
const char *format,
...);
/* darshan_core_excluded_path()
*
* Returns true (1) if the given file path 'path' is in Darshan's
......
......@@ -2133,6 +2133,25 @@ double darshan_core_wtime()
return(PMPI_Wtime() - darshan_core->wtime_offset);
}
#ifdef DARSHAN_PRELOAD
extern int (*__real_vfprintf)(FILE *stream, const char *format, va_list);
#else
extern int __real_vfprintf(FILE *stream, const char *format, va_list);
#endif
void darshan_core_fprintf(
FILE *stream, const char *format, ...)
{
va_list ap;
MAP_OR_FAIL(vfprintf);
va_start(ap, format);
__real_vfprintf(stream, format, ap);
va_end(ap);
return;
}
int darshan_core_excluded_path(const char *path)
{
char *exclude, *include;
......
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