aboutsummaryrefslogtreecommitdiff
path: root/gprofng
AgeCommit message (Collapse)AuthorFilesLines
2025-07-19gprofng: do not skip weak symbolsDmitrii Bordukov1-1/+1
PR gprofng/33151 gprofng ignores functions that are compiled as weak symbols. This heavily affects C++ class methods that are always compiled by g++ and clang++ as weak symbols. In this case 'gprofng display text' just displays <static>@ADDRESS(<FILENAME>) instead of proper method name. The bug has been introduced in the commit 470a0288a818.
2025-07-13Update version number on mainlineNick Clifton3-24/+24
2025-07-08gprofng: support external debug infoVladimir Mezentsev15-185/+279
Use bfd_follow_gnu_debuglink() and bfd_follow_gnu_debugaltlink() to find files with debug info. If necessary, gprofng-archive copies these files to EXP/archives. For each executable, gprofng creates the Elf class twice. One of them was a memory leak. Fixed this by adding a new argument to Stabs::Stabs(). gprofng/ChangeLog 2025-07-07 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR 32147 PR 30194 * src/Disasm.cc (get_funcname_in_plt): Use the executable file instead of the debug information file. * src/Dwarf.h: Define debug_alt_strSec. * src/DwarfLib.cc: Add support for DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt. * src/Elf.h (find_gnu_debug_files, get_dwr_section): New functions. * src/Elf.cc: Likewise. * src/Experiment.cc (copy_file): Add the const qualifier. * src/Experiment.h: Likewise. * src/LoadObject.cc (get_elf, openDebugInfo): Find files with debug info. * src/LoadObject.h: Remove unused variables. * src/Module.cc: Remove an argument in openDebugInfo(). * src/Stabs.cc (Stabs::Stabs): Add the Elf* argument. * src/Stabs.h: Likewise. * src/gp-archive.cc: Archive files with debug info. * src/gp-archive.h (archive_file): New function.
2025-07-07gprofng: remove ElfReloc class and unused functions and declarationsVladimir Mezentsev9-498/+6
class ElfReloc is not used after we started use libbfd. Removed ElfReloc and other unused declarations. gprofng/ChangeLog 2025-07-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/Disasm.cc: Remove unused functions and variables. * src/Disasm.h: Likewise. * src/Dwarf.cc: Likewise. * src/DwarfLib.cc: Likewise. * src/DwarfLib.h: Likewise. * src/Elf.cc: Likewise. * src/Elf.h: Likewise. * src/Stabs.cc: Likewise. * src/Stabs.h: Likewise.
2025-06-30RISC-V: [gprofng] Allow building gprofng without asm/hwprobe.hWANG Xuerui4-2/+26
The code is actually able to gracefully fallback if the syscall number of riscv_hwprobe is not available at build time, but it still depended on the <asm/hwprobe.h> header unconditionally. In certain environments such as one of crosstool-NG's Canadian Cross build step (binutils for host), or one with very outdated kernel headers, the header will not be present, causing the build to fail. While the relevant projects/environments should be fixed nevertheless, a configure-time check for <asm/hwprobe.h> is helpful for fixing gprofng builds with released versions of ct-ng etc. Signed-off-by: WANG Xuerui <git@xen0n.name>
2025-06-26gprofng: need to know that experiment was created on big-endian machineVladimir Mezentsev10-6/+270
gprofng/ChangeLog 2025-06-25 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * configure.ac: Add AC_C_BIGENDIAN. * common/config.h.in: Rebuild. * configure: Rebuild. * libcollector/collector.c (log_header_write): Save big-endian flag. * src/DbeSession.h (is_bigendian): New function. * src/DbeSession.cc: Likewise. * src/Experiment.cc: Set 'bigendian' and 'need_swap_endian'. * src/Experiment.h: New field 'bigendian'. * src/LoadObject.cc: Remove an unused variable. * src/LoadObject.h: Likewise.
2025-05-30gprofng: Use __x86_64__ instead of __x86_64Andrew Pinski7-17/+17
With some compilers, only __x86_64__ is defined so use that instead of __x86_64. gprofng/ChangeLog 2025-05-30 Andrew Pinski <quic_apinski@quicinc.com> * common/core_pcbe.c: s/__x86_64/__x86_64__/. * common/cpu_frequency.h: Likewise. * common/cpuid.c: Likewise. * common/gp-defs.h: Likewise. * common/hwctable.c: Likewise. * libcollector/libcol-i386-dis.c: Likewise. * libcollector/libcol_util.h: Likewise. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
2025-05-21gprofng: fix 32892 source line level information not available with "-g -O2"Vladimir Mezentsev8-94/+442
gprofng did not read the .debug_rnglists section for dwarf-5. Another problem was that gprofng ignored DW_AT_abstract_origin As a result, gprofng skiped Dwarf for all functions declared as: <1><e18b>: Abbrev Number: 43 (DW_TAG_subprogram) <e18c> DW_AT_abstract_origin: <0xe168> <e190> DW_AT_linkage_name: _ZN10Bool_ArrayD2Ev gprofng/ChangeLog 2025-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR 32892 * src/Dwarf.cc: Read the .debug_rnglists section. Support DW_AT_abstract_origin. * src/Dwarf.h: Likewise. * src/DwarfLib.cc: Likewise. * src/DwarfLib.h: Likewise. * src/LoadObject.cc (dump_functions): Print mangled names for aliases. * src/Stabs.cc (fixSymtabAlias): Set 'alias' correctly. * src/Symbol.cc (find_symbols): Add argument where to collect symbols. * src/Symbol.h: Likewise.
2025-05-05gprofng: remove unused functions, duplicate macrosVladimir Mezentsev11-187/+47
class Reloc is not used after commit 13f614be23a gprofng: Refactor readSymSec for using BFD's asymbol struct Many common macros were defined in different sources. Sometimes a macro was used, sometimes a macros value was used. Removed unused macros and include files. gprofng/ChangeLog 2025-05-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * common/gp-experiment.h: Define variables that are passed to libcollector. Remove unused macros. * libcollector/collector.c: Cleanup macros. * libcollector/descendants.h: Likewise. * libcollector/envmgmt.c: Likewise. * libcollector/linetrace.c: Likewise. * src/collect.h: Likewise. * src/envsets.cc: Likewise. * src/gp-collect-app.cc: Likewise. * src/Stabs.cc: Remove class Reloc. * src/Stabs.h: Likewise. * src/ipcio.cc: Remove unused include files.
2025-05-04gprofng: fix 32892 source line level information not available with "-g -O2"Vladimir Mezentsev11-153/+563
gprofng ignored DW_AT_specification. As a result, gprofng skiped Dwarf for all functions declared as: < 2>:<0x0000f725> DW_TAG_subprogram(46) DW_AT_linkage_name(110) "func_name" DW_AT_declaration*(60) 0x1 (1) < 1>:<0x00015acc> DW_TAG_subprogram(46) DW_AT_specification(71) 0xf725 (63269) Another problem was that gprofng ignored DW_AT_ranges. As a result, many functions are mapped to the <Unknown> module. gprofng/ChangeLog 2025-05-01 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR 32892 * src/Dwarf.cc: Handle DW_AT_specification and DW_AT_ranges. * src/DwarfLib.cc: Likewise. * src/DwarfLib.h: Likewise. * src/Dwarf.h (get_ranges): New function. * src/Stabs.h (get_symbols): New function. * src/Stabs.cc: Move Symbol class to src/Symbol.cc. * src/Symbol.cc: New file. * src/Symbol.h: New file. * src/Makefile.am: Add Symbol.cc in build. * src/Makefile.in: Rebuild. * src/LoadObject.cc (dump_functions): Improve output for -dfunc option.
2025-04-28gprofng not reading references correctly in DwarfVladimir Mezentsev2-9/+9
Fixed as specified in the DWARF standard: The first type of reference can identify any debugging information entry within the containing unit. This type of reference is an offset from the first byte of the compilation header for the compilation unit containing the reference. There are five forms for this type of reference. There are fixed length forms for one, two, four and eight byte offsets (respectively, DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4, and DW_FORM_ref8). There is also an unsigned variable length offset encoded form that uses unsigned LEB128 numbers (DW_FORM_ref_udata). gprofng/ChangeLog 2025-04-27 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/DwarfLib.cc (set_die): Handling DWARF references (DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4, DW_FORM_ref8, DW_FORM_ref_udata). * src/Dwarf.cc: Likewise.
2025-04-21gprofng: fix 32889 Typo in documentationVladimir Mezentsev1-3/+2
gprofng/ChangeLog 2025-04-18 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * doc/gprofng_ug.texi: Fix typo.
2025-04-21gprofng: fix 32886 wrong mapping from instruction to line numberVladimir Mezentsev1-7/+3
On Intel, gprofng should adjusts return addresses, including user leaf functions. gprofng/ChangeLog 2025-04-18 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/CallStack.cc (add_stack): Adjust return addresses on Intel.
2025-04-18Fix 32885 gprofng --help should state where to report bugsVladimir Mezentsev5-5/+10
gprofng/ChangeLog 2025-04-17 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * src/gp-archive.cc: Fix the --help output. * src/gp-collect-app.cc: Likewise. * src/gp-display-src.cc: Likewise. * src/gp-display-text.cc: Likewise. * src/gprofng.cc: Likewise.
2025-04-06gprofng: Remove duplicate symbolsClaudiu Zissulescu3-0/+43
Remove all duplicate symbols which can be in SymLst. The duplication is due to processing of both static and dynamic symbols. The Stabs::removeDupSyms function is called before computing symbol aliases. Introduce a new vector function (i.e., truncate()), that truncates a vector lenght to the given new count. This functionis used by removeDupSyms function. Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
2025-04-06gprofng: Refactor readSymSec for using BFD's asymbol structClaudiu Zissulescu5-81/+59
This patch refactors a number of gprofng internal functions for using more BFD data types and functions. Stabs::readSymSec is a function which reads the symbols of an ELF file mapping them into an internal structure. To use BFD asymbols, the Elf::elf_getsym is changed from custom reading of the symbols from .symtab and .dynsym section to BFD enable functions. A new function is introduced which returns the number of either static or dynamic symbols, named Elf::elf_getSymCount. Both Elf functions are used by Stabs::readSymSec refactoring. Also, this patch removes reading symbols, SUNW_ldnsym section as it is only used by now defunct Studio compiler. However, it adds the reading of both static and dynamic symbols, previously, only either one was processed. Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
2025-04-06gprofng: Remove check_Relocs() functionClaudiu Zissulescu2-140/+2
check_Relocs() function is not anylonger required as it can only handle Studio compiler relocs, now defunct. Remove this function. Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
2025-03-12gprofng: regenerate Makefile.inSam James1-0/+1
Needed after 90803ffdcc4d8c3d17566bf8dccadbad312f07a9. gprofng/ChangeLog * src/Makefile.in: Regenerate.
2025-03-12gprofng: 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-19Change version to 2.44.50 and regenerate filesNick Clifton3-24/+24
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 Modra5-5/+5
2025-01-01Update year range in copyright notice of binutils filesAlan Modra304-375/+375
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-27Fix 32392 [2.44 Regression] gprofng fails to build on i686-linux-gnuVladimir Mezentsev1-42/+9
gprofng/ChangeLog 2024-11-26 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/32392 * libcollector/libcol_util.c (__collector_util_init): Fix warning.
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 Mezentsev9-22/+14
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 James8-65/+64
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 Mezentsev20-163/+171
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-17gprofng: fix a memory leak in the mxv-pthreads exampleRuud van der Pas3-11/+18
Fix a bug where the main program does not free the rows of the matrix. The memory for thread_data_arguments is also not released. In function check_results, the memory for the marker vector is not released. The usage of the verbose veriable has been extended to print more messages. gprofng/ChangeLog 2024-10-16 Ruud van der Pas <ruud.vanderpas@oracle.com> PR 32273 PR 32274 * mxv-pthreads/src/main.c: add calls to free() to release the memory allocated for array A and vector marker. Improve the usage of the verbose variable. * mxv-pthreads/src/manage_data.c: add a diagnostic printf statement. * mxv-pthreads/src/mydefs.h: adapt prototype to match the changes in main.c.
2024-10-17gprofng: fix regression in man page installationVladimir Mezentsev2-17/+22
gprofng/ChangeLog 2024-10-14 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * doc/Makefile.am: Use install-data-local to install gprofng examples. * doc/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-11gprofng: Use $(DESTDIR) in install-examplesH.J. Lu2-5/+4
Use $(DESTDIR) in install-examples to fix mkdir -p -- /usr/share/doc//gprofng mkdir: cannot create directory ‘/usr/share/doc//gprofng’: Permission denied for "make install DESTDIR=...". * doc/Makefile.am (install-examples): Use $(DESTDIR). * doc/Makefile.in: Regenerated. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2024-10-10gprofng: install examples to $(docdir)/gprofngVladimir Mezentsev2-3/+19
gprofng/ChangeLog 2024-10-09 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * doc/Makefile.am: Install gprofng examples. * doc/Makefile.in: Rebuild.
2024-10-07gprofng: add hardware counters for Neoverse-N1 and Ampere-1 processorsVladimir Mezentsev4-0/+649
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-10-02gprofng: fix a problem with hardware event countersRuud van der Pas1-325/+441
Fix a bug where an experiment with hardware event counter data causes the source and disassembly files not to be generated. No longer suppress zero valued metrics and change the name of the man page in a warning message. Adapt line lengths to not exceed 79. gprofng/ChangeLog 2024-09-24 Ruud van der Pas <ruud.vanderpas@oracle.com> PR 32193 PR 32199 PR 32201 * gp-display-html/gp-display-html.in: Implement all the above changes.
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 Mezentsev4-19/+26
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-12gprofng: avoid use of non-portable which [PR32166]Sam James1-1/+1
Distributions like Debian [0] and Gentoo are phasing out the use of the non-portable `which` utility. Use POSIX's `command -v` instead. [0] https://lwn.net/Articles/874049/ gprofng/ChangeLog PR gprofng/32166 * testsuite/lib/Makefile.skel (JAVABIN): Replace use of which.
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-06Rename gp-* man pages to gprofng-* man pagesVladimir Mezentsev10-232/+274
gprofng/ChangeLog 2024-09-05 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>. * doc/gp-archive.texi: Rename to doc/gprofng-archive.texi. * doc/gp-collect-app.texi: Rename to doc/gprofng-collect-app.texi. * doc/gp-display-html.texi: Rename to doc/gprofng-display-html.texi. * doc/gp-display-src.texi: Rename to doc/gprofng-display-src.texi. * doc/gp-display-text.texi: Rename to doc/gprofng-display-text.texi. * doc/gp-macros.texi: Add new macros. * doc/gprofng.texi: Rename man pages. * doc/gprofng_ug.texi: Likewise. * doc/Makefile.am: Likewise. * doc/Makefile.in: Rebuild.
2024-09-04Fix 32097 Warnings when building gprofng with ClangVladimir Mezentsev25-130/+88
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-22gprofng: testsuite: fix 'wrapper' typoSam James1-3/+3
gprofng/ChangeLog * testsuite/config/default.exp: Fix 'wrapper' typo.
2024-08-19gprofng: add hardware counters for Appliedmicro processorVladimir Mezentsev4-6/+212
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.