public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] Re: sprofil() implementation
@ 2001-03-21 20:17 Ulrich Drepper
  2001-03-21 22:00 ` David Mosberger
  2001-03-22  1:13 ` Ulrich Drepper
  0 siblings, 2 replies; 3+ messages in thread
From: Ulrich Drepper @ 2001-03-21 20:17 UTC (permalink / raw)
  To: linux-ia64

David Mosberger <davidm@hpl.hp.com> writes:

> Attached below is an implementation of the sprofil() call.

Thanks, I've added the patch.  There was one bug left (on 32-bit
archs) and I did some reformatting but essentially it is plainly
accepted.  Thanks.


But one word of warning: this interface is insufficient.  We need a
way to dynamically add and remove new segments.  This is necessary to
support dlopen() etc.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Linux-ia64] Re: sprofil() implementation
  2001-03-21 20:17 [Linux-ia64] Re: sprofil() implementation Ulrich Drepper
@ 2001-03-21 22:00 ` David Mosberger
  2001-03-22  1:13 ` Ulrich Drepper
  1 sibling, 0 replies; 3+ messages in thread
From: David Mosberger @ 2001-03-21 22:00 UTC (permalink / raw)
  To: linux-ia64

>>>>> On 21 Mar 2001 12:17:30 -0800, Ulrich Drepper <drepper@redhat.com> said:

  Uli> David Mosberger <davidm@hpl.hp.com> writes:
  >> Attached below is an implementation of the sprofil() call.

  Uli> Thanks, I've added the patch.  There was one bug left (on 32-bit
  Uli> archs) and I did some reformatting but essentially it is plainly
  Uli> accepted.  Thanks.

Thanks!

  Uli> But one word of warning: this interface is insufficient.  We need a
  Uli> way to dynamically add and remove new segments.  This is necessary to
  Uli> support dlopen() etc.

Yes, I considered that.  I thought it would be OK to use sprofil() to
stop profiling completely on a dlopen(), register the new library, and
then call sprofil() again.  Apart from being a bit slower than
strictly necessary, I don't think there is an issue with this.  Are
you concerned about performance or something else?

On a related topic: the gmon.out file currently does not encode any
filenames.  That's would create problems with dlopen().  I think the
best way to fix this is to add a new gmon.out tag that encodes the
filename to which the remainder of the file applies
(GMON_TAG_IMAGE_PATH or something like that).

	--david


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Linux-ia64] Re: sprofil() implementation
  2001-03-21 20:17 [Linux-ia64] Re: sprofil() implementation Ulrich Drepper
  2001-03-21 22:00 ` David Mosberger
@ 2001-03-22  1:13 ` Ulrich Drepper
  1 sibling, 0 replies; 3+ messages in thread
From: Ulrich Drepper @ 2001-03-22  1:13 UTC (permalink / raw)
  To: linux-ia64

David Mosberger <davidm@hpl.hp.com> writes:

> Yes, I considered that.  I thought it would be OK to use sprofil() to
> stop profiling completely on a dlopen(), register the new library, and
> then call sprofil() again.  Apart from being a bit slower than
> strictly necessary, I don't think there is an issue with this.  Are
> you concerned about performance or something else?

Multi-threaded applications will have a problem with this.  I prefer
to see a possibility to actually add and remove segments.

> On a related topic: the gmon.out file currently does not encode any
> filenames.  That's would create problems with dlopen().  I think the
> best way to fix this is to add a new gmon.out tag that encodes the
> filename to which the remainder of the file applies
> (GMON_TAG_IMAGE_PATH or something like that).

Definitely, there are quite a lot of changes necessary to the gmon
format.  I haven't even started thinking about this.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-03-22  1:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-21 20:17 [Linux-ia64] Re: sprofil() implementation Ulrich Drepper
2001-03-21 22:00 ` David Mosberger
2001-03-22  1:13 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox