summaryrefslogtreecommitdiff
path: root/viengoos/ager.c
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-11-18 09:37:04 +0100
committerNeal H. Walfield <neal@gnu.org>2008-11-18 09:37:04 +0100
commitc2790abd038ae456c78f81265d5f381fec895112 (patch)
treedca30ec87572777d0f6f44217358279310a01c14 /viengoos/ager.c
parent468f7efbdbc643ef6ea402e34cec769e4517fc50 (diff)
Update profile interface and add support for profiling multiple threads.
libc-parts/ 2008-11-18 Neal H. Walfield <neal@gnu.org> * profile.h (profile_start): Take additional parameter name2. Update users. (profile_region): Create the id from the function name and the description. * profile.c [__gnu_hurd_viengoos__]: Include <s-printf.h>. [! __gnu_hurd_viengoos__]: Include <pthread.h>. (THREADS): Define. (struct site): Rename from this... (struct call_site): ... to this. Add fields name2 and nested_calls. (SIZE): Rename from this... (CALL_SITES): ... to this. (sites_hash): Replace this variable... (sites_hash_buffer): ... and this one... (init): ... and this one... (sites): ... and this one... (used): ... and this one... (epoch): ... and this one... (calls): ... and this one... (total_time): ... and this one... (extant): ... and this one... (struct profile_block): ... with this new structure... (thread_count): ... this variable... (profile_blocks): ... and this variable. Update users. (struct profile_block): New function. (profile_stats_dump): Improve output. (profile_end): Increment SITE->NESTED_CALLS. (profile_start): Take additional parameter name2. Save it in SITE->NAME2. Call profile_block to get the thread's profile block. Remove initialization code. (profile_end): Call profile_block to get the thread's profile block. viengoos/ 2008-11-18 Neal H. Walfield <neal@gnu.org> * ager.c (ager_loop): Update use of profile_start to match new API. * pager.c (pager_collect): Likewise.
Diffstat (limited to 'viengoos/ager.c')
-rw-r--r--viengoos/ager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/viengoos/ager.c b/viengoos/ager.c
index 808a257..2ca73b7 100644
--- a/viengoos/ager.c
+++ b/viengoos/ager.c
@@ -65,7 +65,7 @@ static void
update_stats (void)
{
ss_mutex_lock (&kernel_lock);
- profile_region ("update_stats");
+ profile_region (NULL);
/* XXX: Update the statistics. We need to average some of the
fields including the number of active, inactive, clean and dirty
@@ -525,7 +525,7 @@ ager_loop (void)
while (frame < frames)
{
ss_mutex_lock (&kernel_lock);
- profile_start ((uintptr_t) &ager_loop, "ager");
+ profile_start ((uintptr_t) &ager_loop, "ager", NULL);
int count = grab ();
if (count == 0)
@@ -548,7 +548,7 @@ ager_loop (void)
thread, it does not for subsequent threads. Moreover, we
would have to access the pages at fault time to ensure
that they are mapped, which is just ugly. */
- profile_start ((uintptr_t) &ager_loop + 1, "l4_unmap");
+ profile_start ((uintptr_t) &ager_loop + 1, "l4_unmap", NULL);
l4_flush_fpages (count, fpages);
if (also_unmap)
{