aboutsummaryrefslogtreecommitdiff
path: root/gprofng/libcollector/configure.ac
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/libcollector/configure.ac
parent57573e54afb9f7ed957eec43dfd2830f2384c970 (diff)
downloadfsf-binutils-gdb-66f76c545b293f8b89fef0f996a3a48fa59fae61.zip
fsf-binutils-gdb-66f76c545b293f8b89fef0f996a3a48fa59fae61.tar.gz
fsf-binutils-gdb-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/libcollector/configure.ac')
-rw-r--r--gprofng/libcollector/configure.ac17
1 files changed, 0 insertions, 17 deletions
diff --git a/gprofng/libcollector/configure.ac b/gprofng/libcollector/configure.ac
index 495963c..7af9581 100644
--- a/gprofng/libcollector/configure.ac
+++ b/gprofng/libcollector/configure.ac
@@ -41,23 +41,6 @@ if test "$enable_shared" != "yes"; then
AC_MSG_WARN([Cannot set --enable-shared for gprofng/libcollector. Profiling will be unavailable.])
fi
-GPROFNG_VARIANT=unknown
-x=`echo | $CC $CFLAGS -dM -E - | grep -w __x86_64`
-if test -n "$x"; then
- GPROFNG_VARIANT=amd64-Linux
-else
- x=`echo | $CC $CFLAGS -dM -E - | grep -w __i386__`
- if test -n "$x"; then
- GPROFNG_VARIANT=intel-Linux
- else
- x=`echo | $CC $CFLAGS -dM -E - | grep -w __aarch64__`
- if test -n "$x"; then
- GPROFNG_VARIANT=aarch64-Linux
- fi
- fi
-fi
-AC_SUBST(GPROFNG_VARIANT)
-
ACX_PROG_CC_WARNING_OPTS([-Wno-nonnull-compare], [GPROFNG_NO_NONNULL_COMPARE_CFLAGS])
AC_SUBST(GPROFNG_NO_NONNULL_COMPARE_CFLAGS)