Commit Graph

56 Commits

Author SHA1 Message Date
Vladimir Mezentsev
5a4020d4d4 gprofng: remove unused gprofng/src/DbeSession.cc.1 2022-11-28 20:52:10 -08:00
Vladimir Mezentsev
ab11c8905f PR29788, gprofng cannot display Java's generated assembly code
gprofng/ChangeLog
2022-11-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29788
	* src/Experiment.h: Declare dyntext_name.
	* src/Experiment.cc: Use dyntext_name to initialize img_fname.
2022-11-16 08:54:19 -08:00
Vladimir Mezentsev
1c343a13ba gprofng: fix typo in configure.ac
gprofng/ChangeLog
2022-11-10  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* configure.ac: Fix typo in redirect operator.
	* configure: Rebuild.
2022-11-10 17:25:07 -08:00
Vladimir Mezentsev
3f2ef5ba42 gprofng: no need to build version.texi
gprofng/ChangeLog
2022-10-10  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29465
	PR gprofng/29667
	* doc/Makefile.am: No need to build version.texi.
	* doc/Makefile.in: Rebuild.
2022-10-11 00:14:06 -07:00
Vladimir Mezentsev
7b68800441 gprofng: use the --libdir path to find libraries
gprofng/ChangeLog
2022-10-10  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29663
	* src/Makefile.am: Add -DLIBDIR to CPPFLAGS.
	* src/Makefile.in: Rebuild.
	* src/envsets.cc (putenv_libcollector_ld_misc): Use LIBDIR to find
	the gprofng libraries.
2022-10-11 00:14:06 -07:00
Vladimir Mezentsev
a665c4d5c6 gprofng: run tests without installation
gprofng/ChangeLog
2022-10-10  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29107
	* testsuite/config/default.exp: Set up environment to run gprofng tests
	without installation.
	* testsuite/lib/Makefile.skel: Likewise.
	* testsuite/lib/display-lib.exp: Likewise.
2022-10-11 00:14:06 -07: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
0d94a87350 gprofng: fix cppcheck warnings
gprofng/ChangeLog
2022-09-29  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* common/hwcdrv.c: Fix cppcheck warning.
	* src/ABS.h: Likewise.
	* src/CompCom.cc: Likewise.
2022-09-29 22:00:02 -07:00
Vladimir Mezentsev
90eca71113 gprofng: fix -Wduplicated-cond warning
gprofng/ChangeLog
2022-09-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* src/collctrl.cc: Fix -Wduplicated-cond warning.
2022-09-21 19:00:00 -07:00
Vladimir Mezentsev
e1d23dca8a gprofng: build documentation only if BUILD_MAN is true
gprofng/ChangeLog
2022-09-16  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29476
	* gprofng/Makefile.am: Build documentation only if BUILD_MAN is true
	* gprofng/Makefile.in: Rebuild.
	* gprofng/configure: Rebuild.
2022-09-19 11:34:06 -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
Ruud van der Pas
4d44946794 gprofng: fix bug 29410 - Argument "&nbsp;0." isn't numeric in numeric gt (>)
gprofng/Changelog:
2022-08-02  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	PR gprofng/29410
	* gp-display-html/gp-display-html.in: Remove non-breaking spaces.
2022-08-03 10:10:35 -07:00
Vladimir Mezentsev
9c6dd6885b gprofng: check for the makeinfo version
gprofng/ChangeLog
2022-07-25  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29368
	* configure.ac: Check for the makeinfo version.
	* configure: Rebuild.
2022-07-26 16:27:27 -07:00
Ruud van der Pas
91a5dd8e4a gprofng: fix bug 29356 - Execution fails if gprofng is not included in PATH
gprofng/Changelog:
2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	PR gprofng/29356
	* gp-display-html/gp-display-html.in: fixed a problem to execute
	gp-display-text in case gprofng is not included in the search
	path.
2022-07-25 15:05:50 -07:00
Ruud van der Pas
c69c2b6033 gprofng: fix bug 29392 - Unexpected line format in summary file
gprofng/Changelog:
2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	PR gprofng/29392
	* gp-display-html/gp-display-html.in: modified a regex, plus the
	code to handle the results; renamed a variable to improve the
	consistency in naming.
2022-07-25 15:05:50 -07:00
Ruud van der Pas
408520bcaa gprofng: fix bug 29353 - Fix a lay-out issue in the html disassembly files
gprofng/Changelog:
2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	PR gprofng/29353
	* gp-display-html/gp-display-html.in: fixed a problem in the
	generation of html for the disassembly where instructions
	without arguments were not handled correctly.
2022-07-25 15:05:50 -07:00
Ruud van der Pas
2e2a82421a gprofng: fix bug 29352 - Fix the message Hexadecimal number > 0xffffffff non-portable
gprofng/Changelog:
2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	PR gprofng/29352
	* gp-display-html/gp-display-html.in: the hex subroutine from
	the bigint module is now used.
2022-07-25 15:05:49 -07:00
Ruud van der Pas
872ae1027e gprofng: fix bug 29351 - Move dynamic loading of modules to a later stage
gprofng/Changelog:
2022-07-22  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	PR gprofng/29351
	* gp-display-html/gp-display-html.in: the dynamic loading of
	modules occurred too early, resulting in the generation of the
	man page to fail in case a module is missing; the loading part is
	now done somewhat later in the execution to avoid this problem.
2022-07-25 15:05:49 -07:00
Vladimir Mezentsev
b8283575ae gprofng: link libgprofng.so against -lpthread
gprofng/ChangeLog
2022-07-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29364
	* src/Makefile.am (libgprofng_la_LIBADD): Add -lpthread.
	* src/Makefile.in: Rebuild.
2022-07-18 10:42:02 -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
5236c98902 gprofng: fix regression in testing for not yet installed version
gprofng/ChangeLog
2022-07-07  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* src/Settings.cc (Settings::read_rc): Read environment variable
	GPROFNG_SYSCONFDIR.
	* testsuite/lib/Makefile.skel: Export GPROFNG_SYSCONFDIR.
	* testsuite/gprofng.display/display.exp: Shorten the list of tests.
2022-07-07 13:20:39 -07: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
Ruud van der Pas
41bbac64c3 gprofng: implement a functional gp-display-html
This patch enables the first support for the "gprofng display html" command.
This command works for C/C++ applications on x86_64. Using one or more gprofng
experiment directories as input, a new directory with html files is created.
Through the index.html file in this directory, the performance results may be
viewed in a browser.

gprofng/Changelog:
2022-06-28  Ruud van der Pas  <ruud.vanderpas@oracle.com>

	* gp-display-html/gp-display-html.in: implement first support for x86_64 and C/C++
2022-07-06 14:39:33 -07:00
Vladimir Mezentsev
9d92d2cc8d gprofng: fix build when BUILD_MAN is false
gprofng/ChangeLog
2022-06-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29131
	* gp-display-html/Makefile.am: Set man_MANS only when BUILD_MAN is true.
	* src/Makefile.am: Likewise.
	* gp-display-html/Makefile.in: Rebuild.
	* src/Makefile.in: Rebuild.
2022-06-28 21:36:26 -07:00
Vladimir Mezentsev
6284f0aa11 gprofng: use $(sysconfdir) instead $(prefix)/etc
gprofng/ChangeLog
2022-06-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29191
	* src/Makefile.am: Use $(sysconfdir) instead $(prefix)/etc.
	* src/Settings.cc: Likewise.
	* src/Makefile.in: Rebuild.
2022-06-28 21:36:26 -07:00
Vladimir Mezentsev
14e283ff4e gprofng: fix build with -Werror=format-truncation
gprofng/ChangeLog
2022-06-16  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* configure.ac: Remove -Wno-format-truncation.
	* src/Makefile.am: Likewise.
	* configure: Rebuild.
	* src/Makefile.in: Rebuild.
	* common/hwctable.c: Fix -Werror=format-truncation errors.
	* src/ipc.cc: Likewise.
	* src/parse.cc: Likewise.
2022-06-16 20:44:24 -07:00
Vladimir Mezentsev
a675e77e55 gprofng docs: provide help for <rate> == <interval>
The help message from 'gprofng collect app -h', in
the section on <rate> == <interval>, had a dangling
reference to a non-existent manpage. Provide basic
info, including reasons for caution.
2022-06-14 14:16:24 -07:00
Vladimir Mezentsev
08328cfbaf gprofng docs: mention HTML / PDF in the gprofng README
The HTML and PDF formats are described in the gprofng tutorial (info
topic "Other Document Formats"). In addition, describe them in the
README because: they are important; they are easily searchable; and the
README is primarily oriented to the person who is installing gprofng,
who may differ from the person who follows a user tutorial.
2022-06-14 14:02:19 -07:00
Vladimir Mezentsev
8e2de6c81a gprofng: fix build with -Werror=format-security
gprofng/ChangeLog
2022-06-13  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/28968
	* src/src/Hist_data.cc (print_row): Make param const.
	* src/src/Hist_data.h (print_row): Likewise.
	* src/src/Print.h: Remove unused functions and variables.
	* src/Print.cc: Fix -Werror=format-security errors.
	* src/parse.cc: Likewise.
2022-06-14 11:05:41 -07:00
Vladimir Mezentsev
6094a48ec8 gprofng: fix build with -mx32
gprofng/ChangeLog
2022-05-27  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/28983
	PR gprofng/29143
	* src/Experiment.cc (write_header): Fix argument for ctime.
	Fix -Wformat= warnings.
	* src/Dbe.cc: Likewise.
	* src/DwarfLib.h: Fix [-Wsign-compare] warnings.
	* src/Experiment.h: Likewise.
	* src/ipc.cc: Fix -Wformat= warnings.
2022-05-27 19:56:25 -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
83bec4829b gprofng: include percentages in default metrics list
gprofng/ChangeLog
2022-05-09  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* src/gprofng.rc: Include percentages in default metrics list.
2022-05-09 22:42:09 -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
835e063d3a gprofng: assertion in gprofng/src/Expression.cc:139
gprofng/ChangeLog
2022-04-28  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29102
	* src/Expression.h: Remove fixupValues.
	* src/Expression.cc (Expression::copy): Fix a bug.
2022-04-29 14:03:12 -07:00
Vladimir Mezentsev
0e12331a9b gprofng: test suite problems
gprofng/ChangeLog
2022-04-27  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29065
	* testsuite/lib/Makefile.skel: Search parent dir for libs too.
2022-04-27 20:31:47 -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
c10622fef4 gprofng: zlib handling
gprofng/ChangeLog
2022-04-06  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* configure.ac: Add AM_ZLIB.
	* src/Makefile.am: Add $(ZLIBINC) and $(ZLIB).
	* gprofng/src/DbeSession.h: Likewise.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* gp-display-html/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
2022-04-08 09:05:37 -07:00
Nick Alcock
caf606c90d libtool.m4: fix the NM="/nm/over/here -B/option/with/path" case
My previous nm patch handled all cases but one -- if the user set NM in
the environment to a path which contained an option, libtool's nm
detection tries to run nm against a copy of nm with the options in it:
e.g. if NM was set to "nm --blargle", and nm was found in /usr/bin, the
test would try to run "/usr/bin/nm --blargle /usr/bin/nm --blargle".
This is unlikely to be desirable: in this case we should run
"/usr/bin/nm --blargle /usr/bin/nm".

Furthermore, as part of this nm has to detect when the passed-in $NM
contains a path, and in that case avoid doing a path search itself.
This too was thrown off if an option contained something that looked
like a path, e.g. NM="nm -B../prev-gcc"; libtool then tries to run
"nm -B../prev-gcc nm" which rarely works well (and indeed it looks
to see whether that nm exists, finds it doesn't, and wrongly concludes
that nm -p or whatever does not work).

Fix all of these by clipping all options (defined as everything
including and after the first " -") before deciding whether nm
contains a path (but not using the clipped value for anything else),
and then removing all options from the path-modified nm before
looking to see whether that nm existed.

NM=my-nm now does a path search and runs e.g.
  /usr/bin/my-nm -B /usr/bin/my-nm

NM=/usr/bin/my-nm now avoids a path search and runs e.g.
  /usr/bin/my-nm -B /usr/bin/my-nm

NM="my-nm -p../wombat" now does a path search and runs e.g.
  /usr/bin/my-nm -p../wombat -B /usr/bin/my-nm

NM="../prev-binutils/new-nm -B../prev-gcc" now avoids a path search:
  ../prev-binutils/my-nm -B../prev-gcc -B ../prev-binutils/my-nm

This seems to be all combinations, including those used by GCC bootstrap
(which, before this commit, fails to bootstrap when configured
--with-build-config=bootstrap-lto, because the lto plugin is now using
--export-symbols-regex, which requires libtool to find a working nm,
while also using -B../prev-gcc to point at the lto plugin associated
with the GCC just built.)

Regenerate all affected configure scripts.

	* libtool.m4 (LT_PATH_NM): Handle user-specified NM with
	options, including options containing paths.
2022-03-25 12:02:35 +00: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
H.J. Lu
cac97c41c2 gprofng: Skip jsynprog with a broken javac
On CET enabled Linux/x86-64 machines, one can get

$ javac simple.java
Error: dl failure on line 894
Error: failed /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-6.fc35.x86_64/jre/lib/amd64/server/libjvm.so, because /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-6.fc35.x86_64/jre/lib/amd64/server/libjvm.so: rebuild shared object with SHSTK support enabled

Set GPROFNG_BROKEN_JAVAC to "yes" only with a broken javac and skip the
jsynprog test with a broken javac.

	PR gprofng/28965
	* Makefile.am (GPROFNG_BROKEN_JAVAC): New.
	(check-DEJAGNU): Pass GPROFNG_BROKEN_JAVAC to runtest.
	* configure.ac (GPROFNG_BROKEN_JAVAC): New AC_SUBST.  Set to yes
	with a broken javac.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* testsuite/gprofng.display/display.exp: Skip jsynprog with a
	broken javac.
2022-03-17 10:28:58 -07: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
61a1f2e711 gprofng: Don't hardcode -Wno-format-truncation/-Wno-switch
Use -Wno-format-truncation and -Wno-switch only if they are supported.

	PR gprof/28969
	* configure.ac (GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS): New
	AC_SUBST for -Wno-format-truncation.
	(GPROFNG_NO_SWITCH_CFLAGS): New AC_SUBST for -Wno-switch.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* src/Makefile.am (AM_CFLAGS): Replace -Wno-format-truncation
	and -Wno-switch with GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS and
	GPROFNG_NO_SWITCH_CFLAGS.
	* src/Makefile.in: Regenerate.
2022-03-16 06:43:24 -07:00