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
d1fc064b
Commit
d1fc064b
authored
Nov 17, 2016
by
Cong Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address DXT parser segment fault when Lustre module is disabled
Signed-off-by:
Cong Xu
<
congxu@localhost.localdomain
>
parent
faa23f57
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
darshan-util/darshan-dxt-logutils.c
darshan-util/darshan-dxt-logutils.c
+10
-8
darshan-util/darshan-dxt-parser.c
darshan-util/darshan-dxt-parser.c
+2
-2
No files found.
darshan-util/darshan-dxt-logutils.c
View file @
d1fc064b
...
...
@@ -24,7 +24,7 @@ static int dxt_log_put_posix_file(darshan_fd fd, void* dxt_posix_buf);
static
void
dxt_log_print_file
(
void
*
file_rec
,
char
*
file_name
,
char
*
mnt_pt
,
char
*
fs_type
);
void
dxt_log_print_posix_file
(
void
*
file_rec
,
char
*
file_name
,
char
*
mnt_pt
,
char
*
fs_type
,
struct
darshan_lustre_record
*
ref
);
char
*
mnt_pt
,
char
*
fs_type
,
struct
lustre_record_ref
*
rec_
ref
);
static
void
dxt_log_print_posix_description
(
int
ver
);
static
void
dxt_log_print_posix_file_diff
(
void
*
file_rec1
,
char
*
file_name1
,
void
*
file_rec2
,
char
*
file_name2
);
...
...
@@ -209,7 +209,7 @@ static void dxt_log_print_file(void *file_rec, char *file_name,
}
void
dxt_log_print_posix_file
(
void
*
posix_file_rec
,
char
*
file_name
,
char
*
mnt_pt
,
char
*
fs_type
,
struct
darshan_lustre_record
*
ref
)
char
*
mnt_pt
,
char
*
fs_type
,
struct
lustre_record_ref
*
lustre_rec_
ref
)
{
struct
dxt_file_record
*
file_rec
=
(
struct
dxt_file_record
*
)
posix_file_rec
;
...
...
@@ -228,6 +228,7 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
segment_info
*
io_trace
=
(
segment_info
*
)
parser_buf
;
/* Lustre File System */
struct
darshan_lustre_record
*
rec
;
int
lustreFS
=
!
strcmp
(
fs_type
,
"lustre"
);
int32_t
stripe_size
;
int32_t
stripe_count
;
...
...
@@ -235,7 +236,7 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
int
print_count
;
int
ost_idx
;
if
(
!
ref
)
{
if
(
!
lustre_rec_
ref
)
{
lustreFS
=
0
;
}
...
...
@@ -245,13 +246,14 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
write_count
,
read_count
);
if
(
lustreFS
)
{
stripe_size
=
ref
->
counters
[
LUSTRE_STRIPE_SIZE
];
stripe_count
=
ref
->
counters
[
LUSTRE_STRIPE_WIDTH
];
rec
=
lustre_rec_ref
->
rec
;
stripe_size
=
rec
->
counters
[
LUSTRE_STRIPE_SIZE
];
stripe_count
=
rec
->
counters
[
LUSTRE_STRIPE_WIDTH
];
printf
(
"# DXT, mnt_pt: %s, fs_type: %s
\n
"
,
mnt_pt
,
fs_type
);
printf
(
"# DXT, stripe_size: %d, stripe_count: %d
\n
"
,
stripe_size
,
stripe_count
);
for
(
i
=
0
;
i
<
stripe_count
;
i
++
)
{
printf
(
"# DXT, OST: %d
\n
"
,
(
re
f
->
ost_ids
)[
i
]);
printf
(
"# DXT, OST: %d
\n
"
,
(
re
c
->
ost_ids
)[
i
]);
}
}
...
...
@@ -278,7 +280,7 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
print_count
=
0
;
while
(
cur_offset
<
offset
+
length
)
{
printf
(
" [%3d]"
,
(
re
f
->
ost_ids
)[
ost_idx
]);
printf
(
" [%3d]"
,
(
re
c
->
ost_ids
)[
ost_idx
]);
cur_offset
=
(
cur_offset
/
stripe_size
+
1
)
*
stripe_size
;
ost_idx
=
(
ost_idx
==
stripe_count
-
1
)
?
0
:
ost_idx
+
1
;
...
...
@@ -306,7 +308,7 @@ void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
print_count
=
0
;
while
(
cur_offset
<
offset
+
length
)
{
printf
(
" [%3d]"
,
(
re
f
->
ost_ids
)[
ost_idx
]);
printf
(
" [%3d]"
,
(
re
c
->
ost_ids
)[
ost_idx
]);
cur_offset
=
(
cur_offset
/
stripe_size
+
1
)
*
stripe_size
;
ost_idx
=
(
ost_idx
==
stripe_count
-
1
)
?
0
:
ost_idx
+
1
;
...
...
darshan-util/darshan-dxt-parser.c
View file @
d1fc064b
...
...
@@ -22,7 +22,7 @@
extern
void
dxt_logutils_cleanup
();
extern
void
dxt_log_print_posix_file
(
void
*
file_rec
,
char
*
file_name
,
char
*
mnt_pt
,
char
*
fs_type
,
struct
darshan_lustre_record
*
ref
);
char
*
mnt_pt
,
char
*
fs_type
,
struct
lustre_record_ref
*
ref
);
extern
void
dxt_log_print_mpiio_file
(
void
*
file_rec
,
char
*
file_name
,
char
*
mnt_pt
,
char
*
fs_type
);
...
...
@@ -281,7 +281,7 @@ int main(int argc, char **argv)
sizeof
(
darshan_record_id
),
lustre_rec_ref
);
dxt_log_print_posix_file
(
mod_buf
,
rec_name
,
mnt_pt
,
fs_type
,
lustre_rec_ref
->
rec
);
mnt_pt
,
fs_type
,
lustre_rec_ref
);
}
else
if
(
i
==
DXT_MPIIO_MOD
){
dxt_log_print_mpiio_file
(
mod_buf
,
rec_name
,
mnt_pt
,
fs_type
);
...
...
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