summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksym Planeta <mcsim.planeta@gmail.com>2012-10-08 16:38:31 +0200
committerMaksym Planeta <mcsim.planeta@gmail.com>2012-10-28 12:23:37 +0100
commit2cf980488c7ffafae4036dddefa92d9a8cf2b0db (patch)
tree82d43d1c0af9e514eb995b0b6548ac25a85e2f9b
parent74250405e042ecf0f11adc42f00968b39d93fe3e (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.h2
-rw-r--r--vm/vm_debug.c2
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;