aboutsummaryrefslogtreecommitdiff
path: root/gprofng/src
AgeCommit message (Collapse)AuthorFilesLines
12 daysgprofng: regenerate Makefile.inSam James1-0/+1
Needed after 90803ffdcc4d8c3d17566bf8dccadbad312f07a9. gprofng/ChangeLog * src/Makefile.in: Regenerate.
12 daysgprofng: Fix cross-compilation binary name.Zheng Junjie2-14/+10
commit d25ba4596e85da6d8af78c88b5917e14763afbe1 create symbolic link no care cross-compilation prefix. gprofng/ChangeLog 2025-02-10 Zheng Junjie <zhengjunjie@iscas.ac.cn> * src/Makefile.am: create symbolic link respect cross-compilation. * src/Makefile.in: Rebuild.
2025-01-17gprofng: fix Segmentation Fault in DbeInstr::mapPCtoLineVladimir Mezentsev1-2/+5
The bug was filed against gprofng-gui (https://savannah.gnu.org/bugs/?66560). gprofng/ChangeLog 2025-01-16 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/Hist_data.cc (DbeInstr::mapPCtoLine): Check for null pointer.
2025-01-16gprofng: don't check Elf when file is in archiveVladimir Mezentsev1-14/+0
map.xml contains a checksum for all Elf files. gprofng-archive archives a file only with the same checksum. In gprofng-display-text no additional check is required. gprofng/ChangeLog 2025-01-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/parse.cc: Don't check Elf when file is in archive.
2025-01-07Fix 32085 Source file not recognized for gcc 11.4.0-compiled codeVladimir Mezentsev2-8/+31
gprofng cannot read compressed section. In the next release we plan to use libbfd everywhere instead of our ELF reader. But in this release I use bfd_get_full_section_contents() only when bfd_is_section_compressed() returns true. gprofng/ChangeLog 2025-01-06 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/32085 * src/Elf.cc: Use bfd_get_full_section_contents to decompress a section. * src/Elf.h: Define SEC_DECOMPRESSED.
2025-01-02gprofng: remove the old archiverVladimir Mezentsev4-358/+11
The first versions of Performance Analyzer archived only function names. This is no longer used. We need a real elf-file. gprofng/ChangeLog 2025-01-01 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/LoadObject.cc: Remove LoadObject::read_archive. * src/LoadObject.h: Likewise. * src/data_pckts.h: Remove unused declarations. * src/parse.cc (process_seg_map_cmd): Don't look for the old archive.
2025-01-01Regen gprofng after copyright updateAlan Modra1-1/+1
2025-01-01Update year range in copyright notice of binutils filesAlan Modra196-197/+197
2024-12-10gprofng: fix sorting in Hist_data::sortVladimir Mezentsev1-2/+1
If the '-name soname' option is used, the fake '<Total>' function is expanded with the name loadobject. gprofng/ChangeLog 2024-12-09 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/Hist_data.cc (Hist_data::sort): Fix sorting.
2024-12-10Re: gprofng: use gprofng- prefix for gprofng binariesAlan Modra2-2/+2
Commit d25ba4596e85 mangled ZLIBINC to ZLIgp-C. Fix that.
2024-11-27gprofng: skip unrecognized input commandVladimir Mezentsev3-3/+18
gprofng crashes when the GUI sends an invalid command. Skip unrecognized commands and return an error status to the GUI. gprofng/ChangeLog 2024-11-26 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/ipc.cc (ipc_doWork): Skip unrecognized commands. * src/ipcio.cc (writeError): New function. * src/ipcio.h: Add RESPONSE_STATUS_ERROR.
2024-11-22gprofng: fix build with -std=gnu23Vladimir Mezentsev1-1/+0
Fix function pointer types accordingly. Remove unused function pointers. gprofng/ChangeLog 2024-11-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/32374 PR gprofng/32373 * common/cpuid.c: Define ATTRIBUTE_UNUSED if necessary. * libcollector/libcol_util.c (sysinfo): Remove unused pointer. * src/collector_module.h: Likewise. * libcollector/dispatcher.c (setitimer): Fix prototype. * libcollector/linetrace.c (system, grantpt, ptsname): Likewise. * testsuite/gprofng.display/mttest/mttest.c (dump_arrays): Likewise. * testsuite/gprofng.display/synprog/endcases.c (xinline_code, s_inline_code): Likewise. * testsuite/gprofng.display/synprog/inc_inline.h (ext_inline_code): Likewise. * testsuite/gprofng.display/synprog/synprog.c (doabort): Rename nullptr.
2024-11-18gprofng: fix -std=gnu23 compatibility wrt unprototyped functionsSam James1-1/+1
C23 removes support for unprototyped functions. Fix function pointer types accordingly. This does not fix all instances, there's a few left as I commented on in PR32374 (e.g. setitimer which I have a local workaround for but it involves a glibc implementation detail; the Linaro precommit CI tester pointed that out too, so dropped that). ChangeLog: PR gprofng/32374 * libcollector/collector.c (collector_sample): Fix prototype. * libcollector/envmgmt.c (putenv): Ditto. (_putenv): Ditto. (__collector_putenv): Ditto. (setenv): Ditto. (_setenv): Ditto. (__collector_setenv): Ditto. (unsetenv): Ditto. (_unsetenv): Ditto. (__collector_unsetenv): Ditto. * libcollector/jprofile.c (open_experiment): Ditto. (__collector_jprofile_enable_synctrace): Ditto. (jprof_find_asyncgetcalltrace): Ditto. * libcollector/libcol_util.c (__collector_util_init): Ditto. (ARCH): Ditto. * libcollector/mmaptrace.c (collector_func_load): Ditto. (collector_func_unload): Ditto. * libcollector/unwind.c (__collector_ext_unwind_init): Ditto. * src/collector_module.h: Ditto.
2024-11-01gprofng: use gprofng- prefix for gprofng binariesVladimir Mezentsev9-143/+151
gprofng application names have a gp- prefix (gp-display-text, gp-archive, etc.). But our man pages use the gprofng- prefix (gprofng-display-text, gprofng-archive, etc.). I renamed the gprofng binaries and temporarily created the gp-* links for compatibility with the old gprofng-gui. We plan to remove these links in version 2.46. gprofng/ChangeLog 2024-10-31 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * doc/gprofng-archive.texi: Rename gprofng application names. * doc/gprofng-collect-app.texi: Likewise. * doc/gprofng-display-html.texi: Likewise. * doc/gprofng-display-src.texi: Likewise. * doc/gprofng-display-text.texi: Likewise. * doc/gprofng.texi: Likewise. * doc/gprofng_ug.texi: Likewise. * gp-display-html/Makefile.am: Likewise. * gp-display-html/gp-display-html.in: Likewise. * libcollector/collector.c: Likewise. * src/Application.cc: Likewise. * src/Experiment.cc: Likewise. * src/Makefile.am: Likewise. * src/gp-archive.cc: Likewise. * src/gp-collect-app.cc: Likewise. * src/gp-display-src.cc: Likewise. * src/gp-display-text.cc: Likewise. * src/gprofng.cc: Likewise. * src/Makefile.in: Rebuild. * gp-display-html/Makefile.in: Rebuild.
2024-10-16gprofng: use xmalloc/xrealloc/xcalloc/xstrdup/xstrndup from libibertyAndreas Schwab43-497/+356
PR gprofng/32241 * src/Makefile.am (CSOURCES): Remove dbe_memmgr.c * src/Makefile.in: Regenerate. * src/dbe_memmgr.c: Remove. * src/gprofng.cc (main): Call xmalloc_set_program_name. * src/gp-archive.cc (main): Likewise. * src/gp-collect-app.cc (main): Likewise. * src/gp-display-src.cc (main): Likewise. * src/gp-display-text.cc (main): Likewise. * src/Application.cc: Use xmalloc, xrealloc, xcalloc, xstrdup, xstrndup instead of malloc, realloc, calloc, strdup, strndup. * src/BaseMetric.cc: Likewise. * src/CallStack.cc: Likewise. * src/ClassFile.cc: Likewise. * src/Data_window.cc: Likewise. * src/Dbe.cc: Likewise. * src/DbeJarFile.cc: Likewise. * src/DbeSession.cc: Likewise. * src/DbeView.cc: Likewise. * src/DerivedMetrics.cc: Likewise. * src/DwarfLib.cc: Likewise. * src/Elf.cc: Likewise. * src/Emsg.cc: Likewise. * src/Experiment.cc: Likewise. * src/Function.cc: Likewise. * src/Module.cc: Likewise. * src/Print.cc: Likewise. * src/QLParser.yy: Likewise. * src/SAXParserFactory.cc: Likewise. * src/Settings.cc: Likewise. * src/SourceFile.cc: Likewise. * src/StringBuilder.cc: Likewise. * src/StringMap.h: Likewise. * src/Table.cc: Likewise. * src/checks.cc: Likewise. * src/collctrl.cc: Likewise. * src/comp_com.c: Likewise. * src/count.cc: Likewise. * src/envsets.cc: Likewise. * src/gp-archive.cc: Likewise. * src/gp-display-src.cc: Likewise. * src/gp-display-text.cc: Likewise. * src/gprofng.cc: Likewise. * src/ipc.cc: Likewise. * src/ipcio.cc: Likewise. * src/vec.h: Likewise. * src/util.cc: Likewise. (get_prog_name): Remove. * src/util.h: Likewise. * src/dbe_hwc.h (malloc, realloc, calloc, strdup): Define.
2024-10-13Fix 32110 gprofng segfaults on parsing DWARF of clang++ 18.1.3 produced binaryVladimir Mezentsev1-5/+33
gprofng does not handle DW_FORM_strx1* forms correctly. gprofng/ChangeLog 2024-10-10 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR 32110 * src/DwarfLib.cc: Handle DW_FORM_strx* forms.
2024-10-07gprofng: add hardware counters for Neoverse-N1 and Ampere-1 processorsVladimir Mezentsev2-0/+639
gprofng/ChangeLog 2024-10-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>. * common/hwc_cpus.h: New constant for Neoverse-N1 and Ampere-1. * common/hwctable.c: Add the hwc table for Neoverse-N1 and Ampere-1. * src/hwc_arm_ampere_1.h: New file with hwc table for Ampere-1. * src/hwc_arm_neoverse_n1.h: New file with hwc table for Neoverse-N1.
2024-09-26Fix 32207 [gprofng collect app] Error in parsing the -O optionVladimir Mezentsev1-1/+1
gprofng/ChangeLog 2024-09-25 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR 32207 * src/collctrl.cc (preprocess_names): Fix the size in strndup.
2024-09-18Fix 32096 UBSAN issues in gprofngVladimir Mezentsev3-17/+24
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-11Fix 32096 UBSAN issues in gprofngVladimir Mezentsev5-24/+40
Fixed UBSAN runtime errors such as: - load of value 4294967295, which is not a valid value for type 'Cmsg_warn' - null pointer passed as argument 2, which is declared to never be null - load of value 4294967295, which is not a valid value for type 'ProfData_type' - reference binding to misaligned address 0x00000357583c for type 'long unsigned int', which requires 8 byte alignment gprofng/ChangeLog 2024-09-09 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>. PR gprofng/32096 * src/BaseMetric.cc: Fix UBSAN runtime errors. * src/BaseMetric.h: Likewise. * src/Emsg.h: Likewise. * src/Experiment.cc: Likewise. * src/Table.h: Likewise.
2024-09-04Fix 32097 Warnings when building gprofng with ClangVladimir Mezentsev14-54/+30
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-19gprofng: add hardware counters for Appliedmicro processorVladimir Mezentsev2-1/+187
gprofng/ChangeLog 2024-08-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>. * common/hwc_cpus.h: New constant for Appliedmicro processor. * common/hwctable.c: Add the hwc table for Appliedmicro processor. * src/hhwc_arm64_amcc.h: New file. * src/collctrl.cc (read_int): Use strtol instead of atoi.
2024-08-14gprofng: fix typo in src/collctrl.ccVladimir Mezentsev1-1/+2
gprofng/ChangeLog 2024-08-13 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/collctrl.cc (read_cpuinfo): Fix typo.
2024-08-12gprofng: specify the heap data collection rangeVladimir Mezentsev4-137/+48
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-10RISC-V:[gprofng] Minimal support gprofng for riscv.Yixuan Chen6-2/+16
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-07-09gprofng: add hardware counters for Intel Ice Lake processorVladimir Mezentsev2-1/+1173
gprofng/ChangeLog 2024-07-07 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>. * common/hwc_cpus.h: New constant for Intel Ice Lake processor. * common/hwcdrv.c: Add a new argument to hwcfuncs_get_x86_eventsel. Set config1 in perf_event_attr. Remove the use of memset. * common/core_pcbe.c (core_pcbe_get_eventnum): Return 0. * common/hwcentry.h: Add config1. * src/collctrl.cc (Coll_Ctrl::build_data_desc):Set config1. * common/hwcfuncs.c (process_data_descriptor): Set config1. * common/hwctable.c: Add the hwc table for Intel Ice Lake processor. * src/hwc_intel_icelake.h: New file.
2024-06-03gprofng: add hardware counters for AMD Zen4Vladimir Mezentsev2-1/+867
ChangeLog 2024-06-01 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * common/hwctable.c: Add the hwc table for AMD Zen4. * src/hwc_amd_zen4.h: New file. * src/hwc_amd_zen3.h: Define _HWC_AMD_ZEN3_H.
2024-05-21gprofng: use StringBuilder to create long messagesVladimir Mezentsev2-283/+179
ChangeLog 2024-05-20 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/collctrl.cc: Use StringBuilder to create messages. Remove unused variables and arrays. * src/collctrl.h: Remove unused variables.
2024-05-17gprofng: add hardware counters for AMD Zen3Vladimir Mezentsev3-4/+636
Historically, we have used several APIs (perfctr, libcpc, perf_event_open) for profiling. For each hardware we have several tables of hardware counters. Some information is duplicated in these tables. Some of the information is no longer used. I did not touch the existing hwc tables. I added a new hwc table for an AMD Zen3 machine. ChangeLog 2024-05-16 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/31123 * common/core_pcbe.c (core_pcbe_get_events): Add new argument. * common/hwc_cpus.h: New constants for AMD hardware. * common/hwcdrv.c: Add new argument to hwcdrv_get_descriptions. Clean up the code. * common/hwcdrv.h: Likewise. * common/hwcfuncs.c (hwcdrv_get_descriptions): Add new argument. * common/hwctable.c: Add the hwc table for AMD Zen3. * src/hwc_amd_zen3.h: New file. * common/opteron_pcbe.c: Add new argument to opt_pcbe_get_events. * src/collctrl.cc: Remove unused variable. * src/collctrl.h: Likewise.
2024-05-17gprofng: remove old interface with libcpcVladimir Mezentsev2-18/+1
interface with libcpc was used on Solaris. gprofng doesn't support profiling on Solaris. I removed this old code and other unused macros and variables. gprofng/ChangeLog 2024-04-29 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/31123 * common/hwcdrv.c: remove old interface with libcpc. * common/hwcdrv.h: Likewise. * common/hwcentry.h: Likewise. * common/hwcfuncs.c: Likewise. * common/hwcfuncs.h: Likewise. * common/hwctable.c: Likewise. * src/Dbe.cc: Likewise. * src/collctrl.cc: Likewise.
2024-05-08Fix hard-coded bash path in gprofngVladimir Mezentsev1-0/+1
When running 'make check', the default gprofng test suite creates a shell script for which it used a hardcoded shebang of '/usr/bin/bash' this script would not run if bash is in a different location, like /bin/bash This commit adds 'AC_PATH_PROG(BASH, bash)' to configure.ac so the installation path of bash is detected at configuration time. The configuration is propagated to the runtest command line where it is needed.
2024-01-22Fix 31252 gprofng causes testsuite parallel jobs failVladimir Mezentsev1-7/+29
Before running our tests, we made a fake installation into ./tmpdir. This installation changes libopcodes.la in the build area. Gas testing may fail if gas and gprofng tests are run in parallel. I create a script to run gprofng. Inside this script, LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR are set. putenv_libcollector_ld_misc() first uses $GPROFNG_PRELOAD_LIBDIRS to create directories for SP_COLLECTOR_LIBRARY_PATH ($SP_COLLECTOR_LIBRARY_PATH is used to set up LD_PRELOAD). gprofng/ChangeLog 2024-01-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/31252 PR gprofng/30808 * src/envsets.cc (putenv_libcollector_ld_misc): Use $GPROFNG_PRELOAD_LIBDIRS first to build SP_COLLECTOR_LIBRARY_PATH. * testsuite/config/default.exp: Create a script to run gprofng. * testsuite/lib/display-lib.exp: Fix typo.
2024-01-12gprofng: 30889 can't compile without large file supportVladimir Mezentsev1-0/+4
gprofng/ChangeLog 2024-01-12 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR 30889 * src/util.h (O_LARGEFILE): Define to 0, if not defined.
2024-01-10gprofng: 31123 improvements to hardware event implementationVladimir Mezentsev1-100/+111
Our hardware counter profiling is based on perf_event_open(). Our HWC tables are absent for new machines. I have added HWC tables for the following events: PERF_TYPE_HARDWARE, PERF_TYPE_SOFTWARE, PERF_TYPE_HW_CACHE. Other events require additional fixes. Did a little cleaning: marked the symbols as static, used Stringbuilder, created a function to read /proc/cpuinfo. gprofng/ChangeLog 2024-01-08 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/31123 * common/core_pcbe.c: Mark the symbols as static. Add events_generic[]. * common/hwc_cpus.h: Declare a new function read_cpuinfo. * common/hwcdrv.c: Add a new parameter in init_perf_event(). * common/hwcentry.h: Add use_perf_event_type in Hwcentry. * common/hwcfuncs.c (process_data_descriptor): Read use_perf_event_type, type, config. * common/hwctable.c: Add a new HWC table generic_list[]. * common/opteron_pcbe.c (opt_pcbe_init): Accept AMD machines. * src/collctrl.cc: Use StringBuilder in Coll_Ctrl::build_data_desc(). Add a new function read_cpuinfo.
2024-01-04Update year range in copyright notice of binutils filesAlan Modra192-193/+193
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 Mezentsev9-25/+31
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-20gprofng: 31169 Source code locations can not be found in a C++ applicationVladimir Mezentsev1-1/+4
gprofng incorrectly reads the form of the DW_FORM_ref_addr attribute for DWARF Version 3 or later. From DWARF specification: References that use the attribute form DW_FORM_ref_addr are specified to be four bytes in the DWARF 32-bit format and eight bytes in the DWARF 64-bit format, while DWARF Version 2 specifies that such references have the same size as an address on the target system. 2023-12-18 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/31169 * src/DwarfLib.cc: Fix the reader for DW_FORM_ref_addr.
2023-12-14gprofng: fix -Wuse-after-free warningVladimir Mezentsev1-4/+0
Removed incorrect unnecessary code. gprofng/ChangeLog 2023-12-13 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/collctrl.cc (set_synctrace): Fix -Wuse-after-free warning.
2023-11-01gprofng: remove dependency on help2manVladimir Mezentsev1-1/+0
help2man is no longer used to create the gprofng man pages. gprofng/ChangeLog 2023-10-31 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * configure.ac: Remove HELP2MAN. * Makefile.in: Rebuild. * configure: Rebuild. * doc/Makefile.in: Rebuild. * gp-display-html/Makefile.in: Rebuild. * src/Makefile.in: Rebuild.
2023-10-24gprofng: Fix -Wformat= warningsVladimir Mezentsev5-8/+15
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-10gprofng: Use the correct application name in error messagesVladimir Mezentsev2-39/+40
The old application name (er_archive) is used in many places. gprofng/ChangeLog 2023-10-09 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/Experiment.cc: Replace er_archive with gp-archive. * src/Experiment.cc: Likewise.
2023-10-05gprofng: 30894 bison should be no hard dependencyVladimir Mezentsev2-8/+33
When running from a distribution tarball, bison should not be necessary. The generated files (QLParser.tab.cc, QLParser.tab.hh) should be distributed. configure.ac should not abort if bison is missing. configure.ac should remove temporary files (dummy.c, Simple.class). bison must be run once to create QLParser.tab.cc and QLParser.tab.hh. gprofng/ChangeLog 2023-10-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/30894 * configure.ac: Don't abort if bison is missing. Remove temporary files. * src/Makefile.am: Distribute QLParser.tab.cc and QLParser.tab.hh. * Run bison once to create QLParser.tab.cc and QLParser.tab.hh. * configure: Rebuild. * src/Makefile.in: Rebuild.
2023-09-21gprofng: 30834 improve disassembly output for call and branch instructionsVladimir Mezentsev5-121/+185
This patch makes the gprofng disassembler to emit, e.g. call fprintf@plt [ 0x401060, .-0x49c] instead of call 0xfffffffffffffb64 I use bfd_get_synthetic_symtab() to get function names in the .plt section. I have not yet modified Elf-reader in gprofng to remove parsing of .symtab or .dynsym sections. But we plan to do it. gprofng/ChangeLog 2023-09-20 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/30834 * src/Disasm.cc: Show the function name in the call instruction and the relative address in the branch instruction. Remove unused code. * src/Disasm.h (map_PC_to_func, get_funcname_in_plt): New functions. * src/Elf.cc: Get function names for the .plt section. * src/Elf.h (get_funcname_in_plt, get_bfd_symbols): New functions. * src/Stabs.cc: Add pltSym to SymLst. Remove the conversion to uint32_t.
2023-08-17gprofng: Use execvp instead of execvVladimir Mezentsev1-1/+6
gp-display-gui (https://savannah.gnu.org/projects/gprofng-gui) can be installed in a different directory. In this case, $PATH is used to look up gp-display-text. execv() does not use $PATH to find the executable. gprofng/ChangeLog 2023-08-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/gp-display-text.cc (reexec): Use execvp instead of execv.
2023-08-12gprofng: pass gprofng location to gp-display-guiVladimir Mezentsev1-5/+18
gprofng GUI can be installed to the other directory. In this case, $PATH is used to find gp-display-gui from gprofng and option --gprofngdir is passed to gp-display-gui. gprofng/ChangeLog 2023-08-09 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/gprofng.cc (Gprofng::exec_cmd): Add option --gprofngdir.
2023-08-12gprofng: fix typos in get_realpath() and check_executable()Vladimir Mezentsev2-8/+4
gprofng/ChangeLog 2023-08-09 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/Application.cc (Application::get_realpath): Fix typo. * src/checks.cc (collect::check_executable): Likewise.
2023-08-02Revert "2.41 Release sources"Sam James2-2/+14
This reverts commit 675b9d612cc59446e84e2c6d89b45500cb603a8d. See https://sourceware.org/pipermail/binutils/2023-August/128761.html.
2023-08-022.41 Release sourcesbinutils-2_41-releaseNick Clifton2-14/+2
2023-07-31gprofng: create a list of available viewsVladimir Mezentsev2-2/+14
In our GUI project (https://savannah.gnu.org/projects/gprofng-gui), we use the output of gp-display-text to display the data. gp-display-text did not report available views. gprofng/ChangeLog 2023-07-26 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/Command.cc: Add commands for gprofng GUI. * src/gprofng.rc: Set defaults for gprofng GUI.
2023-07-01gprofng: fix data raceVladimir Mezentsev5-93/+34
In our GUI project (https://savannah.gnu.org/projects/gprofng-gui), we use the output of gprofng to display the data. Sometimes this data is corrupted. gprofng/ChangeLog 2023-06-29 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/ipc.cc (ipc_doWork): Fix data race. * src/ipcio.cc (IPCresponse::print): Fix data race. Remove unused variables and functions. * src/ipcio.h: Declare two variables. * src/StringBuilder.cc (StringBuilder::write): New function. * src/StringBuilder.h: Likewise.