diff options
author | Richard Braun <rbraun@sceen.net> | 2015-12-29 04:16:57 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2015-12-29 04:17:37 +0100 |
commit | 6e2587bc8c082811f3d10827db2baedec56ae4be (patch) | |
tree | c6835c45f9446e99e38962f5149291e7b1469690 | |
parent | f9e95e8372cd62db4805feb30b74223b8db5444b (diff) |
Improve map debugging readability
* vm/vm_map.c (vm_map_print): Reduce indentation, break lines earlier.
(vm_map_copy_print): Likewise.
* vm/vm_object.c (vm_object_print): Likewise.
-rw-r--r-- | vm/vm_map.c | 18 | ||||
-rw-r--r-- | vm/vm_object.c | 14 |
2 files changed, 16 insertions, 16 deletions
diff --git a/vm/vm_map.c b/vm/vm_map.c index 2cb0a29..3a231de 100644 --- a/vm/vm_map.c +++ b/vm/vm_map.c @@ -4729,20 +4729,20 @@ void vm_map_print(db_expr_t addr, boolean_t have_addr, db_expr_t count, const ch else map = (vm_map_t)addr; - iprintf("Task map 0x%X: pmap=0x%X,", + iprintf("Map 0x%X: pmap=0x%X,", (vm_offset_t) map, (vm_offset_t) (map->pmap)); printf("ref=%d,nentries=%d,", map->ref_count, map->hdr.nentries); printf("version=%d\n", map->timestamp); - indent += 2; + indent += 1; for (entry = vm_map_first_entry(map); entry != vm_map_to_entry(map); entry = entry->vme_next) { static char *inheritance_name[3] = { "share", "copy", "none"}; iprintf("map entry 0x%X: ", (vm_offset_t) entry); - printf("start=0x%X, end=0x%X, ", + printf("start=0x%X, end=0x%X\n", (vm_offset_t) entry->vme_start, (vm_offset_t) entry->vme_end); - printf("prot=%X/%X/%s, ", + iprintf("prot=%X/%X/%s, ", entry->protection, entry->max_protection, inheritance_name[entry->inheritance]); @@ -4777,13 +4777,13 @@ void vm_map_print(db_expr_t addr, boolean_t have_addr, db_expr_t count, const ch if ((entry->vme_prev == vm_map_to_entry(map)) || (entry->vme_prev->object.vm_object != entry->object.vm_object)) { - indent += 2; + indent += 1; vm_object_print(entry->object.vm_object); - indent -= 2; + indent -= 1; } } } - indent -= 2; + indent -= 1; } /* @@ -4799,7 +4799,7 @@ void vm_map_copy_print(copy) printf("copy object 0x%x\n", copy); - indent += 2; + indent += 1; iprintf("type=%d", copy->type); switch (copy->type) { @@ -4853,6 +4853,6 @@ void vm_map_copy_print(copy) break; } - indent -= 2; + indent -= 1; } #endif /* MACH_KDB */ diff --git a/vm/vm_object.c b/vm/vm_object.c index dd63481..a026348 100644 --- a/vm/vm_object.c +++ b/vm/vm_object.c @@ -2923,13 +2923,13 @@ void vm_object_print( if (object == VM_OBJECT_NULL) return; - iprintf("Object 0x%X: size=0x%X", - (vm_offset_t) object, (vm_offset_t) object->size); - printf(", %d references, %d resident pages,", object->ref_count, - object->resident_page_count); + iprintf("Object 0x%X: size=0x%X, %d references\n", + (vm_offset_t) object, (vm_offset_t) object->size, + object->ref_count); + iprintf("%d resident pages,", object->resident_page_count); printf(" %d absent pages,", object->absent_count); printf(" %d paging ops\n", object->paging_in_progress); - indent += 2; + indent += 1; iprintf("memory object=0x%X (offset=0x%X),", (vm_offset_t) object->pager, (vm_offset_t) object->paging_offset); printf("control=0x%X, name=0x%X\n", @@ -2948,7 +2948,7 @@ void vm_object_print( (vm_offset_t) object->shadow, (vm_offset_t) object->shadow_offset); printf("copy=0x%X\n", (vm_offset_t) object->copy); - indent += 2; + indent += 1; if (vm_object_print_pages) { count = 0; @@ -2965,7 +2965,7 @@ void vm_object_print( if (count != 0) printf("\n"); } - indent -= 4; + indent -= 2; } #endif /* MACH_KDB */ |