public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH 4/6] Remove DL_CALL_FCT wrapper which is used in profiling
@ 2015-05-04 15:09 Max Filippov
  0 siblings, 0 replies; 4+ messages in thread
From: Max Filippov @ 2015-05-04 15:09 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 818 bytes --]

Hi Mike,

On Mon, May 4, 2015 at 9:14 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On 04 May 2015 02:25, Max Filippov wrote:
>> From: "Anthony G. Basile" <blueness@gentoo.org>
>>
>> DL_CALL_FCT is defined in <bits/dlfcn.h> on glibc systems and is
>> a macro for calling functions in shared objects with dlsym.  This
>> is useful for profiling since these functions would otherwise not
>> use the PLT and so not be counted when profiling with gprof.
>
> uClibc supports gprof optionally, so i'd be fine with adding this to uClibc.
> at the very least, the stub would be OK.

Ok, I'll drop this patch and submit similar stub to uClibc instead.
BTW, I though uClibc does not support profiling at all. Can you point
me to the documentation/code for that optional gprof support?

-- 
Thanks.
-- Max

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

* Re: [PATCH 4/6] Remove DL_CALL_FCT wrapper which is used in profiling
@ 2015-05-05  2:50 Mike Frysinger
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2015-05-05  2:50 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

On 04 May 2015 18:09, Max Filippov wrote:
> On Mon, May 4, 2015 at 9:14 AM, Mike Frysinger wrote:
> > On 04 May 2015 02:25, Max Filippov wrote:
> >> From: "Anthony G. Basile" <blueness@gentoo.org>
> >>
> >> DL_CALL_FCT is defined in <bits/dlfcn.h> on glibc systems and is
> >> a macro for calling functions in shared objects with dlsym.  This
> >> is useful for profiling since these functions would otherwise not
> >> use the PLT and so not be counted when profiling with gprof.
> >
> > uClibc supports gprof optionally, so i'd be fine with adding this to uClibc.
> > at the very least, the stub would be OK.
> 
> Ok, I'll drop this patch and submit similar stub to uClibc instead.
> BTW, I though uClibc does not support profiling at all. Can you point
> me to the documentation/code for that optional gprof support?

i could have sworn we had it.  maybe i'm confusing some history in my mind.  
even if it doesn't, having a macro that stubs it out costs us nothing and 
increases compatibility with glibc.  we don't take a hard POSIX stance like
other libraries.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 4/6] Remove DL_CALL_FCT wrapper which is used in profiling
@ 2015-05-04  6:14 Mike Frysinger
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2015-05-04  6:14 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

On 04 May 2015 02:25, Max Filippov wrote:
> From: "Anthony G. Basile" <blueness@gentoo.org>
> 
> DL_CALL_FCT is defined in <bits/dlfcn.h> on glibc systems and is
> a macro for calling functions in shared objects with dlsym.  This
> is useful for profiling since these functions would otherwise not
> use the PLT and so not be counted when profiling with gprof.

uClibc supports gprof optionally, so i'd be fine with adding this to uClibc.
at the very least, the stub would be OK.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH 4/6] Remove DL_CALL_FCT wrapper which is used in profiling
@ 2015-05-03 23:25 Max Filippov
  0 siblings, 0 replies; 4+ messages in thread
From: Max Filippov @ 2015-05-03 23:25 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

From: "Anthony G. Basile" <blueness@gentoo.org>

DL_CALL_FCT is defined in <bits/dlfcn.h> on glibc systems and is
a macro for calling functions in shared objects with dlsym.  This
is useful for profiling since these functions would otherwise not
use the PLT and so not be counted when profiling with gprof.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
---
 src/ChangeLog | 4 ++++
 src/ld.h      | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/src/ChangeLog b/src/ChangeLog
index 2ee0d1d..2bb2f0b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
 2015-05-04  Anthony G. Basile  <blueness@gentoo.org>
 
+	* ld.h (DL_CALL_FCT): Define if this macro is undefined.
+
+2015-05-04  Anthony G. Basile  <blueness@gentoo.org>
+
 	* ar.c (do_oper_extract): Use futimes or utimes depending on
 	HAVE_FUTIMES.
 	* strip.c (handle_elf, handle_ar): Likewise.
diff --git a/src/ld.h b/src/ld.h
index 29f4031..e64649c 100644
--- a/src/ld.h
+++ b/src/ld.h
@@ -24,6 +24,9 @@
 #include <stdio.h>
 #include "xelf.h"
 
+#ifndef DL_CALL_FCT
+#define DL_CALL_FCT(f, a) f a
+#endif
 
 /* Recommended size of the buffer passed to ld_strerror.  */
 #define ERRBUFSIZE	(512)
-- 
1.8.1.4


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

end of thread, other threads:[~2015-05-05  2:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-04 15:09 [PATCH 4/6] Remove DL_CALL_FCT wrapper which is used in profiling Max Filippov
  -- strict thread matches above, loose matches on Subject: below --
2015-05-05  2:50 Mike Frysinger
2015-05-04  6:14 Mike Frysinger
2015-05-03 23:25 Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).