hwpmc and existing processes

Adrian Chadd adrian at freebsd.org
Wed Jun 25 21:59:17 UTC 2008

I've been looking at hwpmc a little more lately (argh). One of the
things which annoys me is that although hwpmc can capture events from
existing processes pmcstat doesn't generate summary output for them.

If this is still the case (I've not checked -current over my exam
period!), the required changes don't look -that- hard. pmc receives
events from hwpmc about the exec and mappings for the binary and
libraries; I wonder if pmcstat could be taught to "fake"
exec/map-in/map-out entries for stats from processes it hasn't seen
yet. It'd also be nice if it recorded some kind of timestamp from the
file(s) in question so it could notice if the underlying
libraries/binaries have changed between gathering and reporting.

I sort of need this with Squid so I can profile things after a "burnin
period". I can currently fake it by starting squid + hwpmc and
removing the first n kernel/user events from the pmcstat data file.
This is slightly silly. :)

Has anyone else looked into this?


More information about the freebsd-current mailing list