aboutsummaryrefslogtreecommitdiff
path: root/gprofng/libcollector
AgeCommit message (Collapse)AuthorFilesLines
2024-09-18Fix 32096 UBSAN issues in gprofngVladimir Mezentsev1-2/+2
Fixed UBSAN runtime errors such as: - member call on address which does not point to an object of type 'Vector' - load of misaligned address 0x623e5a670173 for type 'int', which requires 4 byte alignment gprofng/ChangeLog 2024-09-17 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>. PR gprofng/32096 * libcollector/unwind.c: Fix UBSAN runtime errors. * src/CallStack.cc (add_stack_java, add_stack_java_epilogue): Change argument type to Vector<Histable*>*. * src/Experiment.cc (update_ts_in_maps): Change variable type. * src/Experiment.h: Change field type to Vector<Histable*>*.
2024-09-04Fix 32097 Warnings when building gprofng with ClangVladimir Mezentsev8-57/+54
gprofng/ChangeLog 2024-09-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>. PR gprofng/32097 * common/hwcdrv.c: Fix -Wempty-body warnings. * common/hwcentry.h: Fix -Wdeprecated-non-prototype warnings. * common/hwctable.c: Fix -Wdeprecated-non-prototype warnings. * libcollector/collector.c: Likewise. * libcollector/collector.h: Likewise. * libcollector/collectorAPI.c: Likewise. * libcollector/dispatcher.c: Likewise. * libcollector/iotrace.c: Likewise. * libcollector/libcol_util.c: Fix -Wunused-but-set-variable warnings. * libcollector/libcol_util.h: Remove unused declarations. * libcollector/linetrace.c: Fix -Wdeprecated-non-prototype warnings. * src/BaseMetricTreeNode.h: Fix -Wunused-private-field warnings. * src/Dbe.cc: Fix -Wself-assign warnings. * src/DbeSession.cc: Fix -Wunused-but-set-variable warnings. * src/Disasm.cc: Fix -Wunused-const-variable warnings. * src/Experiment.cc: Fix -Wunused-private-field warnings. * src/HashMap.h: Fix -Wself-assign warnings. * src/IOActivity.h: Fix -Wunused-private-field warnings. * src/collctrl.cc: Fix -Wself-assign, -Wparentheses-equality warnings. * src/collctrl.h: Fix -Wunused-private-field warnings. * src/collector_module.h: Fix -Wdeprecated-non-prototype warnings. * src/gp-display-src.cc: Fix -Wunused-private-field warnings. * src/gp-print.h: Fix -Wheader-guard warnings. * src/hwc_intel_icelake.h: Fix -Winitializer-overrides warnings. * src/util.cc: Fix -Wunused-but-set-variable warnings.
2024-08-12gprofng: specify the heap data collection rangeVladimir Mezentsev1-0/+42
Extend the -H option: -H {off|on|N1[-N2]} disable , or enable heap tracing, or specify the heap data collection range. The default is "-H off". gprofng/ChangeLog 2024-08-08 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * libcollector/heaptrace.c: Read the range in the -H option. Do not collect data if the allocated memory is out of range. * src/collctrl.h (heaptrace_mode): Define as char * value. * src/envsets.cc: Updated since heaptrace_mode is changed. * src/collctrl.cc: Accept the extended -H option. * src/gp-collect-app.cc: Accept the extended -H option. Remove unused code.
2024-07-30gprofng: 32018 Compilation of binutils 2.43 failed on CentOS 6Vladimir Mezentsev1-2/+2
strchr is redefined as a macro in /usr/include/bits/string.h on CentOS 6/7. In this case, we may not use our CALL_UTIL macro for strchr. Use __collector_strchr instead of "CALL_UTIL (strchr)". gprofng/ChangeLog 2024-07-28 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR 32018 * libcollector/hwprofile.c (open_experiment): Use __collector_strchr.
2024-07-20Change version to 2.43.50Nick Clifton1-10/+10
2024-07-10RISC-V:[gprofng] Minimal support gprofng for riscv.Yixuan Chen4-1/+31
ChangeLog: Add target riscv to --enable-gprofng. 2024-07-04 Yixuan Chen <chenyixuan@iscas.ac.cn> * configure: Add riscv. * configure.ac: Add riscv. gprofng/ChangeLog: Minimal support gprofng for riscv. 2024-07-04 Yixuan Chen <chenyixuan@iscas.ac.cn> * gprofng/common/core_pcbe.c (core_pcbe_init): Add RISC-V vendor conditon. (defined): Add riscv. * gprofng/common/cpuid.c (defined): Add risc-v hwprobe. * gprofng/common/gp-defs.h (TOK_A_RISCV): Add riscv. (defined): Add riscv. (ARCH_RISCV): Add riscv. * gprofng/common/hwc_cpus.h: Add RISC-V vendor. * gprofng/common/hwcfuncs.h (HW_INTERVAL_TYPE): Remove useless defination. * gprofng/configure: Add riscv. * gprofng/configure.ac: Add riscv. * gprofng/libcollector/hwprofile.h (ARCH): Add RISC-V register. (CONTEXT_PC): Add RISC-V register. (CONTEXT_FP): Add RISC-V register. (CONTEXT_SP): Add RISC-V register. (SETFUNCTIONCONTEXT): * gprofng/libcollector/libcol_util.c (__collector_util_init): Fix libc open condition. * gprofng/libcollector/libcol_util.h (ARCH): Add RISC-V. * gprofng/libcollector/unwind.c (ARCH): Add RISC-V register. (GET_PC): Add RISC-V register. (GET_SP): Add RISC-V register. (GET_FP): Add RISC-V register. (FILL_CONTEXT): * gprofng/src/DbeSession.cc (ARCH): Add RISC-V. * gprofng/src/Disasm.cc (Disasm::disasm_open): Add RISC-V. * gprofng/src/Experiment.cc (Experiment::ExperimentHandler::startElement): Add RISC-V. * gprofng/src/checks.cc (ARCH): Add RISC-V. * gprofng/src/collctrl.cc (defined): Set risc-v cpu frequency to 1000MHz as default for now, will fix when I find a better method to get cpu frequency. (read_cpuinfo): Add "mvendorid" condition according to risc-v /proc/cpuinfo file content. * gprofng/src/dbe_types.h (enum Platform_t): Add RISC-V.
2024-06-10autoupdate: add square brackets around arguments of AC_INITMatthieu Longo1-1/+1
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#index-AC_005fINIT-2
2024-05-21gprofng: remove memset() in libcollectorVladimir Mezentsev6-50/+24
ChangeLog 2024-05-20 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * libcollector/collector.c: Use static initialization instead of memset. * libcollector/dispatcher.c: Likewise. * libcollector/hwprofile.c: Likewise. * libcollector/jprofile.c: Likewise. * libcollector/profile.c: Likewise. * libcollector/synctrace.c: Likewise.
2024-03-25gprofng: fix infinite recursion on calloc with multi-threaded applicationsVladimir Mezentsev1-98/+62
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-02-01gprofng: Remove unused macrosVladimir Mezentsev8-53/+1
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-01-15Change version to 2.42.50 and regenerate filesNick Clifton1-10/+10
2024-01-04Update year range in copyright notice of binutils filesAlan Modra33-41/+41
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.
2023-12-22gprofng: fix build problems on linux-muslVladimir Mezentsev1-0/+4
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-11-15Finalized intl-update patches (deux)Sam James2-9/+9
Doing this on behalf of Arsen as obvious. * gdb: Regenerate. * gdbserver: Regenerate. * gprofng: Regenerate.
2023-10-24gprofng: Fix -Wformat= warningsVladimir Mezentsev8-74/+134
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-08-12regen configAlan Modra1-30/+86
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-02Revert "2.41 Release sources"Sam James2-13/+16
This reverts commit 675b9d612cc59446e84e2c6d89b45500cb603a8d. See https://sourceware.org/pipermail/binutils/2023-August/128761.html.
2023-08-022.41 Release sourcesbinutils-2_41-releaseNick Clifton2-16/+13
2023-08-01gprofng: Fix build with 64bit file offset on 32bit machinesKhem Raj1-3/+6
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-07-03Change version number to 2.41.50 and regenerate filesNick Clifton1-10/+10
2023-04-17gprofng: 30360 Seg. Fault when application uses std::threadVladimir Mezentsev6-94/+136
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-03-29gprofng: Add version symbols to libgprofng.verVladimir Mezentsev2-42/+62
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-27gprofng: 30089 [display text] Invalid number of threadsVladimir Mezentsev17-2328/+1229
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-19gprofng: Use prototype to call libc functionsVladimir Mezentsev8-174/+150
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-02-17gprofng: PR30036 Build failure on aarch64 w/ glibc: symbol `pwrite64' is ↵Vladimir Mezentsev2-8/+9
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-01-01Update year range in gprofng copyright noticesAlan Modra36-36/+36
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.
2022-12-31Update version number and regenerate filesNick Clifton1-10/+10
2022-12-19gprofng: PR29646 Various warningsVladimir Mezentsev4-4/+9
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-10-04gprofng: fix build with --enable-pgo-build=ltoVladimir Mezentsev5-28/+30
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-09-14gprofng: fix build issues on muslVladimir Mezentsev15-233/+207
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-08-18gprofng: fix bug 29479 Collection fails when built without java supportVladimir Mezentsev2-0/+4
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-07-18gprofng: fix regression in build and a race condition in autoreconfVladimir Mezentsev3-6/+8
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-09Regenerate with automake-1.15.1Alan Modra3-339/+250
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-08Update version to 2.39.50 and regenerate filesNick Clifton3-260/+349
2022-07-06gprofng: adjust GPROFNG_VARIANTVladimir Mezentsev2-20/+26
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-05-26gprofng: fix build with --disable-sharedVladimir Mezentsev2-2/+3
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-26gprofng: fix build with -mx32Vladimir Mezentsev6-46/+39
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-05gprofng: use $host instead $targetVladimir Mezentsev2-2/+2
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-04-11gprofng doesn't build with gcc 5.5Vladimir Mezentsev1-7/+13
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-08gprofng: fprintf_styled_func not inizialized for disassemblerVladimir Mezentsev1-0/+9
gprofng/ChangeLog 2022-04-07 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * libcollector/unwind.c: inizialize fprintf_styled_func. * src/Disasm.cc: Likewise.
2022-03-23Only .so files are used in libcollector. Remove the other files.Vladimir Mezentsev2-2/+6
* libcollector/Makefile.am (install-data-local): Remove the *.la and *.a libraries. * libcollector/Makefile.in: Regenerate.
2022-03-21Install gprofng libraries under $(pkglibdir)Vladimir Mezentsev2-43/+54
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-18Fix Build issues due to patch "gprofng: a new GNU profiler"Nick Clifton3-71/+3
Find and fix more places where clock_gettime() and CLOCK_MONOTONIC_RAW are used.
2022-03-17gprofng configure target testsAlan Modra3-81/+132
${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-16gprofng: Use symver attribute if availableH.J. Lu5-86/+61
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-16gprofng: Don't hardcode -Wno-nonnull-compareH.J. Lu5-4/+69
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-15gprofng: Add a configure test for clock_gettime and a use of the test in ↵Nick Clifton5-11/+84
getthrtime.c
2022-03-11gprofng: a new GNU profilerVladimir Mezentsev38-0/+46214
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.