summaryrefslogtreecommitdiff
path: root/viengoos/pager.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/pager.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/pager.c')
-rw-r--r--viengoos/pager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/viengoos/pager.c b/viengoos/pager.c
index 245ff33..65ccb5f 100644
--- a/viengoos/pager.c
+++ b/viengoos/pager.c
@@ -244,7 +244,7 @@ pager_collect (int goal)
laundry_list_count (&laundry),
PAGER_LOW_WATER_MARK, goal);
- profile_start ((uintptr_t) &pager_collect, __FUNCTION__);
+ profile_start ((uintptr_t) &pager_collect, __FUNCTION__, NULL);
/* Find a victim. */
struct activity *victim;
@@ -354,7 +354,7 @@ pager_collect (int goal)
return false;
}
- profile_region ("pager_collect(find victim)");
+ profile_region ("find victim");
victim = root_activity;
do