MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_map_print

Function vm_map_print

freebsd/vm/vm_map.c:5301–5367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5299#include <ddb/ddb.h>
5300
5301static void
5302vm_map_print(vm_map_t map)
5303{
5304 vm_map_entry_t entry, prev;
5305
5306 db_iprintf("Task map %p: pmap=%p, nentries=%d, version=%u\n",
5307 (void *)map,
5308 (void *)map->pmap, map->nentries, map->timestamp);
5309
5310 db_indent += 2;
5311 prev = &map->header;
5312 VM_MAP_ENTRY_FOREACH(entry, map) {
5313 db_iprintf("map entry %p: start=%p, end=%p, eflags=%#x, \n",
5314 (void *)entry, (void *)entry->start, (void *)entry->end,
5315 entry->eflags);
5316 {
5317 static const char * const inheritance_name[4] =
5318 {"share", "copy", "none", "donate_copy"};
5319
5320 db_iprintf(" prot=%x/%x/%s",
5321 entry->protection,
5322 entry->max_protection,
5323 inheritance_name[(int)(unsigned char)
5324 entry->inheritance]);
5325 if (entry->wired_count != 0)
5326 db_printf(", wired");
5327 }
5328 if (entry->eflags & MAP_ENTRY_IS_SUB_MAP) {
5329 db_printf(", share=%p, offset=0x%jx\n",
5330 (void *)entry->object.sub_map,
5331 (uintmax_t)entry->offset);
5332 if (prev == &map->header ||
5333 prev->object.sub_map !=
5334 entry->object.sub_map) {
5335 db_indent += 2;
5336 vm_map_print((vm_map_t)entry->object.sub_map);
5337 db_indent -= 2;
5338 }
5339 } else {
5340 if (entry->cred != NULL)
5341 db_printf(", ruid %d", entry->cred->cr_ruid);
5342 db_printf(", object=%p, offset=0x%jx",
5343 (void *)entry->object.vm_object,
5344 (uintmax_t)entry->offset);
5345 if (entry->object.vm_object && entry->object.vm_object->cred)
5346 db_printf(", obj ruid %d charge %jx",
5347 entry->object.vm_object->cred->cr_ruid,
5348 (uintmax_t)entry->object.vm_object->charge);
5349 if (entry->eflags & MAP_ENTRY_COW)
5350 db_printf(", copy (%s)",
5351 (entry->eflags & MAP_ENTRY_NEEDS_COPY) ? "needed" : "done");
5352 db_printf("\n");
5353
5354 if (prev == &map->header ||
5355 prev->object.vm_object !=
5356 entry->object.vm_object) {
5357 db_indent += 2;
5358 vm_object_print((db_expr_t)(intptr_t)

Callers 1

vm_map.cFile · 0.85

Calls 3

db_iprintfFunction · 0.85
db_printfFunction · 0.85
vm_object_printFunction · 0.85

Tested by

no test coverage detected