Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jason Molenda <jason-swarelist@molenda.com>
To: gdb-patches@sources.redhat.com
Cc: Tom Tromey <tromey@cygnus.com>
Subject: [RFA] Version 2 of patch to add 'maint profile-gdb' command
Date: Sun, 16 Sep 2001 17:45:00 -0000	[thread overview]
Message-ID: <20010916174433.A3258@shell17.ba.best.com> (raw)
In-Reply-To: <3B9FACDA.6070407@cygnus.com>

Here is a minor rewrite of the profiling patch.  I removed the
PARAMS, fixed the NEWS entry, and added a check for moncontrol()
with -pg - if this fails to compile (as it fails on sources.redhat.com),
an error message is spit out and the configure aborts.  If a warning
is desirable, it's a minor change from calling AC_MSG_ERROR to
AC_MSG_WARN, but I found that to be too subtle in my testing (the
warning was lost among the configure output and people would be
confused why their --enable-profiling gdb isn't actually profiling.)
I amended the gdbint.texinfo documentation to note that the gmon.out
file is overwritten each time gdb is started.

The one notable change I did not incorporate was compiling with
-pg, linking without -pg, and using monstartup() to enable the
profiling.  I have two problems with this - one, I _suspect_ (but
I do not know for certain) that linking without -pg and just calling
monstartup() is going to be unportable.  The second problem is
that, off-hand, I don't know how a program should determine the
start and end addresses of its TEXT section portably (which are
required to use monstartup).

I agree that using monstartup() would be convenient, as developers
would not constantly overwrite their existing gmon.out file whenever
they start gdb, but I'd like to see this patch committed and someone
who understands the mechanisms of profiling across different systems
could tackle it in the future.  In my opinion, monstartup() as a nice
refinement which a motivated person could tackle in the future.  I'd
rather not complicate the basic feature with this at this point.
This patch was written nearly two years ago - it'd be good to get
it integrated.

NB - autoconf and autoheader must both be run after applying this patch.

Thanks for your help,

Jason
From eliz@is.elta.co.il Sun Sep 16 22:36:00 2001
From: Eli Zaretskii <eliz@is.elta.co.il>
To: jason-swarelist@molenda.com
Cc: gdb-patches@sources.redhat.com, tromey@cygnus.com
Subject: Re: [RFA] Version 2 of patch to add 'maint profile-gdb' command
Date: Sun, 16 Sep 2001 22:36:00 -0000
Message-id: <200109170536.HAA21988@is.elta.co.il>
References: <20010910003022.A21681@shell17.ba.best.com> <3B9CE0C6.5060700@cygnus.com> <20010910115244.A25119@shell17.ba.best.com> <3B9FACDA.6070407@cygnus.com> <20010916174433.A3258@shell17.ba.best.com>
X-SW-Source: 2001-09/msg00204.html
Content-length: 1311

> Date: Sun, 16 Sep 2001 17:44:33 -0700
> From: Jason Molenda <jason-swarelist@molenda.com>
> 
> The one notable change I did not incorporate was compiling with
> -pg, linking without -pg, and using monstartup() to enable the
> profiling.  I have two problems with this - one, I _suspect_ (but
> I do not know for certain) that linking without -pg and just calling
> monstartup() is going to be unportable.  The second problem is
> that, off-hand, I don't know how a program should determine the
> start and end addresses of its TEXT section portably (which are
> required to use monstartup).

Emacs uses monstartup and manages to solve both of these problems.
See the file src/emacs.c (search for "etext") for the details.

> diff -u -p -r1.39 gdbint.texinfo
> --- doc/gdbint.texinfo	8 Sep 2001 10:53:45 -0000	1.39
> +++ doc/gdbint.texinfo	17 Sep 2001 00:34:26 -0000

I'd like the documentation of the "maint profile-gdb" command to be in
gdb.texinfo, not gdbint.texinfo.  The latter doesn't document user
commands, and users might not readily know to look in gdbint.  (It's
okay to have it described in both manuals, if you think it will be
useful.)

> +
> +@section Profiling GDB

Please replace "GDB" with "@value{GDBN}" everywhere.

Other than the last two comments, the patches to the docs are
approved.


  reply	other threads:[~2001-09-16 17:45 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-10  0:30 [RFA] " Jason Molenda
2001-09-10  8:48 ` Andrew Cagney
2001-09-10  8:58   ` Eli Zaretskii
2001-09-10  9:04     ` Andrew Cagney
2001-09-10 11:52   ` Jason Molenda
2001-09-10 13:43     ` Eli Zaretskii
2001-09-10 13:59       ` Jason Molenda
2001-09-11  0:38         ` Eli Zaretskii
     [not found]           ` <no.id>
1999-06-15 20:10             ` Missing routines: gdb/top.c John David Anglin
2001-09-11  1:37             ` [RFA] patch to add 'maint profile-gdb' command Jason Molenda
2001-09-11  1:57               ` Eli Zaretskii
2001-09-12  0:00             ` Jason Molenda
2001-09-12  6:00               ` Eli Zaretskii
2001-09-12  7:42                 ` Jason Molenda
2001-09-12  9:06                   ` Eli Zaretskii
2001-09-12 11:58                     ` Tom Tromey
2001-09-12 13:16                       ` Jason Molenda
2008-08-06 19:24             ` [patch] Don't set DT_HP_DEBUG_PRIVATE in solib-pa64.c John David Anglin
2008-08-06 19:49               ` Mark Kettenis
2008-08-06 20:09                 ` John David Anglin
2008-08-06 23:10                 ` John David Anglin
2008-08-07 21:39               ` [patch] Only force private mapping of shared libraries in solib-som.c on HP-UX 10 and earlier John David Anglin
2008-08-08 10:48                 ` Joel Brobecker
2008-08-08 15:34                   ` John David Anglin
2008-08-09 14:37                     ` Joel Brobecker
2008-08-09 18:59                       ` John David Anglin
2008-08-08 19:30             ` ttrace: Protocal error John David Anglin
2008-08-08 20:16               ` John David Anglin
2008-08-09 14:52                 ` Pedro Alves
2008-08-09 15:34                   ` John David Anglin
2008-08-09 18:49                   ` John David Anglin
2008-08-09 22:45                     ` Pedro Alves
2008-08-09 22:46                   ` Pedro Alves
2008-08-09 22:51                     ` Pedro Alves
2008-08-09 23:19                       ` John David Anglin
2008-08-09 22:48                   ` Pedro Alves
2008-08-09 14:53                 ` Joel Brobecker
2008-08-09 23:40             ` John David Anglin
2008-08-10  0:46             ` [4/7] Adjust the ttrace target (HP-UX) to always register the John David Anglin
2008-09-15  2:08             ` [PATCH] Fix dwarf register column to gdb register mapping John David Anglin
2008-09-15  2:24             ` [PATCH] Fix hppa_linux_sigtramp_frame_unwind_cache John David Anglin
2001-09-12 11:28     ` [RFA] patch to add 'maint profile-gdb' command Andrew Cagney
2001-09-12 11:43     ` Andrew Cagney
2001-09-16 17:45       ` Jason Molenda [this message]
2001-09-17 22:39         ` [RFA] Version 2 of " Andrew Cagney
2001-09-18 17:52           ` Fernando Nasser
2001-09-18 17:56             ` Andrew Cagney
2001-09-19  7:11               ` Fernando Nasser
2001-09-19  7:28                 ` Eli Zaretskii
2001-09-19  9:29                   ` Fernando Nasser
2001-09-19 11:30                     ` Eli Zaretskii
2001-09-19 11:41                     ` Andrew Cagney
2001-09-19 11:53                     ` Kevin Buettner
     [not found]         ` <200109170536.HAA21988@is.elta.co.il>
2001-09-17 15:08           ` Michael Snyder
2001-09-17 22:43           ` Andrew Cagney
2001-09-17 23:59             ` Eli Zaretskii
2001-09-24 13:33               ` Jason Molenda
2001-09-24 14:41                 ` Andrew Cagney
2001-09-24 14:58                   ` Eli Zaretskii
2001-09-24 15:13                     ` Andrew Cagney
2001-09-24 14:53                 ` Eli Zaretskii
     [not found] <Pine.SUN.3.91.1010920101719.3922A-100000@is>
     [not found] ` <3BAD1A02.1000702@cygnus.com>
2001-09-23  6:07   ` Eli Zaretskii
2001-09-24 11:02   ` Fernando Nasser
2001-09-24 12:06     ` Andrew Cagney
2001-09-24 19:39     ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010916174433.A3258@shell17.ba.best.com \
    --to=jason-swarelist@molenda.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=tromey@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox