From owner-freebsd-hackers Tue Sep 10 10:44:12 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA00347 for hackers-outgoing; Tue, 10 Sep 1996 10:44:12 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA00341 for ; Tue, 10 Sep 1996 10:44:09 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA03054; Tue, 10 Sep 1996 10:43:01 -0700 From: Terry Lambert Message-Id: <199609101743.KAA03054@phaeton.artisoft.com> Subject: Re: kernel performance To: fwmiller@cs.UMD.EDU (Frank W. Miller) Date: Tue, 10 Sep 1996 10:43:00 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG, fwmiller@cs.UMD.EDU In-Reply-To: <199609092229.SAA01670@yangtze.cs.UMD.EDU> from "Frank W. Miller" at Sep 9, 96 06:29:00 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > For lack of a better place to start, I chose this mailing list. > > I am curious if there are any performance monitoring facilities built > into the kernel. In particular, I am interested in obtaining > timings of the execution of the read() and write() system calls. > I want to break the measurements down according to how much time > is spent in various areas of the kernel code, how much is spent > waiting for I/O device hardware, etc. There are performance figure you can get via gprof. These are statistical in nature, so it will be impossible to make a reasonable distinction between cache/non-cache cases (which is why statistical profiling sucks). I have non-statistical profiling data starting from the VFS consumer layer, and working its way down through the supporting code, but excluding some VM and driver effects... it was collected on Win95 using the Pentium instruction clock using highly modified gprof code and compiler generated function entry points + stack hacking to get function exit counters. The Win95 code had all of the gross architectural modifications I've been discussing for the past two years, so there are some functional bottlenecks removed. The data is proprietary to my employer. Statistical profiling operates by dividing the address space into "count buckets" and sampling the PC at intervals. This is not a higly reliable mechanism, but barring a lot of hacking, you will probably not be able to easily get more useful numbers. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.