aboutsummaryrefslogtreecommitdiff
path: root/gprofng/common/hwcdrv.c
AgeCommit message (Collapse)AuthorFilesLines
2024-07-09gprofng: add hardware counters for Intel Ice Lake processorVladimir Mezentsev1-15/+17
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-05-17gprofng: add hardware counters for AMD Zen3Vladimir Mezentsev1-11/+11
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 Mezentsev1-80/+3
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-01-10gprofng: 31123 improvements to hardware event implementationVladimir Mezentsev1-20/+15
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 Modra1-1/+1
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-01-01Update year range in gprofng copyright noticesAlan Modra1-1/+1
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-09-29gprofng: fix cppcheck warningsVladimir Mezentsev1-1/+1
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-14gprofng: fix build issues on muslVladimir Mezentsev1-3/+3
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-03-11gprofng: a new GNU profilerVladimir Mezentsev1-0/+1454
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.