[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: benchmark and profiling
From: |
Diego Roversi |
Subject: |
Re: benchmark and profiling |
Date: |
Mon, 31 Dec 2001 18:14:29 +0100 |
User-agent: |
Mutt/1.2.5i |
Hello,
finally I succeded in profiling the ext2fs translator and I found the most
of the time is spent waiting for a lock.
Here the result of profiling a gnumach compile:
Flat profile:
Each sample counts as 0.0001 seconds.
% cumulative self self total
time seconds seconds calls ps/call ps/call name
85.55 6.35 6.35 file_pager_write_page
(rwlock.h:52 @ 804e17e)
12.82 7.30 0.95 file_pager_write_page
(pager.c:382 @ 804e190)
0.27 7.32 0.02 find_cache
(name-cache.c:82 @ 8051503)
[...]
Note: line 382 of pager.c is the first line after the call of
rwlock_reader_lock(). Note also that gprof report time scaled of 300 factor
(ie you can obtain real time multiply by 300).
BTW: for profiling ext2fs I made the following modification to fsys-goway.c
in libdiskfs:
--- fsys-goaway.c Mon Dec 31 10:56:44 2001
+++ /gnu/src/hurd-20011105/libdiskfs/fsys-goaway.c Tue Jun 27 01:30:14 1995
@@ -44,11 +44,7 @@
if (ret == 0)
{
/* We are supposed to exit, but first notify the caller. */
- printf("<<< exit >>>\n");
- _mcleanup();
- rename("gmon.out", "gmon.out2");
- sleep(10);
- fsys_goaway_reply (reply, reply_type, 0);
+ fsys_goaway_reply (reply, reply_type, 0);
exit (0);
}
Probably the rename is not strictly necessary, btw before running gprof,
remember to rename back gmon.out to gmon.out. The _mcleanup() forces the
process to produce the gmon.out file.
That's all folk.
--
Saluti / Regards
Diego Roversi | diegor at maganet.net
| diegor at tiscalinet.it