Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 7, 2022
1 parent f3fc553 commit 1152a77
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 121 deletions.
8 changes: 3 additions & 5 deletions src/H5FDspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
HDassert(size > 0);

#ifdef H5FD_ALLOC_DEBUG
HDfprintf(stderr, "%s: type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
__func__, (unsigned)type, addr, size);
HDfprintf(stderr, "%s: type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__,
(unsigned)type, addr, size);
#endif /* H5FD_ALLOC_DEBUG */

/* Sanity checking */
Expand Down Expand Up @@ -331,9 +331,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size)
else {
/* leak memory */
#ifdef H5FD_ALLOC_DEBUG
HDfprintf(stderr,
"%s: LEAKED MEMORY!!! type = %u, addr = %" PRIuHADDR
", size = %" PRIuHSIZE "\n",
HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
__func__, (unsigned)type, addr, size);
#endif /* H5FD_ALLOC_DEBUG */
} /* end else */
Expand Down
27 changes: 11 additions & 16 deletions src/H5FS.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class

FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %" PRIuHADDR ", nclasses = %Zu\n",
__func__, fs_addr, nclasses);
HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %" PRIuHADDR ", nclasses = %Zu\n", __func__,
fs_addr, nclasses);
#endif /* H5FS_DEBUG */

/* Check arguments. */
Expand All @@ -204,8 +204,7 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr);
HDfprintf(stderr, "%s: fspace->sect_size = %" PRIuHSIZE "\n", __func__, fspace->sect_size);
HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE "\n", __func__,
fspace->alloc_sect_size);
HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE "\n", __func__, fspace->alloc_sect_size);
HDfprintf(stderr, "%s: fspace->sinfo = %p\n", __func__, (void *)fspace->sinfo);
HDfprintf(stderr, "%s: fspace->rc = %u\n", __func__, fspace->rc);
#endif /* H5FS_DEBUG */
Expand Down Expand Up @@ -250,8 +249,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr)

FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %" PRIuHADDR "\n", __func__,
fs_addr);
HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %" PRIuHADDR "\n", __func__, fs_addr);
#endif /* H5FS_DEBUG */

/* Check arguments. */
Expand Down Expand Up @@ -407,8 +405,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
HDassert(f);
HDassert(fspace);
#ifdef H5FS_DEBUG
HDfprintf(stderr,
"%s: Entering, fspace = %p, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p\n",
HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p\n",
__func__, (void *)fspace, fspace->addr, (void *)fspace->sinfo);
#endif /* H5FS_DEBUG */

Expand All @@ -417,13 +414,11 @@ H5FS_close(H5F_t *f, H5FS_t *fspace)
if (fspace->sinfo) {
#ifdef H5FS_DEBUG
HDfprintf(stderr,
"%s: fspace->tot_sect_count = %" PRIuHSIZE
", fspace->serial_sect_count = %" PRIuHSIZE
"%s: fspace->tot_sect_count = %" PRIuHSIZE ", fspace->serial_sect_count = %" PRIuHSIZE
", fspace->sect_addr = %" PRIuHADDR ", fspace->rc = %u\n",
__func__, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc);
HDfprintf(stderr,
"%s: fspace->alloc_sect_size = %" PRIuHSIZE
", fspace->sect_size = %" PRIuHSIZE "\n",
"%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
__func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_DEBUG */
/* If there are sections to serialize, update them */
Expand Down Expand Up @@ -715,8 +710,8 @@ H5FS__incr(H5FS_t *fspace)

FUNC_ENTER_PACKAGE
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__,
fspace->addr, fspace->rc);
HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr,
fspace->rc);
#endif /* H5FS_DEBUG */

/*
Expand Down Expand Up @@ -755,8 +750,8 @@ H5FS__decr(H5FS_t *fspace)

FUNC_ENTER_PACKAGE
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__,
fspace->addr, fspace->rc);
HDfprintf(stderr, "%s: Entering, fpace->addr = %" PRIuHADDR ", fspace->rc = %u\n", __func__, fspace->addr,
fspace->rc);
#endif /* H5FS_DEBUG */

/*
Expand Down
40 changes: 14 additions & 26 deletions src/H5FSsection.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace)
sinfo->sect_off_size = (fspace->max_sect_addr + 7) / 8;
sinfo->sect_len_size = H5VM_limit_enc_size((uint64_t)fspace->max_sect_size);
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr, "%s: fspace->max_sect_size = %" PRIuHSIZE "\n", __func__,
fspace->max_sect_size);
HDfprintf(stderr, "%s: fspace->max_sect_size = %" PRIuHSIZE "\n", __func__, fspace->max_sect_size);
HDfprintf(stderr, "%s: fspace->max_sect_addr = %u\n", __func__, fspace->max_sect_addr);
HDfprintf(stderr, "%s: sinfo->nbins = %u\n", __func__, sinfo->nbins);
HDfprintf(stderr, "%s: sinfo->sect_off_size = %u, sinfo->sect_len_size = %u\n", __func__,
Expand Down Expand Up @@ -202,12 +201,10 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)

#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr,
"%s: Called, fspace->addr = %" PRIuHADDR
", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR "\n",
"%s: Called, fspace->addr = %" PRIuHADDR ", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR
"\n",
__func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr);
HDfprintf(stderr,
"%s: fspace->alloc_sect_size = %" PRIuHSIZE
", fspace->sect_size = %" PRIuHSIZE "\n",
HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
__func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */

Expand Down Expand Up @@ -256,8 +253,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
HDassert(H5F_addr_defined(fspace->addr));

#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr,
"%s: Reading in existing sections, fspace->sect_addr = %" PRIuHADDR "\n",
HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %" PRIuHADDR "\n",
__func__, fspace->sect_addr);
#endif /* H5FS_SINFO_DEBUG */
/* Protect the free space sections */
Expand Down Expand Up @@ -299,9 +295,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode)
"%s: Leaving, fspace->addr = %" PRIuHADDR
", fspace->sinfo = %p, fspace->sect_addr = %" PRIuHADDR "\n",
__func__, fspace->addr, (void *)fspace->sinfo, fspace->sect_addr);
HDfprintf(stderr,
"%s: fspace->alloc_sect_size = %" PRIuHSIZE
", fspace->sect_size = %" PRIuHSIZE "\n",
HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
__func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
FUNC_LEAVE_NOAPI(ret_value)
Expand Down Expand Up @@ -342,16 +336,14 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified)
FUNC_ENTER_STATIC
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr,
"%s: Called, modified = %d, fspace->addr = %" PRIuHADDR
", fspace->sect_addr = %" PRIuHADDR "\n",
"%s: Called, modified = %d, fspace->addr = %" PRIuHADDR ", fspace->sect_addr = %" PRIuHADDR
"\n",
__func__, modified, fspace->addr, fspace->sect_addr);
HDfprintf(
stderr,
"%s: fspace->sinfo_lock_count = %u, fspace->sinfo_modified = %d, fspace->sinfo_protected = %d\n",
__func__, fspace->sinfo_lock_count, fspace->sinfo_modified, fspace->sinfo_protected);
HDfprintf(stderr,
"%s: fspace->alloc_sect_size = %" PRIuHSIZE
", fspace->sect_size = %" PRIuHSIZE "\n",
HDfprintf(stderr, "%s: fspace->alloc_sect_size = %" PRIuHSIZE ", fspace->sect_size = %" PRIuHSIZE "\n",
__func__, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */

Expand Down Expand Up @@ -1358,8 +1350,8 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag
FUNC_ENTER_NOAPI(FAIL)

#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr, "%s: *sect = {%" PRIuHADDR ", %" PRIuHSIZE ", %u, %s}\n", __func__,
sect->addr, sect->size, sect->type,
HDfprintf(stderr, "%s: *sect = {%" PRIuHADDR ", %" PRIuHSIZE ", %u, %s}\n", __func__, sect->addr,
sect->size, sect->type,
(sect->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
#endif /* H5FS_SINFO_DEBUG */

Expand Down Expand Up @@ -1445,9 +1437,7 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize
FUNC_ENTER_NOAPI(FAIL)

#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr,
"%s: addr = %" PRIuHADDR ", size = %" PRIuHSIZE
", extra_requested = %" PRIuHSIZE "\n",
HDfprintf(stderr, "%s: addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", extra_requested = %" PRIuHSIZE "\n",
__func__, addr, size, extra_requested);
#endif /* H5FS_SINFO_DEBUG */

Expand All @@ -1460,12 +1450,10 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize

/* Check for any sections on free space list */
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr, "%s: fspace->tot_sect_count = %" PRIuHSIZE "\n", __func__,
fspace->tot_sect_count);
HDfprintf(stderr, "%s: fspace->tot_sect_count = %" PRIuHSIZE "\n", __func__, fspace->tot_sect_count);
HDfprintf(stderr, "%s: fspace->serial_sect_count = %" PRIuHSIZE "\n", __func__,
fspace->serial_sect_count);
HDfprintf(stderr, "%s: fspace->ghost_sect_count = %" PRIuHSIZE "\n", __func__,
fspace->ghost_sect_count);
HDfprintf(stderr, "%s: fspace->ghost_sect_count = %" PRIuHSIZE "\n", __func__, fspace->ghost_sect_count);
#endif /* H5FS_SINFO_DEBUG */
if (fspace->tot_sect_count > 0) {
H5FS_section_info_t *sect; /* Temporary free space section */
Expand Down
51 changes: 20 additions & 31 deletions src/H5MF.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,8 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio

#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr,
"%s: adding node, node->sect_info.addr = %" PRIuHADDR
", node->sect_info.size = %" PRIuHSIZE "\n",
"%s: adding node, node->sect_info.addr = %" PRIuHADDR ", node->sect_info.size = %" PRIuHSIZE
"\n",
__func__, node->sect_info.addr, node->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
/* Add the section */
Expand Down Expand Up @@ -733,8 +733,8 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h
node->sect_info.size -= size;

#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr, "%s: re-adding node, node->sect_info.size = %" PRIuHSIZE "\n",
__func__, node->sect_info.size);
HDfprintf(stderr, "%s: re-adding node, node->sect_info.size = %" PRIuHSIZE "\n", __func__,
node->sect_info.size);
#endif /* H5MF_ALLOC_DEBUG_MORE */

/* Re-add the section to the free-space manager */
Expand Down Expand Up @@ -777,8 +777,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)

FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type,
size);
HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */

/* check arguments */
Expand Down Expand Up @@ -851,8 +850,8 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
H5AC_set_ring(orig_ring, NULL);

#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
__func__, ret_value, size);
HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
size);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
Expand Down Expand Up @@ -892,8 +891,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)
FUNC_ENTER_STATIC

#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type,
size);
HDfprintf(stderr, "%s: alloc_type = %u, size = %" PRIuHSIZE "\n", __func__, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */

H5MF__alloc_to_fs_type(f->shared, alloc_type, size, &ptype);
Expand Down Expand Up @@ -990,8 +988,8 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size)

done:
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
__func__, ret_value, size);
HDfprintf(stderr, "%s: Leaving: ret_value = %" PRIuHADDR ", size = %" PRIuHSIZE "\n", __func__, ret_value,
size);
#endif /* H5MF_ALLOC_DEBUG */
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF__sects_dump(f, stderr);
Expand Down Expand Up @@ -1089,9 +1087,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)

FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr,
"%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE
"\n",
HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
__func__, (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */

Expand Down Expand Up @@ -1158,8 +1154,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
else if (size < f->shared->fs_threshold) {
#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr,
"%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE
", on the floor!\n",
"%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n",
__func__, addr, size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
HGOTO_DONE(SUCCEED)
Expand All @@ -1177,9 +1172,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
*/
if (f->shared->fs_state[fs_type] == H5F_FS_STATE_DELETING || !H5F_HAVE_FREE_SPACE_MANAGER(f)) {
#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr,
"%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE
", on the floor!\n",
HDfprintf(stderr, "%s: dropping addr = %" PRIuHADDR ", size = %" PRIuHSIZE ", on the floor!\n",
__func__, addr, size);
#endif /* H5MF_ALLOC_DEBUG_MORE */
HGOTO_DONE(SUCCEED)
Expand Down Expand Up @@ -1467,9 +1460,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)

FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr,
"%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE
"\n",
HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %" PRIuHADDR ", size = %" PRIuHSIZE "\n",
__func__, (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */

Expand Down Expand Up @@ -1606,10 +1597,9 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
HDassert((H5FD_mem_t)type < H5FD_MEM_NTYPES);

#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(
stderr,
"%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
__func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
__func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type,
f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */

/* If the free space manager for this type is open, close it */
Expand All @@ -1618,10 +1608,9 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager")

#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(
stderr,
"%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
__func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n",
__func__, (unsigned)type, (void *)f->shared->fs_man[type], (unsigned)type,
f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */

/* If there is free space manager info for this type, delete it */
Expand Down
Loading

0 comments on commit 1152a77

Please sign in to comment.