From owner-freebsd-hackers Fri Oct 13 10:26: 5 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from Gloria.CAM.ORG (Gloria.CAM.ORG [205.151.116.34]) by hub.freebsd.org (Postfix) with ESMTP id E280237B678 for ; Fri, 13 Oct 2000 10:25:59 -0700 (PDT) Received: from localhost (intmktg@localhost) by Gloria.CAM.ORG (8.9.3/8.9.3) with ESMTP id NAA02094 for ; Fri, 13 Oct 2000 13:27:03 -0400 Date: Fri, 13 Oct 2000 13:27:03 -0400 (EDT) From: Marc Tardif To: freebsd-hackers@freebsd.org Subject: profiling a daemon process Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am trying to profile a daemon process, but no gmon.out file is ever created on FreeBSD. When I brought my code to Linux, I managed to get the graph profile file. First, I compiled everything with the -pg flag, as I would any other program. Then, I run the program which is forked to background and send a few queries to the daemon. Finally, I kill the process using the TERM signal, which is caught and closes everything nicely before exiting (main returns 0). Yet, no profile seems to be created. I then proceeded to make a few changes to help the profiler. First, I commented out the forking of the server process so that the process could be kept in the foreground. Still no profile. I then changed my program so that it doesn't exit on a signal. Still no profile. So what could be the potential reasons for this problem knowing the program doesn't fork and exits on '0'? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message