diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 15:31:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 15:31:32 (GMT) |
commit | 187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98 (patch) | |
tree | baffa167d0796786241aef6b0ce76d4adec3b66e /src/H5Cdbg.c | |
parent | 7a44581a84778a1346a2fd5b6cca7d9db905a321 (diff) | |
download | hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.zip hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.tar.gz hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.tar.bz2 |
Rename HD(f)printf() to (f)printf() (#3194)
Diffstat (limited to 'src/H5Cdbg.c')
-rw-r--r-- | src/H5Cdbg.c | 452 |
1 files changed, 224 insertions, 228 deletions
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c index 7fe00cf..62704e6 100644 --- a/src/H5Cdbg.c +++ b/src/H5Cdbg.c @@ -111,38 +111,38 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name) * skip list -- scan the skip list generating the desired output. */ - HDfprintf(stdout, "\n\nDump of metadata cache \"%s\"\n", cache_name); + fprintf(stdout, "\n\nDump of metadata cache \"%s\"\n", cache_name); /* Print header */ - HDfprintf(stdout, "Entry "); - HDfprintf(stdout, "| Address "); - HDfprintf(stdout, "| Tag "); - HDfprintf(stdout, "| Size "); - HDfprintf(stdout, "| Ring "); - HDfprintf(stdout, "| Type "); - HDfprintf(stdout, "| Prot/Pin/Dirty"); - HDfprintf(stdout, "\n"); - - HDfprintf(stdout, "--------------------------------------------------------------------------------------" - "--------------------------\n"); + fprintf(stdout, "Entry "); + fprintf(stdout, "| Address "); + fprintf(stdout, "| Tag "); + fprintf(stdout, "| Size "); + fprintf(stdout, "| Ring "); + fprintf(stdout, "| Type "); + fprintf(stdout, "| Prot/Pin/Dirty"); + fprintf(stdout, "\n"); + + fprintf(stdout, "--------------------------------------------------------------------------------------" + "--------------------------\n"); i = 0; entry_ptr = (H5C_cache_entry_t *)H5SL_remove_first(slist_ptr); while (entry_ptr != NULL) { /* Print entry */ - HDfprintf(stdout, "%s%5d ", cache_ptr->prefix, i); - HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr)); + fprintf(stdout, "%s%5d ", cache_ptr->prefix, i); + fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr)); if (NULL == entry_ptr->tag_info) - HDfprintf(stdout, " %16s ", "N/A"); + fprintf(stdout, " %16s ", "N/A"); else - HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag)); - HDfprintf(stdout, " %5lld ", (long long)(entry_ptr->size)); - HDfprintf(stdout, " %d ", (int)(entry_ptr->ring)); - HDfprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name)); - HDfprintf(stdout, " %d", (int)(entry_ptr->is_protected)); - HDfprintf(stdout, " %d", (int)(entry_ptr->is_pinned)); - HDfprintf(stdout, " %d", (int)(entry_ptr->is_dirty)); - HDfprintf(stdout, "\n"); + fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag)); + fprintf(stdout, " %5lld ", (long long)(entry_ptr->size)); + fprintf(stdout, " %d ", (int)(entry_ptr->ring)); + fprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name)); + fprintf(stdout, " %d", (int)(entry_ptr->is_protected)); + fprintf(stdout, " %d", (int)(entry_ptr->is_pinned)); + fprintf(stdout, " %d", (int)(entry_ptr->is_dirty)); + fprintf(stdout, "\n"); /* remove the next (first) item in the skip list */ entry_ptr = (H5C_cache_entry_t *)H5SL_remove_first(slist_ptr); @@ -150,7 +150,7 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name) i++; } /* end while */ - HDfprintf(stdout, "\n\n"); + fprintf(stdout, "\n\n"); /* Verify that all the entries were removed from the skip list */ assert(H5SL_count(slist_ptr) == 0); @@ -191,49 +191,49 @@ H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name) assert(cache_ptr != NULL); assert(cache_name != NULL); - HDfprintf(stdout, "\n\nDump of metadata cache LRU \"%s\"\n", cache_name); - HDfprintf(stdout, "LRU len = %d, LRU size = %d\n", cache_ptr->LRU_list_len, - (int)(cache_ptr->LRU_list_size)); - HDfprintf(stdout, "index_size = %d, max_cache_size = %d, delta = %d\n\n", (int)(cache_ptr->index_size), - (int)(cache_ptr->max_cache_size), - (int)(cache_ptr->max_cache_size) - (int)(cache_ptr->index_size)); + fprintf(stdout, "\n\nDump of metadata cache LRU \"%s\"\n", cache_name); + fprintf(stdout, "LRU len = %d, LRU size = %d\n", cache_ptr->LRU_list_len, + (int)(cache_ptr->LRU_list_size)); + fprintf(stdout, "index_size = %d, max_cache_size = %d, delta = %d\n\n", (int)(cache_ptr->index_size), + (int)(cache_ptr->max_cache_size), + (int)(cache_ptr->max_cache_size) - (int)(cache_ptr->index_size)); /* Print header */ - HDfprintf(stdout, "Entry "); - HDfprintf(stdout, "| Address "); - HDfprintf(stdout, "| Tag "); - HDfprintf(stdout, "| Size "); - HDfprintf(stdout, "| Ring "); - HDfprintf(stdout, "| Type "); - HDfprintf(stdout, "| Dirty"); - HDfprintf(stdout, "\n"); - - HDfprintf(stdout, "--------------------------------------------------------------------------------------" - "--------------------------\n"); + fprintf(stdout, "Entry "); + fprintf(stdout, "| Address "); + fprintf(stdout, "| Tag "); + fprintf(stdout, "| Size "); + fprintf(stdout, "| Ring "); + fprintf(stdout, "| Type "); + fprintf(stdout, "| Dirty"); + fprintf(stdout, "\n"); + + fprintf(stdout, "--------------------------------------------------------------------------------------" + "--------------------------\n"); entry_ptr = cache_ptr->LRU_head_ptr; while (entry_ptr != NULL) { /* Print entry */ - HDfprintf(stdout, "%s%5d ", cache_ptr->prefix, i); - HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr)); + fprintf(stdout, "%s%5d ", cache_ptr->prefix, i); + fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr)); if (NULL == entry_ptr->tag_info) - HDfprintf(stdout, " %16s ", "N/A"); + fprintf(stdout, " %16s ", "N/A"); else - HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag)); + fprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag)); - HDfprintf(stdout, " %5lld ", (long long)(entry_ptr->size)); - HDfprintf(stdout, " %d ", (int)(entry_ptr->ring)); - HDfprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name)); - HDfprintf(stdout, " %d", (int)(entry_ptr->is_dirty)); - HDfprintf(stdout, "\n"); + fprintf(stdout, " %5lld ", (long long)(entry_ptr->size)); + fprintf(stdout, " %d ", (int)(entry_ptr->ring)); + fprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name)); + fprintf(stdout, " %d", (int)(entry_ptr->is_dirty)); + fprintf(stdout, "\n"); i++; entry_ptr = entry_ptr->next; } /* end while */ - HDfprintf(stdout, "--------------------------------------------------------------------------------------" - "--------------------------\n"); + fprintf(stdout, "--------------------------------------------------------------------------------------" + "--------------------------\n"); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5C_dump_cache_LRU() */ @@ -267,17 +267,17 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn) assert(cache_ptr != NULL); assert(calling_fcn != NULL); - HDfprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", calling_fcn); - HDfprintf(stdout, " slist %s.\n", cache_ptr->slist_enabled ? "enabled" : "disabled"); - HDfprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len); - HDfprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size); + fprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", calling_fcn); + fprintf(stdout, " slist %s.\n", cache_ptr->slist_enabled ? "enabled" : "disabled"); + fprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len); + fprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size); if (cache_ptr->slist_len > 0) { /* If we get this far, all entries in the cache are listed in the * skip list -- scan the skip list generating the desired output. */ - HDfprintf(stdout, "Num: Addr: Len: Prot/Pind: Dirty: Type:\n"); + fprintf(stdout, "Num: Addr: Len: Prot/Pind: Dirty: Type:\n"); i = 0; @@ -288,11 +288,11 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn) entry_ptr = NULL; while (entry_ptr != NULL) { - HDfprintf(stdout, "%s%d 0x%016llx %4lld %d/%d %d %s\n", cache_ptr->prefix, i, - (long long)(entry_ptr->addr), (long long)(entry_ptr->size), - (int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned), (int)(entry_ptr->is_dirty), - entry_ptr->type->name); - HDfprintf(stdout, " node_ptr = %p, item = %p\n", (void *)node_ptr, H5SL_item(node_ptr)); + fprintf(stdout, "%s%d 0x%016llx %4lld %d/%d %d %s\n", cache_ptr->prefix, i, + (long long)(entry_ptr->addr), (long long)(entry_ptr->size), + (int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned), (int)(entry_ptr->is_dirty), + entry_ptr->type->name); + fprintf(stdout, " node_ptr = %p, item = %p\n", (void *)node_ptr, H5SL_item(node_ptr)); /* increment node_ptr before we delete its target */ node_ptr = H5SL_next(node_ptr); @@ -305,7 +305,7 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn) } /* end while */ } /* end if */ - HDfprintf(stdout, "\n\n"); + fprintf(stdout, "\n\n"); FUNC_LEAVE_NOAPI(ret_value) } /* H5C_dump_cache_skip_list() */ @@ -465,157 +465,154 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, average_failed_search_depth = ((double)(cache_ptr->total_failed_ht_search_depth)) / ((double)(cache_ptr->failed_ht_searches)); - HDfprintf(stdout, "\n%sH5C: cache statistics for %s\n", cache_ptr->prefix, cache_name); + fprintf(stdout, "\n%sH5C: cache statistics for %s\n", cache_ptr->prefix, cache_name); - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); - HDfprintf(stdout, "%s hash table insertion / deletions = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->total_ht_insertions), (long)(cache_ptr->total_ht_deletions)); + fprintf(stdout, "%s hash table insertion / deletions = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->total_ht_insertions), (long)(cache_ptr->total_ht_deletions)); - HDfprintf(stdout, "%s HT successful / failed searches = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->successful_ht_searches), (long)(cache_ptr->failed_ht_searches)); + fprintf(stdout, "%s HT successful / failed searches = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->successful_ht_searches), (long)(cache_ptr->failed_ht_searches)); - HDfprintf(stdout, "%s Av. HT suc / failed search depth = %f / %f\n", cache_ptr->prefix, - average_successful_search_depth, average_failed_search_depth); + fprintf(stdout, "%s Av. HT suc / failed search depth = %f / %f\n", cache_ptr->prefix, + average_successful_search_depth, average_failed_search_depth); - HDfprintf(stdout, "%s current (max) index size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, - (long)(cache_ptr->index_size), (long)(cache_ptr->max_index_size), - (unsigned long)(cache_ptr->index_len), (unsigned long)(cache_ptr->max_index_len)); + fprintf(stdout, "%s current (max) index size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, + (long)(cache_ptr->index_size), (long)(cache_ptr->max_index_size), + (unsigned long)(cache_ptr->index_len), (unsigned long)(cache_ptr->max_index_len)); - HDfprintf(stdout, "%s current (max) clean/dirty idx size = %ld (%ld) / %ld (%ld)\n", cache_ptr->prefix, - (long)(cache_ptr->clean_index_size), (long)(cache_ptr->max_clean_index_size), - (long)(cache_ptr->dirty_index_size), (long)(cache_ptr->max_dirty_index_size)); + fprintf(stdout, "%s current (max) clean/dirty idx size = %ld (%ld) / %ld (%ld)\n", cache_ptr->prefix, + (long)(cache_ptr->clean_index_size), (long)(cache_ptr->max_clean_index_size), + (long)(cache_ptr->dirty_index_size), (long)(cache_ptr->max_dirty_index_size)); - HDfprintf(stdout, "%s current (max) slist size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, - (long)(cache_ptr->slist_size), (long)(cache_ptr->max_slist_size), - (unsigned long)(cache_ptr->slist_len), (unsigned long)(cache_ptr->max_slist_len)); + fprintf(stdout, "%s current (max) slist size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, + (long)(cache_ptr->slist_size), (long)(cache_ptr->max_slist_size), + (unsigned long)(cache_ptr->slist_len), (unsigned long)(cache_ptr->max_slist_len)); - HDfprintf(stdout, "%s current (max) PL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, - (long)(cache_ptr->pl_size), (long)(cache_ptr->max_pl_size), (unsigned long)(cache_ptr->pl_len), - (unsigned long)(cache_ptr->max_pl_len)); + fprintf(stdout, "%s current (max) PL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, + (long)(cache_ptr->pl_size), (long)(cache_ptr->max_pl_size), (unsigned long)(cache_ptr->pl_len), + (unsigned long)(cache_ptr->max_pl_len)); - HDfprintf(stdout, "%s current (max) PEL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, - (long)(cache_ptr->pel_size), (long)(cache_ptr->max_pel_size), - (unsigned long)(cache_ptr->pel_len), (unsigned long)(cache_ptr->max_pel_len)); + fprintf(stdout, "%s current (max) PEL size / length = %ld (%ld) / %lu (%lu)\n", cache_ptr->prefix, + (long)(cache_ptr->pel_size), (long)(cache_ptr->max_pel_size), (unsigned long)(cache_ptr->pel_len), + (unsigned long)(cache_ptr->max_pel_len)); - HDfprintf(stdout, "%s current LRU list size / length = %ld / %lu\n", cache_ptr->prefix, - (long)(cache_ptr->LRU_list_size), (unsigned long)(cache_ptr->LRU_list_len)); + fprintf(stdout, "%s current LRU list size / length = %ld / %lu\n", cache_ptr->prefix, + (long)(cache_ptr->LRU_list_size), (unsigned long)(cache_ptr->LRU_list_len)); #if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS - HDfprintf(stdout, "%s current clean LRU size / length = %ld / %lu\n", cache_ptr->prefix, - (long)(cache_ptr->cLRU_list_size), (unsigned long)(cache_ptr->cLRU_list_len)); + fprintf(stdout, "%s current clean LRU size / length = %ld / %lu\n", cache_ptr->prefix, + (long)(cache_ptr->cLRU_list_size), (unsigned long)(cache_ptr->cLRU_list_len)); - HDfprintf(stdout, "%s current dirty LRU size / length = %ld / %lu\n", cache_ptr->prefix, - (long)(cache_ptr->dLRU_list_size), (unsigned long)(cache_ptr->dLRU_list_len)); + fprintf(stdout, "%s current dirty LRU size / length = %ld / %lu\n", cache_ptr->prefix, + (long)(cache_ptr->dLRU_list_size), (unsigned long)(cache_ptr->dLRU_list_len)); #endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ - HDfprintf(stdout, "%s Total hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix, - (long)total_hits, (long)total_misses, hit_rate); + fprintf(stdout, "%s Total hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix, + (long)total_hits, (long)total_misses, hit_rate); - HDfprintf(stdout, "%s Total write / read (max) protects = %ld / %ld (%ld)\n", cache_ptr->prefix, - (long)total_write_protects, (long)total_read_protects, (long)max_read_protects); + fprintf(stdout, "%s Total write / read (max) protects = %ld / %ld (%ld)\n", cache_ptr->prefix, + (long)total_write_protects, (long)total_read_protects, (long)max_read_protects); - HDfprintf(stdout, "%s Total clears / flushes = %ld / %ld\n", cache_ptr->prefix, - (long)total_clears, (long)total_flushes); + fprintf(stdout, "%s Total clears / flushes = %ld / %ld\n", cache_ptr->prefix, + (long)total_clears, (long)total_flushes); - HDfprintf(stdout, "%s Total evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix, - (long)total_evictions, (long)total_take_ownerships); + fprintf(stdout, "%s Total evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix, + (long)total_evictions, (long)total_take_ownerships); - HDfprintf(stdout, "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix, - (long)total_insertions, (long)total_pinned_insertions, (long)total_moves); + fprintf(stdout, "%s Total insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix, + (long)total_insertions, (long)total_pinned_insertions, (long)total_moves); - HDfprintf(stdout, "%s Total entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix, - (long)total_entry_flush_moves, (long)total_cache_flush_moves); + fprintf(stdout, "%s Total entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix, + (long)total_entry_flush_moves, (long)total_cache_flush_moves); - HDfprintf(stdout, "%s Total entry size incrs / decrs = %ld / %ld\n", cache_ptr->prefix, - (long)total_size_increases, (long)total_size_decreases); + fprintf(stdout, "%s Total entry size incrs / decrs = %ld / %ld\n", cache_ptr->prefix, + (long)total_size_increases, (long)total_size_decreases); - HDfprintf(stdout, "%s Ttl entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix, - (long)total_entry_flush_size_changes, (long)total_cache_flush_size_changes); + fprintf(stdout, "%s Ttl entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix, + (long)total_entry_flush_size_changes, (long)total_cache_flush_size_changes); - HDfprintf(stdout, "%s Total entry pins (dirty) / unpins = %ld (%ld) / %ld\n", cache_ptr->prefix, - (long)total_pins, (long)total_dirty_pins, (long)total_unpins); + fprintf(stdout, "%s Total entry pins (dirty) / unpins = %ld (%ld) / %ld\n", cache_ptr->prefix, + (long)total_pins, (long)total_dirty_pins, (long)total_unpins); - HDfprintf(stdout, "%s Total pinned flushes / clears = %ld / %ld\n", cache_ptr->prefix, - (long)total_pinned_flushes, (long)total_pinned_clears); + fprintf(stdout, "%s Total pinned flushes / clears = %ld / %ld\n", cache_ptr->prefix, + (long)total_pinned_flushes, (long)total_pinned_clears); - HDfprintf(stdout, "%s MSIC: (make space in cache) calls = %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->calls_to_msic)); + fprintf(stdout, "%s MSIC: (make space in cache) calls = %lld\n", cache_ptr->prefix, + (long long)(cache_ptr->calls_to_msic)); if (cache_ptr->calls_to_msic > 0) average_entries_skipped_per_calls_to_msic = (((double)(cache_ptr->total_entries_skipped_in_msic)) / ((double)(cache_ptr->calls_to_msic))); - HDfprintf(stdout, "%s MSIC: Average/max entries skipped = %lf / %ld\n", cache_ptr->prefix, - (double)average_entries_skipped_per_calls_to_msic, - (long)(cache_ptr->max_entries_skipped_in_msic)); + fprintf(stdout, "%s MSIC: Average/max entries skipped = %lf / %ld\n", cache_ptr->prefix, + (double)average_entries_skipped_per_calls_to_msic, + (long)(cache_ptr->max_entries_skipped_in_msic)); if (cache_ptr->calls_to_msic > 0) average_dirty_pf_entries_skipped_per_call_to_msic = (((double)(cache_ptr->total_dirty_pf_entries_skipped_in_msic)) / ((double)(cache_ptr->calls_to_msic))); - HDfprintf(stdout, "%s MSIC: Average/max dirty pf entries skipped = %lf / %ld\n", cache_ptr->prefix, - average_dirty_pf_entries_skipped_per_call_to_msic, - (long)(cache_ptr->max_dirty_pf_entries_skipped_in_msic)); + fprintf(stdout, "%s MSIC: Average/max dirty pf entries skipped = %lf / %ld\n", cache_ptr->prefix, + average_dirty_pf_entries_skipped_per_call_to_msic, + (long)(cache_ptr->max_dirty_pf_entries_skipped_in_msic)); if (cache_ptr->calls_to_msic > 0) average_entries_scanned_per_calls_to_msic = (((double)(cache_ptr->total_entries_scanned_in_msic)) / ((double)(cache_ptr->calls_to_msic))); - HDfprintf(stdout, "%s MSIC: Average/max entries scanned = %lf / %ld\n", cache_ptr->prefix, - (double)average_entries_scanned_per_calls_to_msic, - (long)(cache_ptr->max_entries_scanned_in_msic)); + fprintf(stdout, "%s MSIC: Average/max entries scanned = %lf / %ld\n", cache_ptr->prefix, + (double)average_entries_scanned_per_calls_to_msic, + (long)(cache_ptr->max_entries_scanned_in_msic)); - HDfprintf(stdout, "%s MSIC: Scanned to make space(evict) = %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->entries_scanned_to_make_space)); + fprintf(stdout, "%s MSIC: Scanned to make space(evict) = %lld\n", cache_ptr->prefix, + (long long)(cache_ptr->entries_scanned_to_make_space)); - HDfprintf( - stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space)); + fprintf(stdout, "%s MSIC: Scanned to satisfy min_clean = %lld\n", cache_ptr->prefix, + (long long)(cache_ptr->total_entries_scanned_in_msic - cache_ptr->entries_scanned_to_make_space)); - HDfprintf(stdout, "%s slist/LRU/index scan restarts = %lld / %lld / %lld.\n", cache_ptr->prefix, - (long long)(cache_ptr->slist_scan_restarts), (long long)(cache_ptr->LRU_scan_restarts), - (long long)(cache_ptr->index_scan_restarts)); + fprintf(stdout, "%s slist/LRU/index scan restarts = %lld / %lld / %lld.\n", cache_ptr->prefix, + (long long)(cache_ptr->slist_scan_restarts), (long long)(cache_ptr->LRU_scan_restarts), + (long long)(cache_ptr->index_scan_restarts)); - HDfprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n", - cache_ptr->prefix, cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded, - cache_ptr->last_image_size); + fprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n", + cache_ptr->prefix, cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded, + cache_ptr->last_image_size); - HDfprintf(stdout, "%s prefetches / dirty prefetches = %lld / %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches)); + fprintf(stdout, "%s prefetches / dirty prefetches = %lld / %lld\n", cache_ptr->prefix, + (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches)); - HDfprintf(stdout, "%s prefetch hits/flushes/evictions = %lld / %lld / %lld\n", cache_ptr->prefix, - (long long)(cache_ptr->prefetch_hits), - (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]), - (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID])); + fprintf(stdout, "%s prefetch hits/flushes/evictions = %lld / %lld / %lld\n", cache_ptr->prefix, + (long long)(cache_ptr->prefetch_hits), (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]), + (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID])); if (cache_ptr->prefetches > 0) prefetch_use_rate = 100.0 * ((double)(cache_ptr->prefetch_hits)) / ((double)(cache_ptr->prefetches)); else prefetch_use_rate = 0.0; - HDfprintf(stdout, "%s prefetched entry use rate = %lf\n", cache_ptr->prefix, prefetch_use_rate); + fprintf(stdout, "%s prefetched entry use rate = %lf\n", cache_ptr->prefix, prefetch_use_rate); #if H5C_COLLECT_CACHE_ENTRY_STATS - HDfprintf(stdout, "%s aggregate max / min accesses = %d / %d\n", cache_ptr->prefix, - (int)aggregate_max_accesses, (int)aggregate_min_accesses); + fprintf(stdout, "%s aggregate max / min accesses = %d / %d\n", cache_ptr->prefix, + (int)aggregate_max_accesses, (int)aggregate_min_accesses); - HDfprintf(stdout, "%s aggregate max_clears / max_flushes = %d / %d\n", cache_ptr->prefix, - (int)aggregate_max_clears, (int)aggregate_max_flushes); + fprintf(stdout, "%s aggregate max_clears / max_flushes = %d / %d\n", cache_ptr->prefix, + (int)aggregate_max_clears, (int)aggregate_max_flushes); - HDfprintf(stdout, "%s aggregate max_size / max_pins = %d / %d\n", cache_ptr->prefix, - (int)aggregate_max_size, (int)aggregate_max_pins); + fprintf(stdout, "%s aggregate max_size / max_pins = %d / %d\n", cache_ptr->prefix, + (int)aggregate_max_size, (int)aggregate_max_pins); #endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ if (display_detailed_stats) { for (i = 0; i <= cache_ptr->max_type_id; i++) { - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); - HDfprintf(stdout, "%s Stats on %s:\n", cache_ptr->prefix, - ((cache_ptr->class_table_ptr))[i]->name); + fprintf(stdout, "%s Stats on %s:\n", cache_ptr->prefix, ((cache_ptr->class_table_ptr))[i]->name); if ((cache_ptr->hits[i] > 0) || (cache_ptr->misses[i] > 0)) hit_rate = 100.0 * ((double)(cache_ptr->hits[i])) / @@ -623,56 +620,56 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, else hit_rate = 0.0; - HDfprintf(stdout, "%s hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix, - (long)(cache_ptr->hits[i]), (long)(cache_ptr->misses[i]), hit_rate); + fprintf(stdout, "%s hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix, + (long)(cache_ptr->hits[i]), (long)(cache_ptr->misses[i]), hit_rate); - HDfprintf(stdout, "%s write / read (max) protects = %ld / %ld (%d)\n", cache_ptr->prefix, - (long)(cache_ptr->write_protects[i]), (long)(cache_ptr->read_protects[i]), - (int)(cache_ptr->max_read_protects[i])); + fprintf(stdout, "%s write / read (max) protects = %ld / %ld (%d)\n", cache_ptr->prefix, + (long)(cache_ptr->write_protects[i]), (long)(cache_ptr->read_protects[i]), + (int)(cache_ptr->max_read_protects[i])); - HDfprintf(stdout, "%s clears / flushes = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->clears[i]), (long)(cache_ptr->flushes[i])); + fprintf(stdout, "%s clears / flushes = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->clears[i]), (long)(cache_ptr->flushes[i])); - HDfprintf(stdout, "%s evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->evictions[i]), (long)(cache_ptr->take_ownerships[i])); + fprintf(stdout, "%s evictions / take ownerships = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->evictions[i]), (long)(cache_ptr->take_ownerships[i])); - HDfprintf(stdout, "%s insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->insertions[i]), (long)(cache_ptr->pinned_insertions[i]), - (long)(cache_ptr->moves[i])); + fprintf(stdout, "%s insertions(pinned) / moves = %ld(%ld) / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->insertions[i]), (long)(cache_ptr->pinned_insertions[i]), + (long)(cache_ptr->moves[i])); - HDfprintf(stdout, "%s entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->entry_flush_moves[i]), (long)(cache_ptr->cache_flush_moves[i])); + fprintf(stdout, "%s entry / cache flush moves = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->entry_flush_moves[i]), (long)(cache_ptr->cache_flush_moves[i])); - HDfprintf(stdout, "%s size increases / decreases = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->size_increases[i]), (long)(cache_ptr->size_decreases[i])); + fprintf(stdout, "%s size increases / decreases = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->size_increases[i]), (long)(cache_ptr->size_decreases[i])); - HDfprintf(stdout, "%s entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->entry_flush_size_changes[i]), - (long)(cache_ptr->cache_flush_size_changes[i])); + fprintf(stdout, "%s entry/cache flush size changes = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->entry_flush_size_changes[i]), + (long)(cache_ptr->cache_flush_size_changes[i])); - HDfprintf(stdout, "%s entry pins / unpins = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->pins[i]), (long)(cache_ptr->unpins[i])); + fprintf(stdout, "%s entry pins / unpins = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->pins[i]), (long)(cache_ptr->unpins[i])); - HDfprintf(stdout, "%s entry dirty pins/pin'd flushes = %ld / %ld\n", cache_ptr->prefix, - (long)(cache_ptr->dirty_pins[i]), (long)(cache_ptr->pinned_flushes[i])); + fprintf(stdout, "%s entry dirty pins/pin'd flushes = %ld / %ld\n", cache_ptr->prefix, + (long)(cache_ptr->dirty_pins[i]), (long)(cache_ptr->pinned_flushes[i])); #if H5C_COLLECT_CACHE_ENTRY_STATS - HDfprintf(stdout, "%s entry max / min accesses = %d / %d\n", cache_ptr->prefix, - cache_ptr->max_accesses[i], cache_ptr->min_accesses[i]); + fprintf(stdout, "%s entry max / min accesses = %d / %d\n", cache_ptr->prefix, + cache_ptr->max_accesses[i], cache_ptr->min_accesses[i]); - HDfprintf(stdout, "%s entry max_clears / max_flushes = %d / %d\n", cache_ptr->prefix, - cache_ptr->max_clears[i], cache_ptr->max_flushes[i]); + fprintf(stdout, "%s entry max_clears / max_flushes = %d / %d\n", cache_ptr->prefix, + cache_ptr->max_clears[i], cache_ptr->max_flushes[i]); - HDfprintf(stdout, "%s entry max_size / max_pins = %d / %d\n", cache_ptr->prefix, - (int)(cache_ptr->max_size[i]), (int)(cache_ptr->max_pins[i])); + fprintf(stdout, "%s entry max_size / max_pins = %d / %d\n", cache_ptr->prefix, + (int)(cache_ptr->max_size[i]), (int)(cache_ptr->max_pins[i])); #endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ } /* end for */ } /* end if */ - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); #endif /* H5C_COLLECT_CACHE_STATS */ @@ -1178,7 +1175,7 @@ done: * * Purpose: Print results of a automatic cache resize. * - * This function should only be used where HDprintf() behaves + * This function should only be used where printf() behaves * well -- i.e. not on Windows. * * Return: void @@ -1203,27 +1200,27 @@ H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, switch (status) { case in_spec: - HDfprintf(stdout, "%sAuto cache resize -- no change. (hit rate = %lf)\n", cache_ptr->prefix, - hit_rate); + fprintf(stdout, "%sAuto cache resize -- no change. (hit rate = %lf)\n", cache_ptr->prefix, + hit_rate); break; case increase: assert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold); assert(old_max_cache_size < new_max_cache_size); - HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", - cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); - HDfprintf(stdout, "%scache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, - old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); + fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", + cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); + fprintf(stdout, "%scache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, + old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); break; case flash_increase: assert(old_max_cache_size < new_max_cache_size); - HDfprintf(stdout, "%sflash cache resize(%d) -- size threshold = %zu.\n", cache_ptr->prefix, - (int)(cache_ptr->resize_ctl.flash_incr_mode), cache_ptr->flash_size_increase_threshold); - HDfprintf(stdout, "%s cache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, - old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); + fprintf(stdout, "%sflash cache resize(%d) -- size threshold = %zu.\n", cache_ptr->prefix, + (int)(cache_ptr->resize_ctl.flash_incr_mode), cache_ptr->flash_size_increase_threshold); + fprintf(stdout, "%s cache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, + old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); break; case decrease: @@ -1231,73 +1228,73 @@ H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, switch (cache_ptr->resize_ctl.decr_mode) { case H5C_decr__off: - HDfprintf(stdout, "%sAuto cache resize -- decrease off. HR = %lf\n", cache_ptr->prefix, - hit_rate); + fprintf(stdout, "%sAuto cache resize -- decrease off. HR = %lf\n", cache_ptr->prefix, + hit_rate); break; case H5C_decr__threshold: assert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold); - HDfprintf(stdout, "%sAuto cache resize -- decrease by threshold. HR = %lf > %6.5lf\n", - cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold); - HDfprintf(stdout, "%sout of bounds high (%6.5lf).\n", cache_ptr->prefix, - cache_ptr->resize_ctl.upper_hr_threshold); + fprintf(stdout, "%sAuto cache resize -- decrease by threshold. HR = %lf > %6.5lf\n", + cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold); + fprintf(stdout, "%sout of bounds high (%6.5lf).\n", cache_ptr->prefix, + cache_ptr->resize_ctl.upper_hr_threshold); break; case H5C_decr__age_out: - HDfprintf(stdout, "%sAuto cache resize -- decrease by ageout. HR = %lf\n", - cache_ptr->prefix, hit_rate); + fprintf(stdout, "%sAuto cache resize -- decrease by ageout. HR = %lf\n", + cache_ptr->prefix, hit_rate); break; case H5C_decr__age_out_with_threshold: assert(hit_rate > cache_ptr->resize_ctl.upper_hr_threshold); - HDfprintf(stdout, - "%sAuto cache resize -- decrease by ageout with threshold. HR = %lf > %6.5lf\n", - cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold); + fprintf(stdout, + "%sAuto cache resize -- decrease by ageout with threshold. HR = %lf > %6.5lf\n", + cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.upper_hr_threshold); break; default: - HDfprintf(stdout, "%sAuto cache resize -- decrease by unknown mode. HR = %lf\n", - cache_ptr->prefix, hit_rate); + fprintf(stdout, "%sAuto cache resize -- decrease by unknown mode. HR = %lf\n", + cache_ptr->prefix, hit_rate); } - HDfprintf(stdout, "%s cache size decreased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, - old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); + fprintf(stdout, "%s cache size decreased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, + old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); break; case at_max_size: - HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", - cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); - HDfprintf(stdout, "%s cache already at maximum size so no change.\n", cache_ptr->prefix); + fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", + cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); + fprintf(stdout, "%s cache already at maximum size so no change.\n", cache_ptr->prefix); break; case at_min_size: - HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n", cache_ptr->prefix, - hit_rate); - HDfprintf(stdout, "%s cache already at minimum size.\n", cache_ptr->prefix); + fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n", cache_ptr->prefix, + hit_rate); + fprintf(stdout, "%s cache already at minimum size.\n", cache_ptr->prefix); break; case increase_disabled: - HDfprintf(stdout, "%sAuto cache resize -- increase disabled -- HR = %lf.", cache_ptr->prefix, - hit_rate); + fprintf(stdout, "%sAuto cache resize -- increase disabled -- HR = %lf.", cache_ptr->prefix, + hit_rate); break; case decrease_disabled: - HDfprintf(stdout, "%sAuto cache resize -- decrease disabled -- HR = %lf.\n", cache_ptr->prefix, - hit_rate); + fprintf(stdout, "%sAuto cache resize -- decrease disabled -- HR = %lf.\n", cache_ptr->prefix, + hit_rate); break; case not_full: assert(hit_rate < cache_ptr->resize_ctl.lower_hr_threshold); - HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", - cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); - HDfprintf(stdout, "%s cache not full so no increase in size.\n", cache_ptr->prefix); + fprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", + cache_ptr->prefix, hit_rate, cache_ptr->resize_ctl.lower_hr_threshold); + fprintf(stdout, "%s cache not full so no increase in size.\n", cache_ptr->prefix); break; default: - HDfprintf(stdout, "%sAuto cache resize -- unknown status code.\n", cache_ptr->prefix); + fprintf(stdout, "%sAuto cache resize -- unknown status code.\n", cache_ptr->prefix); break; } } /* H5C_def_auto_resize_rpt_fcn() */ @@ -1626,16 +1623,15 @@ H5C__image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header) prefetch_use_rate = 0.0; if (print_header) { - HDfprintf(stdout, "\nhit prefetches prefetch image pf hit\n"); - HDfprintf(stdout, "rate: total: dirty: hits: flshs: evct: size: rate:\n"); + fprintf(stdout, "\nhit prefetches prefetch image pf hit\n"); + fprintf(stdout, "rate: total: dirty: hits: flshs: evct: size: rate:\n"); } /* end if */ - HDfprintf(stdout, "%3.1lf %5lld %5lld %5lld %5lld %5lld %5lld %3.1lf\n", hit_rate, - (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches), - (long long)(cache_ptr->prefetch_hits), - (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]), - (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]), - (long long)(cache_ptr->last_image_size), prefetch_use_rate); + fprintf(stdout, "%3.1lf %5lld %5lld %5lld %5lld %5lld %5lld %3.1lf\n", hit_rate, + (long long)(cache_ptr->prefetches), (long long)(cache_ptr->dirty_prefetches), + (long long)(cache_ptr->prefetch_hits), (long long)(cache_ptr->flushes[H5AC_PREFETCHED_ENTRY_ID]), + (long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]), + (long long)(cache_ptr->last_image_size), prefetch_use_rate); #endif /* H5C_COLLECT_CACHE_STATS */ done: |