Re: Consumers of libpmc/hwpmc
Paulo Fragoso <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.hackers |
|---|---|
| Message-ID | <[email protected]> |
Hello Ali, I've tested your patches on AMD Ryzen 5600X (Family 19h / Zen 3) running FreeBSD 16.0-CURRENT. We don't have PAPI or AMDuProf for performance analysis in our labs infrastructure. Regarding the changes you mentioned: PR #2076 (rdtsc instead of rdtscp for timestamps): Tested on Zen 3 — the patch consistently reduces discarded PMC events by ~11% across all sampling rates (1000 to 128000 samples/sec) with no panics or NMI errors. Full results posted at https://github.com/freebsd/freebsd-src/pull/2076 GET_CAPS (44a983d, PR #2058): Tested on the same hardware running 67b918e03475 — pmcstat works correctly with the new PMC_OP_GETCAPS ioctl path on Zen 3. No regressions observed. I'm happy to continue testing your upcoming changes on Ryzen 5600X hardware as they land. Regards, Paulo NLINK Em 20/03/2026 17:00, Ali Mashtizadeh escreveu: > Hello Adrian, > > I don't see anything after a quick search. If you find a link to the source, please send it my way. > > At the moment the only breaking changes will affect users of the pmclog APIs. > - Andre has a diff up to fix the timestamp (this change's libpmc's pmclog_read but not the kernel interface). This was a half baked feature that never worked as documented and it's unclear anyone is using it. > - I plan to change map-in/out pmclog events to report all map in/out events and extend the fields to report the length, file offset and flags. We see some PCs that nobody seems to resolve correctly into a symbol, with IBS we now care about the address of the load or store, and this makes it easier for tools to lazily pull in elf info. > - I also plan to add a header with information that I need for analysis tools (e.g. cpuid, numa topology). > > Existing tools also might want to make some changes for the following for new types of counters. > - GET_CAPS, domain and system-wide uncore counters > - Multipart payloads that allow extra information to be added to the callchain (AMD IBS) uses this. > > I have a new framework/analysis passes for working with existing PMC data and the new AMD IBS bits I wrote. Eventually I'd like to see these hooked up to Intel PEBS and ARM PT as well. > > Best, > Ali > > > On Fri, Mar 20, 2026 at 10:27 AM Adrian Chadd <[email protected] <mailto:[email protected]>> wrote: > > there are some, i'm tinkering with something from sandvine (whose name > escapes me, even though I was tinkering with it two weeks ago!) > > What core changes are you thinking about? > > IMHO i think it'd be fine to break api a bit after such a long time > being stale.. > > > > -adrian > > On Thu, 19 Mar 2026 at 14:46, Ali Mashtizadeh <[email protected] <mailto:[email protected]>> wrote: > > > > Hello everyone, > > > > I've been doing a lot of work on improving pmc/hwpmc on AMD systems but we need to make a few improvements to the pmc core. > > > > To be aware of compatibility issues, I was wondering if there are any 3rd party consumers of libpmc/hwpmc outside of PAPI and AMDuProf? > > > > Best, > > Ali >