aboutsummaryrefslogtreecommitdiff
path: root/gprofng/src
diff options
context:
space:
mode:
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>2023-03-23 11:46:08 -0700
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>2023-03-27 11:47:52 -0700
commit66f76c545b293f8b89fef0f996a3a48fa59fae61 (patch)
tree156a39c23f3c0e0dd694ee12e0a921b248ede4d3 /gprofng/src
parent57573e54afb9f7ed957eec43dfd2830f2384c970 (diff)
downloadbinutils-66f76c545b293f8b89fef0f996a3a48fa59fae61.zip
binutils-66f76c545b293f8b89fef0f996a3a48fa59fae61.tar.gz
binutils-66f76c545b293f8b89fef0f996a3a48fa59fae61.tar.bz2
gprofng: 30089 [display text] Invalid number of threads
The real problem is that libcollector doesn't interpose thread_create@GLIBC_2.34 We interpose a lot of libC functions (dlopen, fork, pthread_create, etc.). Some of these functions have versions. For example, dlopen@GLIBC_2.34, dlopen@GLIBC_2.17, dlopen@GLIBC_2.2.5, etc. We have to interpose each of the functions because we don't know which version of libC will be used during profiling. Historically, we have used three versions of scripts (mapfile.aarch64-Linux, mapfile.amd64-Linux, mapfile.intel-Linux). Three are not needed. One is enough The fixes below include: - merged all version symbols into one version script. - added new version symbols which are defined in latest versions of libC. - removed unused defines and duplicated code. - added the DCL_FUNC_VER macro to define the version symbols. Tested on x86_64 and aarch64 (OL8/OL9). No regression. gprofng/ChangeLog 2023-03-23 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/30089 * libcollector/Makefile.am: Use libgprofng.ver instead of mapfile.* * libcollector/configure.ac: Delete GPROFNG_VARIANT. * src/collector_module.h: Move the SYMVER_ATTRIBUTE macro to collector.h * libcollector/collector.h: Add macros (SYMVER_ATTRIBUTE, DCL_FUNC_VER). Remove unused defines. * libcollector/dispatcher.c: Interpose functions from libC. Clean up the old code. * libcollector/iotrace.c: Likewise. * libcollector/libcol_util.c: Likewise. * libcollector/linetrace.c: Likewise. * libcollector/mmaptrace.c: Likewise. * libcollector/synctrace.c: Likewise. * libcollector/libgprofng.ver: New file. * libcollector/Makefile.in: Rebuild. * libcollector/configure: Rebuild. * libcollector/mapfile.aarch64-Linux: Removed. * libcollector/mapfile.amd64-Linux: Removed. * libcollector/mapfile.intel-Linux: Removed. * libcollector/mapfile.sparc-Linux: Removed. * libcollector/mapfile.sparcv9-Linux: Removed.
Diffstat (limited to 'gprofng/src')
-rw-r--r--gprofng/src/collector_module.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
index 81f5077..07bf362 100644
--- a/gprofng/src/collector_module.h
+++ b/gprofng/src/collector_module.h
@@ -222,15 +222,4 @@ extern "C"
}
#endif
-#ifdef __has_attribute
-# if __has_attribute (__symver__)
-# define SYMVER_ATTRIBUTE(sym, symver) \
- __attribute__ ((__symver__ (#symver)))
-# endif
-#endif
-#ifndef SYMVER_ATTRIBUTE
-# define SYMVER_ATTRIBUTE(sym, symver) \
- __asm__(".symver " #sym "," #symver);
-#endif
-
#endif /* _COLLECTOR_MODULE_H */