*** empty log message ***

This commit is contained in:
Martin Baulig
1999-03-30 11:55:53 +00:00
parent b3b2411cb7
commit 66dddd9799
4 changed files with 30 additions and 5 deletions

View File

@@ -278,7 +278,7 @@ main (int argc, char *argv [])
glibtop_get_proc_segment (&data.proc_segment, pid);
printf ("Proc_Segment PID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) pid,
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx\n", (int) pid,
(unsigned long) data.proc_segment.flags,
(unsigned long) data.proc_segment.text_rss,
(unsigned long) data.proc_segment.shlib_rss,
@@ -393,7 +393,7 @@ main (int argc, char *argv [])
glibtop_get_proc_segment (&data.proc_segment, ppid);
printf ("Proc_Segment PPID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) ppid,
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx\n", (int) ppid,
(unsigned long) data.proc_segment.flags,
(unsigned long) data.proc_segment.text_rss,
(unsigned long) data.proc_segment.shlib_rss,
@@ -508,7 +508,7 @@ main (int argc, char *argv [])
glibtop_get_proc_segment (&data.proc_segment, 1);
printf ("Proc_Segment INIT %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu\n", 1,
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx\n", 1,
(unsigned long) data.proc_segment.flags,
(unsigned long) data.proc_segment.text_rss,
(unsigned long) data.proc_segment.shlib_rss,

View File

@@ -87,7 +87,7 @@ output (pid_t pid)
glibtop_get_proc_segment (&data.proc_segment, pid);
printf ("Proc_Segment PID %5d (0x%08lx): "
"%lu %lu %lu %lu %lu %lu %lu %lu\n", (int) pid,
"%lu %lu %lu %lu %lu 0x%lx 0x%lx 0x%lx\n", (int) pid,
(unsigned long) data.proc_segment.flags,
(unsigned long) data.proc_segment.text_rss,
(unsigned long) data.proc_segment.shlib_rss,

View File

@@ -86,7 +86,6 @@ glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf,
buf->size <<= pageshift;
buf->resident <<= pageshift;
buf->share <<= pageshift;
buf->rss <<= pageshift;
buf->flags = _glibtop_sysdeps_proc_mem;
}

View File

@@ -38,13 +38,33 @@ static const unsigned long _glibtop_sysdeps_proc_segment_state =
(1 << GLIBTOP_PROC_SEGMENT_END_CODE) +
(1 << GLIBTOP_PROC_SEGMENT_START_STACK);
#ifndef LOG1024
#define LOG1024 10
#endif
/* these are for getting the memory statistics */
static int pageshift; /* log base 2 of the pagesize */
/* define pagetok in terms of pageshift */
#define pagetok(size) ((size) << pageshift)
/* Init function. */
void
glibtop_init_proc_segment_s (glibtop *server)
{
register int pagesize;
server->sysdeps.proc_segment = _glibtop_sysdeps_proc_segment |
_glibtop_sysdeps_proc_segment_state;
/* get the page size with "getpagesize" and calculate pageshift. */
pagesize = getpagesize ();
pageshift = 0;
while (pagesize > 1) {
pageshift++;
pagesize >>= 1;
}
}
/* Provides detailed information about a process. */
@@ -67,6 +87,12 @@ glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
buf->stack_rss = proc_mem.segment.stack;
buf->dirty_size = proc_mem.dt;
buf->text_rss <<= pageshift;
buf->shlib_rss <<= pageshift;
buf->data_rss <<= pageshift;
buf->stack_rss <<= pageshift;
buf->dirty_size <<= pageshift;
buf->flags = _glibtop_sysdeps_proc_segment;
if (glibtop_get_proc_data_proc_state_s (server, &proc_state, pid))