From dcc4e8579f0b414d2b0090c475b88b92386f51e1 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 15 Sep 2021 08:20:38 +0300 Subject: Adjust spaces around '=' in printed messages (refactoring) * checksums.c (GC_check_blocks): Remove space before '=' and add a space (if missing) after '=' in printed message. * darwin_stop_world.c [DEBUG_THREADS_EXTRA] (GC_FindTopOfStack): Likewise. * dbg_mlc.c (GC_print_obj, GC_debug_print_heap_obj_proc): Likewise. * dyn_load.c [IRIX5 || USE_PROC_FOR_LIBRARIES && !LINUX || HPUX] (GC_register_dynamic_libraries): Likewise. [DEBUG_VIRTUALQUERY] (GC_dump_meminfo): Likewise. * os_dep.c [NEED_PROC_MAPS] (GC_get_maps): Likewise. * os_dep.c [PROC_VDB] (GC_proc_read_dirty): Likewise. * os_dep.c [SOFT_VDB] (soft_read_dirty): Likewise. * pthread_support.c (set_marker_thread_name, GC_start_mark_threads_inner): Likewise. * pthread_support.c [DEBUG_THREADS] (GC_delete_thread, GC_unregister_my_thread_inner, GC_unregister_my_thread, GC_thread_exit_proc, GC_start_rtn_prepare_thread): Likewise. * pthread_support.c [GC_LINUX_THREADS] (GC_get_nprocs): Likewise. * tests/disclaim_weakmap_test.c [DEBUG_DISCLAIM_WEAKMAP] (weakmap_add, weakmap_disclaim): Likewise. * tests/subthread_create.c (run_one_test): Likewise. * win32_threads.c (GC_delete_thread, GC_push_stack_for, GC_get_next_stack): Likewise. * darwin_stop_world.c [DEBUG_THREADS] (GC_stack_range_for): Remove '=' in printed message and/or improve message. * mark.c (GC_signal_mark_stack_overflow): Likewise. * mark_rts.c [!NO_DEBUGGING] (GC_print_static_roots): Likewise. * pthread_stop_world.c [DEBUG_THREADS] (GC_push_all_stacks, GC_suspend_all): Likewise. * pthread_support.c (GC_thr_init): Likewise. * tests/disclaim_test.c (pair_dct, pair_new): Likewise. * tests/disclaim_weakmap_test.c (pair_check_rec): Likewise. * tests/initsecondarythread.c (main): Likewise. * tests/subthread_create.c (entry, main): Likewise. * tests/test.c [THREADS] (fork_a_thread, main): Likewise. * tests/test.c [MSWINCE] (thr_window): Likewise. * tests/test.c [NTHREADS>0] (main): Likewise. * tests/threadkey_test.c (main): Likewise. * dyn_load.c [ALPHA && OSF1 && DL_VERBOSE] (GC_register_dynamic_libraries): Reformat printed messages. * tests/disclaim_test.c (main): Remove space after '#' in printed message. --- dyn_load.c | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) (limited to 'dyn_load.c') diff --git a/dyn_load.c b/dyn_load.c index 5fae1647..e1beb367 100644 --- a/dyn_load.c +++ b/dyn_load.c @@ -832,7 +832,7 @@ GC_INNER void GC_register_dynamic_libraries(void) } if (ioctl(fd, PIOCNMAP, &needed_sz) < 0) { ABORT_ARG2("/proc PIOCNMAP ioctl failed", - ": fd = %d, errno = %d", fd, errno); + ": fd= %d, errno= %d", fd, errno); } if (needed_sz >= current_sz) { GC_scratch_recycle_no_gww(addr_map, @@ -973,11 +973,12 @@ GC_INNER void GC_register_dynamic_libraries(void) # ifdef DEBUG_VIRTUALQUERY void GC_dump_meminfo(MEMORY_BASIC_INFORMATION *buf) { - GC_printf("BaseAddress = 0x%lx, AllocationBase = 0x%lx," - " RegionSize = 0x%lx(%lu)\n", buf -> BaseAddress, - buf -> AllocationBase, buf -> RegionSize, buf -> RegionSize); - GC_printf("\tAllocationProtect = 0x%lx, State = 0x%lx, Protect = 0x%lx, " - "Type = 0x%lx\n", buf -> AllocationProtect, buf -> State, + GC_printf("BaseAddress= 0x%lx, AllocationBase= 0x%lx," + " RegionSize= 0x%lx(%lu)\n", + buf -> BaseAddress, buf -> AllocationBase, + buf -> RegionSize, buf -> RegionSize); + GC_printf("\tAllocationProtect= 0x%lx, State= 0x%lx, Protect= 0x%lx, " + "Type= 0x%lx\n", buf -> AllocationProtect, buf -> State, buf -> Protect, buf -> Type); } # endif /* DEBUG_VIRTUALQUERY */ @@ -1106,10 +1107,10 @@ GC_INNER void GC_register_dynamic_libraries(void) # ifdef DL_VERBOSE GC_log_printf("---Module---\n"); - GC_log_printf("Module ID\t = %16ld\n", moduleinfo.lmi_modid); - GC_log_printf("Count of regions = %16d\n", moduleinfo.lmi_nregion); - GC_log_printf("flags for module = %16lx\n", moduleinfo.lmi_flags); - GC_log_printf("module pathname\t = \"%s\"\n", moduleinfo.lmi_name); + GC_log_printf("Module ID: %ld\n", moduleinfo.lmi_modid); + GC_log_printf("Count of regions: %d\n", moduleinfo.lmi_nregion); + GC_log_printf("Flags for module: %016lx\n", moduleinfo.lmi_flags); + GC_log_printf("Module pathname: \"%s\"\n", moduleinfo.lmi_name); # endif /* For each region in this module */ @@ -1126,14 +1127,12 @@ GC_INNER void GC_register_dynamic_libraries(void) # ifdef DL_VERBOSE GC_log_printf("--- Region ---\n"); - GC_log_printf("Region number\t = %16ld\n", - regioninfo.lri_region_no); - GC_log_printf("Protection flags = %016x\n", regioninfo.lri_prot); - GC_log_printf("Virtual address\t = %16p\n", regioninfo.lri_vaddr); - GC_log_printf("Mapped address\t = %16p\n", - regioninfo.lri_mapaddr); - GC_log_printf("Region size\t = %16ld\n", regioninfo.lri_size); - GC_log_printf("Region name\t = \"%s\"\n", regioninfo.lri_name); + GC_log_printf("Region number: %ld\n", regioninfo.lri_region_no); + GC_log_printf("Protection flags: %016x\n", regioninfo.lri_prot); + GC_log_printf("Virtual address: %p\n", regioninfo.lri_vaddr); + GC_log_printf("Mapped address: %p\n", regioninfo.lri_mapaddr); + GC_log_printf("Region size: %ld\n", regioninfo.lri_size); + GC_log_printf("Region name: \"%s\"\n", regioninfo.lri_name); # endif /* register region as a garbage collection root */ @@ -1185,15 +1184,14 @@ GC_INNER void GC_register_dynamic_libraries(void) # ifdef DL_VERBOSE GC_log_printf("---Shared library---\n"); - GC_log_printf("\tfilename\t= \"%s\"\n", shl_desc->filename); - GC_log_printf("\tindex\t\t= %d\n", index); - GC_log_printf("\thandle\t\t= %08x\n", - (unsigned long) shl_desc->handle); - GC_log_printf("\ttext seg.start\t= %08x\n", shl_desc->tstart); - GC_log_printf("\ttext seg.end\t= %08x\n", shl_desc->tend); - GC_log_printf("\tdata seg.start\t= %08x\n", shl_desc->dstart); - GC_log_printf("\tdata seg.end\t= %08x\n", shl_desc->dend); - GC_log_printf("\tref.count\t= %lu\n", shl_desc->ref_count); + GC_log_printf("filename= \"%s\"\n", shl_desc->filename); + GC_log_printf("index= %d\n", index); + GC_log_printf("handle= %08x\n", (unsigned long) shl_desc->handle); + GC_log_printf("text seg.start= %08x\n", shl_desc->tstart); + GC_log_printf("text seg.end= %08x\n", shl_desc->tend); + GC_log_printf("data seg.start= %08x\n", shl_desc->dstart); + GC_log_printf("data seg.end= %08x\n", shl_desc->dend); + GC_log_printf("ref.count= %lu\n", shl_desc->ref_count); # endif /* register shared library's data segment as a garbage collection root */ -- cgit v1.2.1