From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 20 13:33:49 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46E11106566B; Tue, 20 Oct 2009 13:33:49 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from istc.kiev.ua (wolf.istc.kiev.ua [193.108.236.1]) by mx1.freebsd.org (Postfix) with ESMTP id D0BC28FC1B; Tue, 20 Oct 2009 13:33:47 +0000 (UTC) Received: from ravenloft.kiev.ua ([91.123.146.100]) by istc.kiev.ua with esmtp (Exim 4.69) (envelope-from ) id 1N0EqP-0002PP-5d; Tue, 20 Oct 2009 16:33:45 +0300 Date: Tue, 20 Oct 2009 16:33:43 +0300 From: Alex Kozlov To: Ivan Voras , freebsd-hackers@freebsd.org, spam@rm-rf.kiev.ua Message-ID: <20091020133343.GA53941@ravenloft.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: Subject: Re: Make process title - % complete X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2009 13:33:49 -0000 On Tue, Oct 20, 2009 at 02:42:17PM +0200, Ivan Voras wrote: > Alex Kozlov wrote: > > > Of course ps or top output much more convenient, but if setproctitle so > > expencive and will be called so often, then SIGINFO may be good > > compromise. > > Regarding speed of setproctitle(), here are some microbenchmark results > from the attached test source: > > getpid: 3661124.75 iterations/s > setproctitle: 591357.56 iterations/s > > Meaning, setprocitle() is around 6 times more expensive than getpid(), > meaning it can only be pulled off nearly 600,000 calls/s on a 2.3 GHz > Core 2 CPU. > > I really want to be enlightened about how it could affect wallclock time > in make(1). make universe few times with and without patch? -- Adios