Using text_rss',
shlib_rss', data_rss' and
dirty_size' instead of
1998-08-12 Martin Baulig <martin@home-of-linux.org> * include/glibtop/procsegment.h (glibtop_proc_segment): Using `text_rss', `shlib_rss', `data_rss' and `dirty_size' instead of `tsr', `lrs', `drs' and `dt'. New field `stack_rss'. * sysdeps/linux/procmem.c: Memory sizes now correctly in bytes. * sysdeps/linux/procsegment.c: Dito. * sysdeps/kernel/procsegment.c: Stack pages are reported via `stack_rss' and no longer count towards `data_rss' * kernel/table.h (table_proc_segment): Added `srs' field. * kernel/table21/module.c (TBL_PROC_SEGMENT): Added kernel support for this. * sysdeps/{linux, kernel, stub}/procmap.c: New files.
This commit is contained in:
committed by
Martin Baulig
parent
da622f70c7
commit
9248d72018
@@ -257,6 +257,21 @@ main (int argc, char *argv [])
|
||||
(unsigned long) data.proc_mem.rss,
|
||||
(unsigned long) data.proc_mem.rss_rlim);
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
glibtop_get_proc_segment (&data.proc_segment, pid);
|
||||
|
||||
printf ("Proc_Segment PID %5u (0x%08lx): "
|
||||
"%lu %lu %lu %lu %lu %lu %lu %lu\n", pid,
|
||||
(unsigned long) data.proc_segment.flags,
|
||||
(unsigned long) data.proc_segment.text_rss,
|
||||
(unsigned long) data.proc_segment.shlib_rss,
|
||||
(unsigned long) data.proc_segment.data_rss,
|
||||
(unsigned long) data.proc_segment.stack_rss,
|
||||
(unsigned long) data.proc_segment.dirty_size,
|
||||
(unsigned long) data.proc_segment.start_code,
|
||||
(unsigned long) data.proc_segment.end_code,
|
||||
(unsigned long) data.proc_segment.start_stack);
|
||||
|
||||
getrusage (RUSAGE_SELF, &ru);
|
||||
|
||||
fprintf (stderr, "GETRUSAGE: (%ld, %ld) - (%ld, %ld)\n",
|
||||
@@ -306,20 +321,6 @@ main (int argc, char *argv [])
|
||||
(unsigned long) data.proc_kernel.nwchan,
|
||||
data.proc_kernel.wchan);
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
glibtop_get_proc_segment (&data.proc_segment, pid);
|
||||
|
||||
printf ("Proc_Segment PID %5u (0x%08lx): "
|
||||
"%lu %lu %lu %lu %lu %lu %lu\n", pid,
|
||||
(unsigned long) data.proc_segment.flags,
|
||||
(unsigned long) data.proc_segment.trs,
|
||||
(unsigned long) data.proc_segment.lrs,
|
||||
(unsigned long) data.proc_segment.drs,
|
||||
(unsigned long) data.proc_segment.dt,
|
||||
(unsigned long) data.proc_segment.start_code,
|
||||
(unsigned long) data.proc_segment.end_code,
|
||||
(unsigned long) data.proc_segment.start_stack);
|
||||
|
||||
printf ("\n");
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
@@ -356,6 +357,21 @@ main (int argc, char *argv [])
|
||||
(unsigned long) data.proc_mem.rss,
|
||||
(unsigned long) data.proc_mem.rss_rlim);
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
glibtop_get_proc_segment (&data.proc_segment, ppid);
|
||||
|
||||
printf ("Proc_Segment PPID %5u (0x%08lx): "
|
||||
"%lu %lu %lu %lu %lu %lu %lu %lu\n", ppid,
|
||||
(unsigned long) data.proc_segment.flags,
|
||||
(unsigned long) data.proc_segment.text_rss,
|
||||
(unsigned long) data.proc_segment.shlib_rss,
|
||||
(unsigned long) data.proc_segment.data_rss,
|
||||
(unsigned long) data.proc_segment.stack_rss,
|
||||
(unsigned long) data.proc_segment.dirty_size,
|
||||
(unsigned long) data.proc_segment.start_code,
|
||||
(unsigned long) data.proc_segment.end_code,
|
||||
(unsigned long) data.proc_segment.start_stack);
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
glibtop_get_proc_time (&data.proc_time, ppid);
|
||||
|
||||
@@ -398,20 +414,6 @@ main (int argc, char *argv [])
|
||||
(unsigned long) data.proc_kernel.nwchan,
|
||||
data.proc_kernel.wchan);
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
glibtop_get_proc_segment (&data.proc_segment, ppid);
|
||||
|
||||
printf ("Proc_Segment PPID %5u (0x%08lx): "
|
||||
"%lu %lu %lu %lu %lu %lu %lu\n", ppid,
|
||||
(unsigned long) data.proc_segment.flags,
|
||||
(unsigned long) data.proc_segment.trs,
|
||||
(unsigned long) data.proc_segment.lrs,
|
||||
(unsigned long) data.proc_segment.drs,
|
||||
(unsigned long) data.proc_segment.dt,
|
||||
(unsigned long) data.proc_segment.start_code,
|
||||
(unsigned long) data.proc_segment.end_code,
|
||||
(unsigned long) data.proc_segment.start_stack);
|
||||
|
||||
printf ("\n");
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
@@ -448,6 +450,21 @@ main (int argc, char *argv [])
|
||||
(unsigned long) data.proc_mem.rss,
|
||||
(unsigned long) data.proc_mem.rss_rlim);
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
glibtop_get_proc_segment (&data.proc_segment, 1);
|
||||
|
||||
printf ("Proc_Segment INIT %5u (0x%08lx): "
|
||||
"%lu %lu %lu %lu %lu %lu %lu %lu\n", 1,
|
||||
(unsigned long) data.proc_segment.flags,
|
||||
(unsigned long) data.proc_segment.text_rss,
|
||||
(unsigned long) data.proc_segment.shlib_rss,
|
||||
(unsigned long) data.proc_segment.data_rss,
|
||||
(unsigned long) data.proc_segment.stack_rss,
|
||||
(unsigned long) data.proc_segment.dirty_size,
|
||||
(unsigned long) data.proc_segment.start_code,
|
||||
(unsigned long) data.proc_segment.end_code,
|
||||
(unsigned long) data.proc_segment.start_stack);
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
glibtop_get_proc_time (&data.proc_time, 1);
|
||||
|
||||
@@ -491,20 +508,6 @@ main (int argc, char *argv [])
|
||||
(unsigned long) data.proc_kernel.nwchan,
|
||||
data.proc_kernel.wchan);
|
||||
|
||||
for (c = 0; c < PROFILE_COUNT; c++)
|
||||
glibtop_get_proc_segment (&data.proc_segment, 1);
|
||||
|
||||
printf ("Proc_Segment INIT %5u (0x%08lx): "
|
||||
"%lu %lu %lu %lu %lu %lu %lu\n", 1,
|
||||
(unsigned long) data.proc_segment.flags,
|
||||
(unsigned long) data.proc_segment.trs,
|
||||
(unsigned long) data.proc_segment.lrs,
|
||||
(unsigned long) data.proc_segment.drs,
|
||||
(unsigned long) data.proc_segment.dt,
|
||||
(unsigned long) data.proc_segment.start_code,
|
||||
(unsigned long) data.proc_segment.end_code,
|
||||
(unsigned long) data.proc_segment.start_stack);
|
||||
|
||||
glibtop_close ();
|
||||
|
||||
exit (0);
|
||||
|
Reference in New Issue
Block a user