remove proc_mem.{rss,vsize}

This commit is contained in:
Doug MacEachern 2006-03-04 02:48:58 +00:00
parent 0ef68e8beb
commit e63e0ff456
10 changed files with 17 additions and 41 deletions

View File

@ -1,3 +1,9 @@
2006-03-03 Doug MacEachern <dougm@hyperic.net>
* Removed proc_mem.vsize (same as proc_mem.size)
* Removed proc_mem.rss (same as proc_mem.resident)
2006-03-01 Doug MacEachern <dougm@hyperic.net> 2006-03-01 Doug MacEachern <dougm@hyperic.net>
* 1.1.28 released * 1.1.28 released

View File

@ -205,10 +205,8 @@ SIGAR_DECLARE(int) sigar_proc_stat_get(sigar_t *sigar,
typedef struct { typedef struct {
sigar_uint64_t sigar_uint64_t
size, size,
vsize,
resident, resident,
share, share,
rss,
minor_faults, minor_faults,
major_faults, major_faults,
page_faults; page_faults;

View File

@ -1082,11 +1082,9 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
return status; return status;
} }
procmem->size = PAGESHIFT(pinfo->pi_size); procmem->size = PAGESHIFT(pinfo->pi_size); /* XXX fold in pi_dvm ? */
procmem->vsize = PAGESHIFT(pinfo->pi_dvm);
procmem->share = PAGESHIFT(pinfo->pi_sdsize); procmem->share = PAGESHIFT(pinfo->pi_sdsize);
procmem->rss = PAGESHIFT(pinfo->pi_drss + pinfo->pi_trss); procmem->resident = PAGESHIFT(pinfo->pi_drss + pinfo->pi_trss);
procmem->resident = procmem->rss;
procmem->minor_faults = pinfo->pi_minflt; procmem->minor_faults = pinfo->pi_minflt;
procmem->major_faults = pinfo->pi_majflt; procmem->major_faults = pinfo->pi_majflt;

View File

@ -758,7 +758,7 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
task_basic_info_data_t info; task_basic_info_data_t info;
task_events_info_data_t events; task_events_info_data_t events;
mach_msg_type_number_t count; mach_msg_type_number_t count;
vm_size_t vsize, resident, private, vprivate, shared; vm_size_t vsize, private, vprivate, shared;
shared_table table; shared_table table;
vm_address_t address = 0; vm_address_t address = 0;
int i, split = 0; int i, split = 0;
@ -776,7 +776,6 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
} }
vsize = info.virtual_size; vsize = info.virtual_size;
resident = info.resident_size;
count = TASK_EVENTS_INFO_COUNT; count = TASK_EVENTS_INFO_COUNT;
status = task_info(task, TASK_EVENTS_INFO, (task_info_t)&events, &count); status = task_info(task, TASK_EVENTS_INFO, (task_info_t)&events, &count);
@ -879,11 +878,9 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
mach_port_deallocate(self, task); mach_port_deallocate(self, task);
} }
procmem->size = vprivate; procmem->size = info.virtual_size;
procmem->rss = private; procmem->resident = info.resident_size;
procmem->share = shared; procmem->share = shared;
procmem->vsize = vsize;
procmem->resident = resident;
return SIGAR_OK; return SIGAR_OK;
#else #else
@ -894,11 +891,10 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
return status; return status;
} }
procmem->size = procmem->vsize = procmem->size =
(pinfo->KI_TSZ + pinfo->KI_DSZ + pinfo->KI_SSZ) * sigar->pagesize; (pinfo->KI_TSZ + pinfo->KI_DSZ + pinfo->KI_SSZ) * sigar->pagesize;
procmem->resident = procmem->rss = procmem->resident = pinfo->KI_RSS * sigar->pagesize;
pinfo->KI_RSS * sigar->pagesize;
procmem->share = SIGAR_FIELD_NOTIMPL; procmem->share = SIGAR_FIELD_NOTIMPL;

View File

@ -262,16 +262,7 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
procmem->size *= pagesize; procmem->size *= pagesize;
procmem->vsize = procmem->resident = pinfo->pst_rssize * pagesize;
pinfo->pst_vtsize + /* text */
pinfo->pst_vdsize + /* data */
pinfo->pst_vssize; /* stack */
procmem->vsize *= pagesize;
procmem->rss = pinfo->pst_rssize * pagesize;
procmem->resident = procmem->rss;
procmem->share = pinfo->pst_shmsize * pagesize; procmem->share = pinfo->pst_shmsize * pagesize;

View File

@ -733,8 +733,6 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
int status = proc_stat_read(sigar, pid); int status = proc_stat_read(sigar, pid);
linux_proc_stat_t *pstat = &sigar->last_proc_stat; linux_proc_stat_t *pstat = &sigar->last_proc_stat;
procmem->vsize = pstat->vsize;
procmem->rss = pstat->rss;
procmem->minor_faults = pstat->minor_faults; procmem->minor_faults = pstat->minor_faults;
procmem->major_faults = pstat->major_faults; procmem->major_faults = pstat->major_faults;
procmem->page_faults = procmem->page_faults =

View File

@ -214,8 +214,7 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
} }
procmem->resident = taskinfo.resident_size; procmem->resident = taskinfo.resident_size;
procmem->rss = taskinfo.resident_size; procmem->size = taskinfo.virtual_size;
procmem->vsize = taskinfo.virtual_size;
status = table(TBL_UAREA, pid, &s_user, 1, sizeof(s_user)); status = table(TBL_UAREA, pid, &s_user, 1, sizeof(s_user));
@ -225,8 +224,6 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
} }
procmem->share = s_user.u_ru.ru_ixrss; procmem->share = s_user.u_ru.ru_ixrss;
/*XXX*/
procmem->size = 1; /* 1 == let ant test pass for now */
procmem->page_faults = SIGAR_FIELD_NOTIMPL; procmem->page_faults = SIGAR_FIELD_NOTIMPL;
procmem->minor_faults = SIGAR_FIELD_NOTIMPL; procmem->minor_faults = SIGAR_FIELD_NOTIMPL;

View File

@ -536,9 +536,7 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
} }
procmem->size = pinfo->pr_size << 10; procmem->size = pinfo->pr_size << 10;
procmem->rss = pinfo->pr_rssize << 10; procmem->resident = pinfo->pr_rssize << 10;
procmem->resident = procmem->rss;
procmem->vsize = SIGAR_FIELD_NOTIMPL;
procmem->share = SIGAR_FIELD_NOTIMPL; procmem->share = SIGAR_FIELD_NOTIMPL;
if (sigar_proc_usage_get(sigar, &usage, pid) == SIGAR_OK) { if (sigar_proc_usage_get(sigar, &usage, pid) == SIGAR_OK) {

View File

@ -97,9 +97,7 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
sigar_proc_mem_t *procmem) sigar_proc_mem_t *procmem)
{ {
procmem->size = -1; procmem->size = -1;
procmem->vsize = -1;
procmem->share = -1; procmem->share = -1;
procmem->rss = -1;
procmem->resident = -1; procmem->resident = -1;
procmem->page_faults = -1; procmem->page_faults = -1;
procmem->minor_faults = -1; procmem->minor_faults = -1;

View File

@ -850,10 +850,6 @@ SIGAR_DECLARE(int) sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
procmem->minor_faults = SIGAR_FIELD_NOTIMPL; procmem->minor_faults = SIGAR_FIELD_NOTIMPL;
procmem->major_faults = SIGAR_FIELD_NOTIMPL; procmem->major_faults = SIGAR_FIELD_NOTIMPL;
/* deprecated */
procmem->vsize = pinfo->size;
procmem->rss = pinfo->resident;
return SIGAR_OK; return SIGAR_OK;
} }