diff options
author | Maksym Planeta <mcsim.planeta@gmail.com> | 2012-10-08 16:38:31 +0200 |
---|---|---|
committer | Maksym Planeta <mcsim.planeta@gmail.com> | 2012-10-08 16:38:31 +0200 |
commit | 3b197f103ae74a0a2fb8f54510dca9195bf637c8 (patch) | |
tree | 2f063af99553b309ee211f140fcde728b878c5ef | |
parent | 9e21b77b7090f8661b7b19d7e81bb5b68169767a (diff) |
Update debugging functions to make them inform caller about memory advice.
* include/mach_debug/vm_info.h (vm_region_info_t): Add memory advice that is
applied to region's information structure.
(vm_object_info_t): Add memory advice that is applied to object's
information structure.
* vm/vm_debug.c (mach_vm_region_info): Function changed to inform caller
about memory advice.
(mach_vm_object_info): Likewise.
-rw-r--r-- | include/mach_debug/vm_info.h | 2 | ||||
-rw-r--r-- | vm/vm_debug.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/mach_debug/vm_info.h b/include/mach_debug/vm_info.h index 70ba8878..35ac528f 100644 --- a/include/mach_debug/vm_info.h +++ b/include/mach_debug/vm_info.h @@ -52,6 +52,7 @@ typedef struct vm_region_info { /*vm_prot_t*/natural_t vri_protection; /* protection code */ /*vm_prot_t*/natural_t vri_max_protection; /* maximum protection */ /*vm_inherit_t*/natural_t vri_inheritance; /* inheritance */ +/*vm_advice_t*/natural_t vri_advice; /* advice */ natural_t vri_wired_count; /* number of times wired */ natural_t vri_user_wired_count; /* number of times user has wired */ @@ -90,6 +91,7 @@ typedef struct vm_object_info { vm_offset_t voi_paging_offset; /* offset into memory object */ /*memory_object_copy_strategy_t*/integer_t voi_copy_strategy; /* how to handle data copy */ +/*vm_advice_t*/natural_t voi_advice; /* how to handle data copy */ vm_offset_t voi_last_alloc; /* offset of last allocation */ natural_t voi_paging_in_progress; /* paging references */ vm_object_info_state_t voi_state; /* random state bits */ diff --git a/vm/vm_debug.c b/vm/vm_debug.c index 0af58b69..3527ef63 100644 --- a/vm/vm_debug.c +++ b/vm/vm_debug.c @@ -157,6 +157,7 @@ mach_vm_region_info(map, address, regionp, portp) regionp->vri_protection = entry->protection; regionp->vri_max_protection = entry->max_protection; regionp->vri_inheritance = entry->inheritance; + regionp->vri_advice = entry->advice; regionp->vri_wired_count = entry->wired_count; regionp->vri_user_wired_count = entry->user_wired_count; @@ -229,6 +230,7 @@ mach_vm_object_info(object, infop, shadowp, copyp) info.voi_shadow_offset = object->shadow_offset; info.voi_paging_offset = object->paging_offset; info.voi_copy_strategy = object->copy_strategy; + info.voi_advice = object->advice; info.voi_last_alloc = object->last_alloc; info.voi_paging_in_progress = object->paging_in_progress; |