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
74
Issues
74
List
Boards
Labels
Milestones
Merge Requests
6
Merge Requests
6
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
f5ff61de
Commit
f5ff61de
authored
Jun 14, 2016
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify common counter logic
parent
246c491e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
66 deletions
+1
-66
darshan-runtime/lib/darshan-common.c
darshan-runtime/lib/darshan-common.c
+1
-38
darshan-runtime/lib/darshan-mpiio.c
darshan-runtime/lib/darshan-mpiio.c
+0
-12
darshan-runtime/lib/darshan-posix.c
darshan-runtime/lib/darshan-posix.c
+0
-16
No files found.
darshan-runtime/lib/darshan-common.c
View file @
f5ff61de
...
...
@@ -196,29 +196,6 @@ void darshan_record_sort(void *rec_buf, int rec_count, int rec_size)
return
;
}
/* HACK: global variables for determining 4 most common values */
static
int64_t
*
walker_val_p
=
NULL
;
static
int64_t
*
walker_cnt_p
=
NULL
;
static
void
darshan_common_val_walker
(
const
void
*
nodep
,
const
VISIT
which
,
const
int
depth
)
{
struct
darshan_common_val_counter
*
counter
;
switch
(
which
)
{
case
postorder
:
case
leaf
:
counter
=
*
(
struct
darshan_common_val_counter
**
)
nodep
;
DARSHAN_COMMON_VAL_COUNTER_INC
(
walker_val_p
,
walker_cnt_p
,
counter
->
val
,
counter
->
freq
,
0
);
default:
break
;
}
return
;
}
static
int
darshan_common_val_compare
(
const
void
*
a_p
,
const
void
*
b_p
)
{
const
struct
darshan_common_val_counter
*
a
=
a_p
;
...
...
@@ -274,24 +251,10 @@ void darshan_common_val_counter(void **common_val_root, int *common_val_count,
(
*
common_val_count
)
++
;
}
#ifdef __DARSHAN_ENABLE_MMAP_LOGS
/* if we are using darshan's mmap feature, update common access
* counters as we go
*/
/* update common access counters as we go */
DARSHAN_COMMON_VAL_COUNTER_INC
(
common_val_p
,
common_cnt_p
,
found
->
val
,
found
->
freq
,
1
);
#endif
return
;
}
void
darshan_walk_common_vals
(
void
*
common_val_root
,
int64_t
*
val_p
,
int64_t
*
cnt_p
)
{
walker_val_p
=
val_p
;
walker_cnt_p
=
cnt_p
;
twalk
(
common_val_root
,
darshan_common_val_walker
);
return
;
}
...
...
darshan-runtime/lib/darshan-mpiio.c
View file @
f5ff61de
...
...
@@ -899,19 +899,7 @@ static void mpiio_finalize_file_records(void *rec_ref_p)
struct
mpiio_file_record_ref
*
rec_ref
=
(
struct
mpiio_file_record_ref
*
)
rec_ref_p
;
#ifndef __DARSHAN_ENABLE_MMAP_LOGS
/* walk common counters to get 4 most common -- only if mmap
* feature is disabled (mmap updates counters on the go)
*/
/* common accesses */
darshan_walk_common_vals
(
rec_ref
->
access_root
,
&
(
rec_ref
->
file_rec
->
counters
[
MPIIO_ACCESS1_ACCESS
]),
&
(
rec_ref
->
file_rec
->
counters
[
MPIIO_ACCESS1_COUNT
]));
#endif
tdestroy
(
rec_ref
->
access_root
,
free
);
return
;
}
...
...
darshan-runtime/lib/darshan-posix.c
View file @
f5ff61de
...
...
@@ -1543,24 +1543,8 @@ static void posix_finalize_file_records(void *rec_ref_p)
struct
posix_file_record_ref
*
rec_ref
=
(
struct
posix_file_record_ref
*
)
rec_ref_p
;
#ifndef __DARSHAN_ENABLE_MMAP_LOGS
/* walk common counters to get 4 most common -- only if mmap
* feature is disabled (mmap updates counters on the go)
*/
/* common accesses */
darshan_walk_common_vals
(
rec_ref
->
access_root
,
&
(
rec_ref
->
file_rec
->
counters
[
POSIX_ACCESS1_ACCESS
]),
&
(
rec_ref
->
file_rec
->
counters
[
POSIX_ACCESS1_COUNT
]));
/* common strides */
darshan_walk_common_vals
(
rec_ref
->
stride_root
,
&
(
rec_ref
->
file_rec
->
counters
[
POSIX_STRIDE1_STRIDE
]),
&
(
rec_ref
->
file_rec
->
counters
[
POSIX_STRIDE1_COUNT
]));
#endif
tdestroy
(
rec_ref
->
access_root
,
free
);
tdestroy
(
rec_ref
->
stride_root
,
free
);
return
;
}
...
...
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