Commit be086b44 authored by Shane Snyder's avatar Shane Snyder

Merge branch 'carns/dev-issue-253' into 'master'

add wrapper for __open_2 function call

Closes #253

See merge request !28
parents 4c900db7 1a8977a1
......@@ -9,6 +9,8 @@ Darshan-3.1.7
were not properly up-converted. Reported by Teng Wang.
* bug fix to MiB reported in I/O performance estimate of
darshan-job-summary.pl when both posix and stdio access is present
* added wrapper for __open_2(), bug reported by Cormac Garvey in which open
calls are not intercepted with some versions of glibc/gcc
Darshan-3.1.6
=============
......
......@@ -40,6 +40,7 @@ typedef int64_t off64_t;
DARSHAN_FORWARD_DECL(open, int, (const char *path, int flags, ...));
DARSHAN_FORWARD_DECL(open64, int, (const char *path, int flags, ...));
DARSHAN_FORWARD_DECL(__open_2, int, (const char *path, int oflag));
DARSHAN_FORWARD_DECL(creat, int, (const char* path, mode_t mode));
DARSHAN_FORWARD_DECL(creat64, int, (const char* path, mode_t mode));
DARSHAN_FORWARD_DECL(mkstemp, int, (char *template));
......@@ -403,6 +404,24 @@ int DARSHAN_DECL(open)(const char *path, int flags, ...)
return(ret);
}
int DARSHAN_DECL(__open_2)(const char *path, int oflag)
{
int ret;
double tm1, tm2;
MAP_OR_FAIL(__open_2);
tm1 = darshan_core_wtime();
ret = __real___open_2(path, oflag);
tm2 = darshan_core_wtime();
POSIX_PRE_RECORD();
POSIX_RECORD_OPEN(ret, path, 0, tm1, tm2);
POSIX_POST_RECORD();
return(ret);
}
int DARSHAN_DECL(open64)(const char *path, int flags, ...)
{
int mode = 0;
......
--wrap=open
--wrap=open64
--wrap=__open_2
--wrap=creat
--wrap=creat64
--wrap=mkstemp
......
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