Commit Graph

40 Commits

Author SHA1 Message Date
Vladimir Mezentsev
99c3fe52d2 gprofng: fix infinite recursion on calloc with multi-threaded applications
libcollector uses pthread_getspecific() and pthread_setspecific() to access
thread local memory. libcollector uses this memory to check that
interposed functions (like malloc, calloc or free) don't have recursion.
The first time we call calloc(), we call pthread_setspecific() to create
a thread-specific value.
On Ubuntu machine, pthread_setspecific() calls calloc(), and we cannot intercept
such recursion.
gcc supports thread-local storage. For example,
  static __thread int reentrance = 0;
I rewrote code using this instead of pthread_setspecific().

gprofng/ChangeLog
2024-03-23  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/31460
	* libcollector/heaptrace.c: Use the __thread variable to check for
	* reentry. Clean up code.
2024-03-25 16:29:41 -07:00
Vladimir Mezentsev
b3c670a6ba gprofng: Remove unused macros
gprofng/ChangeLog
2024-02-01  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* common/gp-experiment.h: Remove SP_REMOTE_PROTOCOL_VERSION.
	* common/hwctable.c: Remove DBG_LT* macros.
	* libcollector/envmgmt.c: Likewise.
	* libcollector/hwprofile.c: Likewise.
	* libcollector/iolib.c: Likewise.
	* libcollector/jprofile.c: Likewise.
	* libcollector/memmgr.c: Likewise.
	* libcollector/profile.c: Likewise.
	* libcollector/tsd.c: Likewise.
	* libcollector/unwind.c: Likewise.
2024-02-01 13:22:52 -08:00
Nick Clifton
e775d3a9b7 Change version to 2.42.50 and regenerate files 2024-01-15 15:13:36 +00:00
Alan Modra
fd67aa1129 Update year range in copyright notice of binutils files
Adds two new external authors to etc/update-copyright.py to cover
bfd/ax_tls.m4, and adds gprofng to dirs handled automatically, then
updates copyright messages as follows:

1) Update cgen/utils.scm emitted copyrights.
2) Run "etc/update-copyright.py --this-year" with an extra external
   author I haven't committed, 'Kalray SA.', to cover gas testsuite
   files (which should have their copyright message removed).
3) Build with --enable-maintainer-mode --enable-cgen-maint=yes.
4) Check out */po/*.pot which we don't update frequently.
2024-01-04 22:58:12 +10:30
Vladimir Mezentsev
576d2c97d8 gprofng: fix build problems on linux-musl
ino64_t, off64_t, fpos64_t, stat64, __u64 are not defined on linux-musl.
Fixed by declaring these types for linux-musl.

2023-12-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/30779
	PR gprofng/29593
	* common/gp-defs.h: Define ino64_t, off64_t, fpos64_t for linux-musl.
	* libcollector/unwind.c: Define __u64 for linux-musl.
	* src/util.h: Define dbe_stat_t.
	* src/ClassFile.cc: Use dbe_stat_t instead of "struct stat64".
	* src/Dbe.cc: Likewise.
	* src/DbeFile.cc: Likewise.
	* src/DbeFile.h: Likewise.
	* src/DbeSession.cc: Likewise.
	* src/Experiment.cc: Likewise.
	* src/checks.cc: Likewise.
	* src/util.cc: Likewise.
2023-12-22 21:10:36 -08:00
Sam James
9e11e7460d Finalized intl-update patches (deux)
Doing this on behalf of Arsen as obvious.

* gdb: Regenerate.
* gdbserver: Regenerate.
* gprofng: Regenerate.
2023-11-15 13:47:03 +00:00
Vladimir Mezentsev
53beac2e23 gprofng: Fix -Wformat= warnings
Added format attribute to several gprofng functions.
Fixed -Wformat= warnings.

gprofng/ChangeLog
2023-10-23  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* libcollector/heaptrace.c: Fixed -Wformat= warnings.
	* libcollector/hwprofile.c: Likewise.
	* libcollector/iolib.c: Likewise.
	* libcollector/iotrace.c: Likewise.
	* libcollector/jprofile.c: Likewise.
	* libcollector/profile.c: Likewise.
	* libcollector/synctrace.c: Likewise.
	* src/ClassFile.cc: Likewise.
	* src/SourceFile.cc: Likewise.
	* libcollector/libcol_util.h: Added format attribute.
	* src/Emsg.h: Likewise.
	* src/collector_module.h: Likewise.
	* src/data_pckts.h: Define fld_sizeof.
2023-10-24 23:27:30 -07:00
Alan Modra
6a6859cbff regen config
This regenerates config files changed by the previous 44 commits.
Note that subject lines in these commits mostly match the gcc git
originating commit.
2023-08-12 10:27:57 +09:30
Sam James
b5c37946cc Revert "2.41 Release sources"
This reverts commit 675b9d612c.

See https://sourceware.org/pipermail/binutils/2023-August/128761.html.
2023-08-02 12:06:23 +01:00
Nick Clifton
675b9d612c 2.41 Release sources 2023-08-02 09:23:36 +01:00
Khem Raj
69c37f53e2 gprofng: Fix build with 64bit file offset on 32bit machines
gprofng/ChangeLog
2023-07-31  Khem Raj <raj.khem@gmail.com>

* libcollector/iotrace.c: Define open64, fgetpos64, and fsetpos64
  only when __USE_LARGEFILE64 and __USE_FILE_OFFSET64 are not
  defined.
2023-08-01 20:57:42 -07:00
Nick Clifton
87485f5349 Change version number to 2.41.50 and regenerate files 2023-07-03 11:54:06 +01:00
Vladimir Mezentsev
35fab451d9 gprofng: 30360 Seg. Fault when application uses std::thread
We interpose a lot of libC functions (dlopen, fork, pthread_create, etc.).
Some of these functions have versions. For example,

% nm -D /lib64/gprofng/libgp-collector.so  | grep thread_create@ | sort
000000000004b420 T pthread_create@GLIBC_2.34
000000000004b490 T pthread_create@GLIBC_2.17
000000000004b500 T pthread_create@GLIBC_2.2.5
000000000004b570 T pthread_create@GLIBC_2.1
000000000004b5e0 T pthread_create@GLIBC_2.0

Our library does not set the default version for symbols.
This is correct because we don't know which libC will be used.

gcc and g++ links differently the version symbols when the default version is
not set. c-linker is using our pthread_create@GLIBC_2.34 and c++-linker is using
our pthread_create@GLIBC_2.0 by default.

The current implementation of the interposed functions is:
  If we are in our pthread_create@GLIBC_<NN>,
  we use dlvsym (dlflag, "pthread_create", "GLIBC_<NN>") to find and call
  the same function from libC.
In the test from PR 30360, pthread_create@GLIBC_2.0 is not in the current libC.
We need to call the default version symbol from libC.

gprofng/ChangeLog
2023-04-16  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/30360
	* libcollector/iotrace.c: Find and call a default libC version symbol.
	* libcollector/dispatcher.c: Likewise.
	* libcollector/iotrace.c: Likewise.
	* libcollector/linetrace.c: Likewise.
	* libcollector/mmaptrace.c: Likewise.
	* libcollector/synctrace.c: Likewise.
	* libcollector/collector.h (REAL_DCL): Remove an unused argument.
2023-04-17 13:01:38 -07:00
Vladimir Mezentsev
f2f9bde5cd gprofng: Add version symbols to libgprofng.ver
gprofng/ChangeLog
2023-03-29  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/30089
	* libcollector/libgprofng.ver: Add version symbols.
	* libcollector/synctrace.c: Fix typo for pthread_mutex_lock.
2023-03-29 23:09:40 -07:00
Vladimir Mezentsev
66f76c545b 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.
2023-03-27 11:47:52 -07:00
Vladimir Mezentsev
de8e705968 gprofng: Use prototype to call libc functions
libcollector may not link against libC.
We use dlsym() to get a function from libc.
In some files, pointers to these functions do not have prototypes.
I also moved the shared definitions to libcollector/collect.h.

gprofng/ChangeLog
2023-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	libcollector/collector.c: Add prototypes.
	libcollector/dispatcher.c: Likewise.
	libcollector/heaptrace.c: Likewise.
	libcollector/iotrace.c: Likewise.
	libcollector/linetrace.c: Likewise.
	libcollector/mmaptrace.c: Likewise.
	libcollector/synctrace.c: Likewise.
	libcollector/collector.h: Add CALL_REAL(), NULL_PTR(), and DBG_LT.
2023-03-19 18:03:58 -07:00
Vladimir Mezentsev
f6f19a39ec gprofng: PR30036 Build failure on aarch64 w/ glibc: symbol `pwrite64' is already defined
gprofng/ChangeLog
2023-02-16  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/30036
	* libcollector/iotrace.c: Define creat64 and pwrite64 only when
	__USE_LARGEFILE64 and __USE_FILE_OFFSET64 are not defined.
	* libcollector/mmaptrace.c: Likewise for mmap64.
2023-02-17 14:00:54 -08:00
Alan Modra
76bdc7266a Update year range in gprofng copyright notices
This adds 'Innovative Computing Labs' as an external author to
update-copyright.py, to cover the copyright notice in
gprofng/common/opteron_pcbe.c, and uses that plus another external
author 'Oracle and' to update gprofng copyright dates.  I'm not going
to commit 'Oracle and' as an accepted author, but that covers the
string "Copyright (c) 2006, 2012, Oracle and/or its affiliates. All
rights reserved." found in gprofng/testsuite/gprofng.display/jsynprog
files.
2023-01-01 23:26:30 +10:30
Nick Clifton
96e786d198 Update version number and regenerate files 2022-12-31 12:23:00 +00:00
Vladimir Mezentsev
309b9a1abf gprofng: PR29646 Various warnings
gprofng/ChangeLog
2022-12-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29646
	* common/core_pcbe.c: Fix missingReturn warning.
	* libcollector/iolib.c: Fix -Waddress warnings.
	* src/Settings.cc: Likewise.
	* src/checks.cc: Likewise.
	* libcollector/linetrace.c: Likewise.
	* libcollector/iotrace.c: Fix va_end_missing error.
	* libcollector/libcol_util.c: Fix uninitvar warning.
	* src/Command.cc: Fix arrayIndexOutOfBounds error.
	* src/Function.cc: Fix uninitStructMember warning.
	* src/ipc.cc: Fix -Wwrite-strings warnings.
2022-12-19 17:02:29 -08:00
Vladimir Mezentsev
9c48ba47b3 gprofng: fix build with --enable-pgo-build=lto
gprofng/ChangeLog
2022-10-04  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29579
	* libcollector/dispatcher.c: Fix the symbol version in SYMVER_ATTRIBUTE.
	* libcollector/iotrace.c: Likewise.
	* libcollector/linetrace.c: Likewise.
	* libcollector/mmaptrace.c: Likewise.
	* libcollector/synctrace.c: Likewise.
2022-10-04 19:59:49 -07:00
Vladimir Mezentsev
fe39ffdc20 gprofng: fix build issues on musl
gprofng/ChangeLog
2022-09-14  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29477
	* configure.ac: Set __MUSL_LIBC.
	* configure: Rebuild.
	* common/config.h.in: Rebuild.
	* src/collector_module.h: Fix compiler errors because mmap64, open64,
	pwrite64 are macros and getcontext() is absent on musl.
	* libcollector/collector.c: Likewise.
	* libcollector/hwprofile.c: Likewise.
	* libcollector/iolib.c: Likewise.
	* libcollector/libcol_util.c: Likewise.
	* libcollector/linetrace.c: Likewise.
	* libcollector/memmgr.c: Likewise.
	* libcollector/profile.c: Likewise.
	* libcollector/unwind.c: Likewise.
	* libcollector/dispatcher.c: Likewise.
	* src/Experiment.cc: Likewise.
	* libcollector/collector.h: Use dlsym() because dlvsym() is not defined
	on musl.
	* libcollector/iotrace.c: Remove interposition of versioned functions.
	* libcollector/mmaptrace.c: Likewise.
	* libcollector/libcol_util.h: Fix -Wint-to-pointer-cast warnings.
	* libcollector/jprofile.c: Likewise.
	* libcollector/synctrace.c: Include "collector.h".
	* src/Print.cc: Use get_basename() because basename() is not defined
	on musl.
	* common/hwcdrv.c: Fix -Wformat= warnings.
2022-09-14 18:38:09 -07:00
Vladimir Mezentsev
49ddd814ac gprofng: fix bug 29479 Collection fails when built without java support
gprofng/ChangeLog
2022-08-17  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29479
	* libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for
	java specific code.
	* libcollector/unwind.c: Likewise.
2022-08-18 11:15:56 -07:00
Vladimir Mezentsev
e4d04cb306 gprofng: fix regression in build and a race condition in autoreconf
gprofng/ChangeLog
2022-07-14  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29338
	* libcollector/configure.ac (AC_CONFIG_HEADERS): Fix a race condition.
	* libcollector/configure: Rebuild.
	* libcollector/Makefile.in: Rebuild.
	* common/config.h.in: Rebuild.
	* common/lib-config.h.in: Created by autoreconf.
2022-07-18 10:41:10 -07:00
Alan Modra
b95830931f Regenerate with automake-1.15.1
Until we update the recommended versions of autoconf/automake, files
should be regenerated with automake-1.15.1 and autoconf-2.69.  That's
not because we think those versions are golden, and newer versions are
bad.  It's simply because maintainers want to be able to update
configury files without trouble, and if someone regenerates files with
automake-1.16.5 then --enable-maintainer-mode builds will hit errors:

checking that generated files are newer than configure... configure.ac:26: error: version mismatch.  This is Automake 1.15.1,
configure.ac:26: but the definition used by this AM_INIT_AUTOMAKE
configure.ac:26: comes from Automake 1.16.5.  You should recreate
configure.ac:26: aclocal.m4 with aclocal and run automake again.
WARNING: 'automake-1.15' is probably too old.

Correcting this requires regenerating the files by hand.
2022-07-09 20:10:47 +09:30
Nick Clifton
631ec08cb1 Update version to 2.39.50 and regenerate files 2022-07-08 11:19:44 +01:00
Vladimir Mezentsev
1bb1f55d64 gprofng: adjust GPROFNG_VARIANT
GPROFNG_VARIANT depends on compiler options, not on $(host).

gprofng/ChangeLog
2022-07-06  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29116
	* libcollector/configure.ac: Adjust GPROFNG_VARIANT.
	* libcollector/configure: Rebuild.
2022-07-06 22:36:44 -07:00
Vladimir Mezentsev
aa9b5dbc0f gprofng: fix build with --disable-shared
gprofng/ChangeLog
2022-05-26  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* libcollector/configure.ac: Use AC_MSG_WARN instead of AC_MSG_ERROR
	* libcollector/configure: Rebuild.
2022-05-26 23:51:37 -07:00
Vladimir Mezentsev
2a2cb7cf2c gprofng: fix build with -mx32
gprofng/ChangeLog
2022-05-26  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/28983
	* libcollector/libcol_util.h (__collector_getsp, __collector_getfp,
	__collector_getpc): Adapt for build with -mx32
	* libcollector/heaptrace.c: Fix -Wpointer-to-int-cast warnings.
	* libcollector/hwprofile.h: Likewise.
	* libcollector/mmaptrace.c: Likewise.
	* libcollector/synctrace.c: Likewise.
	* libcollector/unwind.c: Likewise.
2022-05-26 23:27:50 -07:00
Vladimir Mezentsev
1653ae5b84 gprofng: use $host instead $target
By mistake, $target was used instead of $host to configure the gprogng build.

gprofng/ChangeLog
2022-04-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29113
	PR gprofng/29116
	* configure.ac: Use $host instead $target.
	* libcollector/configure.ac: Likewise.
	* configure: Rebuild.
	* libcollector/configure: Rebuild.
2022-05-05 10:12:12 -07:00
Vladimir Mezentsev
50192212a7 gprofng doesn't build with gcc 5.5
gprofng/ChangeLog
2022-04-07  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29026
	* configure.ac: Check version of bison.
	* src/Makefile.am (QLParser.yy): Run bison
	* src/QLParser.yy: Adapted for bison 3.04 or later.
	* src/DbeSession.cc: make some params const.
	* src/DbeSession.h: Likewise.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/QLParser.tab.cc: Deleted.
	* src/QLParser.tab.hh: Deleted.
	* doc/Makefile.in: Regenerate.
	* gp-display-html/Makefile.in: Regenerate.
	* libcollector/configure: Regenerate.
2022-04-11 18:07:26 -07:00
Vladimir Mezentsev
9f184a64f5 gprofng: fprintf_styled_func not inizialized for disassembler
gprofng/ChangeLog
2022-04-07  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* libcollector/unwind.c: inizialize fprintf_styled_func.
	* src/Disasm.cc: Likewise.
2022-04-08 09:05:37 -07:00
Vladimir Mezentsev
b8466ab5e5 Only .so files are used in libcollector. Remove the other files.
* libcollector/Makefile.am (install-data-local): Remove the *.la
	and *.a libraries.
	* libcollector/Makefile.in: Regenerate.
2022-03-23 16:00:10 +10:30
Vladimir Mezentsev
6c924cf21c Install gprofng libraries under $(pkglibdir)
gprofng/ChangeLog
2022-03-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

        PR gprofng/28972
	* gprofng/libcollector/Makefile.am: Rename lib_LTLIBRARIES to
	pkglib_LTLIBRARIES. Add install-data-local.
	* gprofng/src/Makefile.am: Likewise.
	* gprofng/src/envsets.cc (putenv_libcollector_ld_misc): New location of
	the gprofng libraries.
	* gprofng/configure.ac: Removed an unused GPROFNG_LIBDIR.
	* gprofng/Makefile.am: Removed an unused GPROFNG_LIBDIR.  Add
	install-data-local.
	* gprofng/configure: Regenerate.
	* gprofng/Makefile.in: Likewise.
	* gprofng/doc/Makefile.in: Likewise.
	* gprofng/gp-display-htmllibcollector/Makefile.in: Likewise.
	* gprofng/libcollector/Makefile.in: Likewise.
	* gprofng/src/Makefile.in: Likewise.
2022-03-21 19:40:35 -07:00
Nick Clifton
0a30596cfa Fix Build issues due to patch "gprofng: a new GNU profiler"
Find and fix more places where clock_gettime() and CLOCK_MONOTONIC_RAW are used.
2022-03-18 15:46:33 +00:00
Alan Modra
6109e902f1 gprofng configure target tests
${target} in configure.ac should be the canonical target, so that for
example, someone configuring with --target=x86_64-linux will match
x86_64-*-linux*.

	* configure.ac: Invoke AC_CANONICAL_TARGET.
	* libcollector/configure.ac: Likewise.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* gp-display-html/Makefile.in: Regenerate.
	* libcollector/Makefile.in: Regenerate.
	* libcollector/configure: Regenerate.
	* src/Makefile.in: Regenerate.
2022-03-17 21:32:44 +10:30
H.J. Lu
f4be26838d gprofng: Use symver attribute if available
Use symver attribute if available, instead of asm statement, to support
LTO build.

	PR gprof/28962
	* libcollector/dispatcher.c (timer_create@@GLIBC_2.3.3): Use
	SYMVER_ATTRIBUTE.
	(timer_create@GLIBC_2.2): Likewise.
	(timer_create@GLIBC_2.2.5): Likewise.
	(pthread_create@@GLIBC_2.1): Likewise.
	(pthread_create@GLIBC_2.0): Likewise.
	* libcollector/iotrace.c (open64@@GLIBC_2.2): Likewise.
	(open64@GLIBC_2.1): Likewise.
	(fopen@@GLIBC_2.1): Likewise.
	(fopen@GLIBC_2.0): Likewise.
	(fclose@@GLIBC_2.1): Likewise.
	(fclose@GLIBC_2.0): Likewise.
	(fdopen@@GLIBC_2.1): Likewise.
	(fdopen@GLIBC_2.0): Likewise.
	(pread@@GLIBC_2.2): Likewise.
	(pread@GLIBC_2.1): Likewise.
	(pwrite@@GLIBC_2.2): Likewise.
	(pwrite@GLIBC_2.1): Likewise.
	(pwrite64@@GLIBC_2.2): Likewise.
	(pwrite64@GLIBC_2.1): Likewise.
	(fgetpos@@GLIBC_2.2): Likewise.
	(fgetpos@GLIBC_2.0): Likewise.
	(fgetpos64@@GLIBC_2.2): Likewise.
	(fgetpos64@GLIBC_2.1): Likewise.
	(fsetpos@@GLIBC_2.2): Likewise.
	(fsetpos@GLIBC_2.0): Likewise.
	(fsetpos64@@GLIBC_2.2): Likewise.
	(fsetpos64@GLIBC_2.1): Likewise.
	* libcollector/linetrace.c (posix_spawn@@GLIBC_2.15): Likewise.
	(posix_spawn@GLIBC_2.2): Likewise.
	(posix_spawn@GLIBC_2.2.5): Likewise.
	(posix_spawnp@@GLIBC_2.15): Likewise.
	(posix_spawnp@GLIBC_2.2): Likewise.
	(posix_spawnp@GLIBC_2.2.5): Likewise.
	(popen@@GLIBC_2.1): Likewise.
	(popen@GLIBC_2.0): Likewise.
	(_popen@@GLIBC_2.1): Likewise.
	(_popen@GLIBC_2.0): Likewise.
	* libcollector/mmaptrace.c (dlopen@@GLIBC_2.1): Likewise.
	(dlopen@GLIBC_2.0): Likewise.
	* libcollector/synctrace.c (pthread_cond_wait@@GLIBC_2.3.2):
	Likewise.
	(pthread_cond_wait@GLIBC_2.0): Likewise.
	(pthread_cond_wait@GLIBC_2.2.5): Likewise.
	(pthread_cond_wait@GLIBC_2.2): Likewise.
	(pthread_cond_timedwait@@GLIBC_2.3.2): Likewise.
	(pthread_cond_timedwait@GLIBC_2.0): Likewise.
	(pthread_cond_timedwait@GLIBC_2.2.5): Likewise.
	(pthread_cond_timedwait@GLIBC_2.2): Likewise.
	(sem_wait@@GLIBC_2.1): Likewise.
	(sem_wait@GLIBC_2.0): Likewise.
	* src/collector_module.h (SYMVER_ATTRIBUTE): New.
2022-03-16 06:45:06 -07:00
H.J. Lu
a8b34706ef gprofng: Don't hardcode -Wno-nonnull-compare
Use -Wno-nonnull-compare only if it is supported.

	PR gprof/28969
	* libcollector/Makefile.am (AM_CFLAGS): Replace
	-Wno-nonnull-compare with GPROFNG_NO_NONNULL_COMPARE_CFLAGS.
	* libcollector/configure.ac (GPROFNG_NO_NONNULL_COMPARE_CFLAGS):
	New AC_SUBST for -Wno-nonnull-compare.
	* libcollector/Makefile.in: Regenerate.
	* libcollector/aclocal.m4: Likewise.
	* libcollector/configure: Likewise.
2022-03-16 06:43:24 -07:00
Nick Clifton
4ec39c4bca gprofng: Add a configure test for clock_gettime and a use of the test in getthrtime.c 2022-03-15 15:21:56 +00:00
Vladimir Mezentsev
bb368aad29 gprofng: a new GNU profiler
top-level
	* Makefile.def: Add gprofng module.
	* configure.ac: Add --enable-gprofng option.
	* src-release.sh: Add gprofng.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* gprofng: New directory.

binutils
	* MAINTAINERS: Add gprofng maintainer.
	* README-how-to-make-a-release: Add gprofng.

include.
	* collectorAPI.h: New file.
	* libcollector.h: New file.
	* libfcollector.h: New file.
2022-03-11 08:58:31 +00:00