From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17346 invoked by alias); 6 Jan 2003 14:17:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16652 invoked from network); 6 Jan 2003 14:14:53 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.209.173) by 209.249.29.67 with SMTP; 6 Jan 2003 14:14:53 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 03DFE3D44; Mon, 6 Jan 2003 09:14:41 -0500 (EST) Message-ID: <3E198F51.2030209@redhat.com> Date: Mon, 06 Jan 2003 14:17:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] Re: Profiling gdb? References: <20020120210343.A22638@nevyn.them.org> <3C4B8A6B.30407@cygnus.com> <20030105222713.GA22511@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00204.txt.bz2 > > Perhaps some other time. I do _use_ monstartup, however. > > This patch should address all comments from the last three times this > came up. I chose to use monstartup/_mcleanup instead of using > moncontrol; when someone wants to use this on a system without those > functions, _then_ we can decide how to handle it. That's just my > opinion though. What I've done should work for at least GNU/Linux and > FreeBSD, and that's enough to be useful. It only comes in if you > configure it on, anyway. > > It works like a charm; absolutely beautifully. Thoughts, all? (Unfortunatly, I've also leant a few things about how profiling works ... :-(). I think the commands should always be present - conditional on the corresponding function being present. Enabling / disabling the profiler is orthogonal to compiling with -pg. I'm not sure about the unpublished _moncleanup() call. Are you sure of monstartup()'s function signature (ari doesn't like the extern declarations but there isn't a header file :-(). I also suspect that more explict commands such as: moncontrol on/off monstartup [ ] would be better. The person using this feature will need to know how it is implemented anyway. (Did Jason Molenda, have something to do with the original patch?) Andrew