Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
darshan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
72
Issues
72
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
darshan
darshan
Commits
5dbe7dc1
Commit
5dbe7dc1
authored
Sep 22, 2016
by
Shane Snyder
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add backwards compatability for new posix version
parent
2276d929
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
2 deletions
+38
-2
darshan-log-format.h
darshan-log-format.h
+4
-0
darshan-posix-log-format.h
darshan-posix-log-format.h
+1
-1
darshan-util/darshan-posix-logutils.c
darshan-util/darshan-posix-logutils.c
+33
-1
No files found.
darshan-log-format.h
View file @
5dbe7dc1
...
...
@@ -20,6 +20,10 @@
#endif
/* update this on file format changes */
/* NOTE: this should be updated when general changes are made to the
* log format version, NOT when a new version of a module record is
* introduced -- we have module-specific versions to handle that
*/
#define DARSHAN_LOG_VERSION "3.10"
/* magic number for validating output files and checking byte order */
...
...
darshan-posix-log-format.h
View file @
5dbe7dc1
...
...
@@ -7,7 +7,7 @@
#define __DARSHAN_POSIX_LOG_FORMAT_H
/* current POSIX log format version */
#define DARSHAN_POSIX_VER
2
#define DARSHAN_POSIX_VER
3
#define POSIX_COUNTERS \
/* count of posix opens */
\
...
...
darshan-util/darshan-posix-logutils.c
View file @
5dbe7dc1
...
...
@@ -31,6 +31,7 @@ char *posix_f_counter_names[] = {
#undef X
#define DARSHAN_POSIX_FILE_SIZE_1 680
#define DARSHAN_POSIX_FILE_SIZE_2 648
static
int
darshan_log_get_posix_file
(
darshan_fd
fd
,
void
**
posix_buf_p
);
static
int
darshan_log_put_posix_file
(
darshan_fd
fd
,
void
*
posix_buf
,
int
ver
);
...
...
@@ -97,11 +98,42 @@ static int darshan_log_get_posix_file(darshan_fd fd, void** posix_buf_p)
p
+=
(
4
*
sizeof
(
int64_t
));
/* skip old stdio counters */
memcpy
(
&
(
file
->
counters
[
6
]),
p
,
58
*
sizeof
(
int64_t
));
p
+=
(
58
*
sizeof
(
int64_t
));
memcpy
(
&
(
file
->
fcounters
[
0
]),
p
,
15
*
sizeof
(
double
));
memcpy
(
&
(
file
->
fcounters
[
0
]),
p
,
3
*
sizeof
(
double
));
file
->
fcounters
[
POSIX_F_CLOSE_START_TIMESTAMP
]
=
-
1
;
file
->
fcounters
[
POSIX_F_OPEN_END_TIMESTAMP
]
=
-
1
;
p
+=
3
*
sizeof
(
double
);
memcpy
(
&
(
file
->
fcounters
[
POSIX_F_READ_END_TIMESTAMP
]),
p
,
12
*
sizeof
(
double
));
}
free
(
buffer
);
}
else
if
(
fd
->
mod_ver
[
DARSHAN_POSIX_MOD
]
==
2
)
{
buffer
=
malloc
(
DARSHAN_POSIX_FILE_SIZE_2
);
if
(
!
buffer
)
{
if
(
*
posix_buf_p
==
NULL
)
free
(
file
);
return
(
-
1
);
}
rec_len
=
DARSHAN_POSIX_FILE_SIZE_2
;
ret
=
darshan_log_get_mod
(
fd
,
DARSHAN_POSIX_MOD
,
buffer
,
rec_len
);
if
(
ret
==
rec_len
)
{
p
=
buffer
;
memcpy
(
&
(
file
->
base_rec
),
p
,
sizeof
(
struct
darshan_base_record
));
p
+=
sizeof
(
struct
darshan_base_record
);
memcpy
(
&
(
file
->
counters
[
0
]),
p
,
POSIX_NUM_INDICES
*
sizeof
(
int64_t
));
p
+=
POSIX_NUM_INDICES
*
sizeof
(
int64_t
);
memcpy
(
&
(
file
->
fcounters
[
0
]),
p
,
3
*
sizeof
(
double
));
file
->
fcounters
[
POSIX_F_CLOSE_START_TIMESTAMP
]
=
-
1
;
file
->
fcounters
[
POSIX_F_OPEN_END_TIMESTAMP
]
=
-
1
;
p
+=
3
*
sizeof
(
double
);
memcpy
(
&
(
file
->
fcounters
[
POSIX_F_READ_END_TIMESTAMP
]),
p
,
12
*
sizeof
(
double
));
}
free
(
buffer
);
}
else
if
(
fd
->
mod_ver
[
DARSHAN_POSIX_MOD
]
==
3
)
{
rec_len
=
sizeof
(
struct
darshan_posix_file
);
ret
=
darshan_log_get_mod
(
fd
,
DARSHAN_POSIX_MOD
,
file
,
rec_len
);
...
...
Shane Snyder
@ssnyder
mentioned in issue
#186 (closed)
·
Sep 22, 2016
mentioned in issue
#186 (closed)
mentioned in issue #186
Toggle commit list
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