aboutsummaryrefslogtreecommitdiff
path: root/lib/libpmcstat
Commit message (Collapse)AuthorAgeFilesLines
* pmcstat: fix PPC kernel symbol resolutionLeandro Lupori2020-11-051-0/+25
| | | | | | | | | | | | | | | PowerPC kernel is of DYN type and it has a base address where it is initially loaded, before being relocated. As the start address passed to pmcstat_image_link() is where the kernel was relocated to, but the symbols always use the original base address, we need to subtract it to get the correct offset. Reviewed by: jhibbits Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D26114 Notes: svn path=/head/; revision=367392
* pmcstat: implement showing offsets into symbols in top modeMateusz Guzik2020-08-051-1/+2
| | | | | | | | | | | | | The -I option (and hotkey) is reused for this. Skipping symbol resolution is moved to the new -A option (and hotkey). While arguably this violates POLA I think it's a change for the better. ALso note the -I option was added in head. Differential Revision: https://reviews.freebsd.org/D21658 Notes: svn path=/head/; revision=363928
* pmc: Add include path for libpmcstat as it is an internallibEmmanuel Vadot2020-03-251-1/+3
| | | | | | | | Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D24173 Notes: svn path=/head/; revision=359292
* libpmcstat: Try /boot/modules if module not foundRyan Moeller2020-03-121-6/+16
| | | | | | | | | | | | | | | Modules from ports/pkg are commonly installed to /boot/modules rather than to the same directory the kernel resides in. Look there if a module is not found next to the kernel. Submitted by: mmacy Reported by: Nick Principe <nap@iXsystems.com> Approved by: mmacy (mentor) MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=358923
* pmc(3)/hwpmc(4): update supported Intel processors to rely fully on theMatt Macy2018-05-26239-111640/+3
| | | | | | | | | | | | | | | | | | vendor provided pmu-events tables and sundry cleanups. The vendor pmu-events tables provide counter descriptions, default sample rates, event, umask, and flag values for all the counter configuration permutations. Using this gives us: - much simpler kernel code for the MD component - helpful long and short event descriptions - simpler user code - sample rates that won't overload the system Update man page with newer sample types and remove unused sample type. Notes: svn path=/head/; revision=334244
* Revert r334242 "pmc(3)/hwpmc(4): update supported Intel processors to rely ↵Matt Macy2018-05-26239-3/+111640
| | | | | | | | | fully on the" because of squash commit messages Notes: svn path=/head/; revision=334243
* pmc(3)/hwpmc(4): update supported Intel processors to rely fully on theMatt Macy2018-05-26239-111640/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vendor provided pmu-events tables and sundry cleanups. The vendor pmu-events tables provide counter descriptions, default sample rates, event, umask, and flag values for all the counter configuration permutations. Using this gives us: - much simpler kernel code for the MD component - helpful long and short event descriptions - simpler user code - sample rates that won't overload the system Update man page with newer sample types and remove unused sample type. Squashed commit of the following: commit 4459d43eff815bec08ccc5533dbe5de846f03128 Author: Matt Macy <mmacy@mattmacy.io> Date: Sat May 26 00:06:31 2018 -0700 libpmc: fix pmu function signatures for non amd64 commit a2cb8bbc586c65d41f9b291430a2261ec67b59fe Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:38:11 2018 -0700 pmcstat: fix indentation of usage commit f686954b15ff56a833ac80404898977cb80a265b Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:19:49 2018 -0700 pmclog(3): add callchain and pmcallocatedyn, remove pcsample commit 73e13a0d2e9498c81c150d14d022050cee7511bb Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:19:00 2018 -0700 pmclog.h: GC pcsample field commit 3e93ffd65da641fa657539dad3c48e281f8b5798 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:05:57 2018 -0700 hwpmc: make Intel core CPUs use external event tables commit 634f5fae1e1644ac324003136c66cd9c619d1c93 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:00:06 2018 -0700 pmclog: update log record types, bump PMC_MAJOR - explicitly make log record types a multiple of 8 bytes - hook in pmu event types for pmc_allocate records - remove references to no longer PCSAMPLE record commit 83d84fcd2d65bdf6ddcb2e155a22f0cfa2a9c225 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 21:52:10 2018 -0700 libpmc: add support for having vendor table driven pmc_allocate commit 9e6ad63c40c2fce8404847ace5078ca6cb33a736 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 19:11:33 2018 -0700 hwpmc_core: add accessors for EVSEL & UMASK, make IAP_UMASK useful to user commit 859dceb93daa6419a48c794db99b6758e5b041c9 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 19:09:45 2018 -0700 pmcstat: update usage and man page as well as make -L consistent with pmccontrol commit 79c7d8597e28c2eb13f5f9113e65ec2792ca57b1 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 18:07:03 2018 -0700 pmu_util: add support for all current intel event keywords commit d8089c7f6a6c8527f38324252b1ffb47004694c6 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 17:45:00 2018 -0700 add description for new arguments commit 058336740bab53c62ec88a3a026ea848cf3878c6 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 17:38:15 2018 -0700 libpmc: move pmu_events table and pmu_utils out of libpmcstat so that they can be used by pmc_allocate commit 049b66b382e2f833c3f47bc8df9e750cb265709f Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:12:41 2018 -0700 pmcstat: hook pmu_events counter description utility routines in commit f5e01e7b37a691dc045e1aa16b3ebdd162515de8 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:11:59 2018 -0700 pmu_events: add utility routines for listing counters and their descriptions commit cba4d4f8907f772279f86f18f915e0d74d33ac56 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:09:50 2018 -0700 pmu-events: expand out skylake regex to simplify string matches Notes: svn path=/head/; revision=334242
* META_MODE: Fix trying to rebuild jevents due to missing .meta file.Bryan Drewery2018-05-251-0/+3
| | | | | | | | | The tool is built separately in buildworld in a subdirectory rather than how other build-tools are done. Subdirectory builds in lib/libpmcstat remain broken since the tool cannot be auto-built from here. Notes: svn path=/head/; revision=334228
* Use proper BTOOLSPATH for build-tools path.Bryan Drewery2018-05-251-5/+1
| | | | Notes: svn path=/head/; revision=334227
* Cleanup styleBryan Drewery2018-05-251-4/+5
| | | | Notes: svn path=/head/; revision=334226
* libpmcstat: Don't build pmu tables on !amd64 until the correspondingMatt Macy2018-05-241-2/+2
| | | | | | | | | | util routines have been written and tested. Currently building them breaks the build on power64 Reported by: emaste Notes: svn path=/head/; revision=334186
* remove All Rights Reserved from new libpmcstat fileMatt Macy2018-05-241-1/+0
| | | | Notes: svn path=/head/; revision=334156
* libpmcstat: import aliases table and bug fixesMatt Macy2018-05-241-3/+40
| | | | Notes: svn path=/head/; revision=334134
* fix !amd64 signature for pmu_sample_rate_getMatt Macy2018-05-241-1/+1
| | | | Notes: svn path=/head/; revision=334130
* libpmcstat: compile in events based on json descriptionMatt Macy2018-05-24238-2/+111565
| | | | Notes: svn path=/head/; revision=334128
* hwpmc: add thread id field to callchain and context switch records to allow ↵Matt Macy2018-05-232-0/+7
| | | | | | | | | | | | | | | filtering on thread in post-processing. To generate stacks for just ${THREADID}: pmcstat -R ${PREFIX}.pmcstat -L ${THREADID} -z100 -G ${PREFIX}.stacks Sponsored by: Limelight Networks Notes: svn path=/head/; revision=334108
* pmcstat: add option to not decode the leaf function in top modeMatt Macy2018-05-221-0/+1
| | | | | | | | -I will allow the user to see the hot instruction in question as opposed getting the name of the function Notes: svn path=/head/; revision=334017
* Fix bug: increment the value of pmcstat_npmcs instead of moving pointerRuslan Bukin2018-01-161-1/+1
| | | | | | | | | | | | | | | | to the next int position. Bug was introduced in r324959 ("Extract a set of pmcstat functions and interfaces to the new internal library -- libpmcstat.") This fixes pmcstat top mode (-T) operation. Example: pmcstat -n1 -S clock.hard -T Reported by: Peter Holm <peter@holm.cc> Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=328044
* DIRDEPS_BUILD: Connect new directories.Bryan Drewery2017-10-311-0/+15
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325187
* Extract a set of pmcstat functions and interfaces to the new internalRuslan Bukin2017-10-248-0/+2372
library -- libpmcstat. This includes PMC logging module, symbols lookup functions, ELF parsing, process management, PMC attachment, etc. This allows to reuse code while building new hwpmc(4)-based applications. Also add pmcstat_symbol_search_by_name() function that allows to find mapped IP range for a given function name. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D12718 Notes: svn path=/head/; revision=324959