Date: Mon, 4 Jul 2022 16:43:03 GMT From: Andrew Gallatin <gallatin@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 0aa150775179 - main - pmcstat: fix log analysis Message-ID: <202207041643.264Gh3ZI054655@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=0aa150775179a4f683fade5f1d6325a47b5f695f commit 0aa150775179a4f683fade5f1d6325a47b5f695f Author: Andrew Gallatin <gallatin@FreeBSD.org> AuthorDate: 2022-07-04 16:40:35 +0000 Commit: Andrew Gallatin <gallatin@FreeBSD.org> CommitDate: 2022-07-04 16:42:39 +0000 pmcstat: fix log analysis pmcstat has been broken for analyzing logs since D35342 / b6e28991bf3aadb. This is because the pmc for the first CPU is not added when reading logs because unlike its clones, its event id is not invalid. That causes us to fail the assertion at lib/libpmcstat/libpmcstat_logging.c:293 when encountering samples from cpu0. Fix this by removing the check that the PMC is invalid Reviewed by: tsoome Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D35709 --- usr.sbin/pmcstat/pmcstat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c index 08e43d5d446a..f366e2175a25 100644 --- a/usr.sbin/pmcstat/pmcstat.c +++ b/usr.sbin/pmcstat/pmcstat.c @@ -1187,8 +1187,7 @@ main(int argc, char **argv) */ STAILQ_FOREACH(ev, &args.pa_events, ev_next) { - if (ev->ev_pmcid == PMC_ID_INVALID && - pmc_allocate(ev->ev_spec, ev->ev_mode, + if (pmc_allocate(ev->ev_spec, ev->ev_mode, ev->ev_flags, ev->ev_cpu, &ev->ev_pmcid, ev->ev_count) < 0) err(EX_OSERR,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207041643.264Gh3ZI054655>