<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
img {
max-width: 100%;
height: auto;
}
p.details {
font-style:italic;
color:#777
}
.footer p {
font-size:small;
color:#777
}
pre.commit-message {
white-space: pre-wrap;
}
.file-stats a {
text-decoration: none;
}
.file-stats .new-file {
color: #090;
}
.file-stats .deleted-file {
color: #B00;
}
</style>
<body>
<div class='content'>
<h3>Shane Snyder pushed to branch mmap-dev at <a href="https://xgitlab.cels.anl.gov/darshan/darshan">darshan / darshan</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/376eefa8c5e37064148de4ee1c3c5b85c8fd02ea">376eefa8</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2015-12-04T10:20:47Z</i>
</div>
<pre class='commit-message'>modify register_record routine used by modules
Now, register_record() accepts an argument for the size of
the record being registered, and this is used to track how much
data each module has stored in their allocated memory region.</pre>
</li>
</ul>
<h4>4 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
darshan-runtime/darshan.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
darshan-runtime/lib/darshan-core.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
darshan-runtime/lib/darshan-posix.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
darshan-util/darshan-parser.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/376eefa8c5e37064148de4ee1c3c5b85c8fd02ea#diff-0'>
<strong>
darshan-runtime/darshan.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/darshan.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/darshan.h
</span><span style="color: #aaaaaa">@@ -127,10 +127,10 @@ void darshan_core_unregister_module(
</span> */
void darshan_core_register_record(
void *name,
<span style="color: #000000;background-color: #ffdddd">- int len,
</span><span style="color: #000000;background-color: #ddffdd">+ int name_len,
+ int rec_size,
</span> darshan_module_id mod_id,
int printable_flag,
<span style="color: #000000;background-color: #ffdddd">- int mod_limit_flag,
</span> darshan_record_id *rec_id,
int *file_alignment);
</code></pre>
<br>
</li>
<li id='diff-1'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/376eefa8c5e37064148de4ee1c3c5b85c8fd02ea#diff-1'>
<strong>
darshan-runtime/lib/darshan-core.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-core.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-core.c
</span><span style="color: #aaaaaa">@@ -1265,9 +1265,11 @@ void darshan_core_register_module(
</span> return;
}
<span style="color: #000000;background-color: #ffdddd">- /* XXX how do we assign size and address */
</span><span style="color: #000000;background-color: #ddffdd">+ /* XXX MMAP: how do we assign size and address */
</span> *mod_buf = darshan_core->log_mod_p;
<span style="color: #000000;background-color: #ffdddd">- *mod_buf_size = 2*1024*1024;
</span><span style="color: #000000;background-color: #ddffdd">+ *mod_buf_size = DARSHAN_MOD_MEM_MAX;
+ darshan_core->log_hdr_p->mod_map[mod_id].off =
+ ((char *)darshan_core->log_mod_p - (char *)darshan_core->log_hdr_p);
</span>
/* this module has not been registered yet, allocate and initialize it */
mod = malloc(sizeof(*mod));
<span style="color: #aaaaaa">@@ -1315,12 +1317,13 @@ void darshan_core_unregister_module(
</span> return;
}
<span style="color: #000000;background-color: #ddffdd">+/* TODO: maybe a return code to distinguish between id 0 and a failure */
</span> void darshan_core_register_record(
void *name,
<span style="color: #000000;background-color: #ffdddd">- int len,
</span><span style="color: #000000;background-color: #ddffdd">+ int name_len,
+ int rec_size,
</span> darshan_module_id mod_id,
int printable_flag,
<span style="color: #000000;background-color: #ffdddd">- int mod_limit_flag,
</span> darshan_record_id *rec_id,
int *file_alignment)
{
<span style="color: #aaaaaa">@@ -1328,14 +1331,16 @@ void darshan_core_register_record(
</span> struct darshan_core_record_ref *ref;
*rec_id = 0;
<span style="color: #000000;background-color: #ddffdd">+ *file_alignment = 0;
</span>
if(!darshan_core)
return;
/* TODO: what do you do with printable flag? */
<span style="color: #000000;background-color: #ddffdd">+ /* TODO: what about partial flag? */
</span>
/* hash the input name to get a unique id for this record */
<span style="color: #000000;background-color: #ffdddd">- tmp_rec_id = darshan_hash(name, len, 0);
</span><span style="color: #000000;background-color: #ddffdd">+ tmp_rec_id = darshan_hash(name, name_len, 0);
</span>
/* check to see if we've already stored the id->name mapping for this record */
DARSHAN_CORE_LOCK();
<span style="color: #aaaaaa">@@ -1345,28 +1350,26 @@ void darshan_core_register_record(
</span> /* record not found -- add it to the hash if this module has not already used
* all of its memory
*/
-
-#if 0
<span style="color: #000000;background-color: #ffdddd">- if(mod_limit_flag)
</span><span style="color: #000000;background-color: #ddffdd">+ darshan_add_record_hashref(darshan_core, name, tmp_rec_id, &ref);
+ if(!ref)
</span> {
<span style="color: #000000;background-color: #ffdddd">- /* if this module is OOM, set a flag in the header to indicate this */
- DARSHAN_MOD_FLAG_SET(darshan_core->log_header.partial_flag, mod_id);
</span><span style="color: #000000;background-color: #ddffdd">+ /* just give up and return if adding this record failed */
</span> DARSHAN_CORE_UNLOCK();
return;
}
-#endif
-
<span style="color: #000000;background-color: #ffdddd">- darshan_add_record_hashref(darshan_core, name, tmp_rec_id, &ref);
</span> }
<span style="color: #000000;background-color: #ffdddd">-
- if(ref)
</span><span style="color: #000000;background-color: #ddffdd">+
+ if(!DARSHAN_MOD_FLAG_ISSET(ref->mod_flags, mod_id))
+ {
</span> DARSHAN_MOD_FLAG_SET(ref->mod_flags, mod_id);
<span style="color: #000000;background-color: #ddffdd">+ darshan_core->log_hdr_p->mod_map[mod_id].len += rec_size;
+ }
</span> DARSHAN_CORE_UNLOCK();
if(file_alignment)
darshan_block_size_from_path(name, file_alignment);
<span style="color: #000000;background-color: #ffdddd">- *rec_id = 0; /* XXX */
</span><span style="color: #000000;background-color: #ddffdd">+ *rec_id = tmp_rec_id;
</span> return;
}
</code></pre>
<br>
</li>
<li id='diff-2'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/376eefa8c5e37064148de4ee1c3c5b85c8fd02ea#diff-2'>
<strong>
darshan-runtime/lib/darshan-posix.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-runtime/lib/darshan-posix.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-runtime/lib/darshan-posix.c
</span><span style="color: #aaaaaa">@@ -1677,7 +1677,6 @@ static struct posix_file_runtime* posix_file_by_name(const char *name)
</span> char *newname = NULL;
darshan_record_id file_id;
int file_alignment;
<span style="color: #000000;background-color: #ffdddd">- int limit_flag;
</span>
if(!posix_runtime || instrumentation_disabled)
return(NULL);
<span style="color: #aaaaaa">@@ -1686,15 +1685,13 @@ static struct posix_file_runtime* posix_file_by_name(const char *name)
</span> if(!newname)
newname = (char*)name;
<span style="color: #000000;background-color: #ffdddd">- limit_flag = (posix_runtime->file_array_ndx >= posix_runtime->file_array_size);
</span>-
/* get a unique id for this file from darshan core */
darshan_core_register_record(
(void*)newname,
strlen(newname),
<span style="color: #000000;background-color: #ddffdd">+ sizeof(struct darshan_posix_file),
</span> DARSHAN_POSIX_MOD,
1,
<span style="color: #000000;background-color: #ffdddd">- limit_flag,
</span> &file_id,
&file_alignment);
<span style="color: #aaaaaa">@@ -2364,7 +2361,7 @@ static void posix_shutdown()
</span> HASH_CLEAR(hlink, posix_runtime->file_hash); /* these entries are freed all at once below */
free(posix_runtime->file_runtime_array);
<span style="color: #000000;background-color: #ffdddd">- free(posix_runtime->file_record_array);
</span><span style="color: #000000;background-color: #ddffdd">+ /* XXX: MMAP free(posix_runtime->file_record_array); */
</span> free(posix_runtime);
posix_runtime = NULL;
</code></pre>
<br>
</li>
<li id='diff-3'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/376eefa8c5e37064148de4ee1c3c5b85c8fd02ea#diff-3'>
<strong>
darshan-util/darshan-parser.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-util/darshan-parser.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-util/darshan-parser.c
</span><span style="color: #aaaaaa">@@ -310,9 +310,9 @@ int main(int argc, char **argv)
</span> }
/* print breakdown of each log file region's contribution to file size */
<span style="color: #000000;background-color: #ffdddd">- printf("\n# log file region sizes (compressed)\n");
</span><span style="color: #000000;background-color: #ddffdd">+ printf("\n# log file region sizes\n");
</span> printf("# -------------------------------------------------------\n");
<span style="color: #000000;background-color: #ffdddd">- printf("# header: %zu bytes (uncompressed)\n", sizeof(struct darshan_header));
</span><span style="color: #000000;background-color: #ddffdd">+ printf("# header: %zu bytes\n", sizeof(struct darshan_header));
</span> printf("# job data: %zu bytes\n", fd->job_map.len);
printf("# record table: %zu bytes\n", fd->rec_map.len);
for(i=0; i<DARSHAN_MAX_MODS; i++)
</code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/376eefa8c5e37064148de4ee1c3c5b85c8fd02ea">View it on GitLab</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://xgitlab.cels.anl.gov/darshan/darshan/commit/376eefa8c5e37064148de4ee1c3c5b85c8fd02ea"}}</script>
</p>
</div>
</body>
</html>