Joseph Koshy > Projects > PMC based Performance Measurement in FreeBSD > Code Snapshots > Patch #8
Patch #8, against -CURRENT of 20 March 2006
Summary
Announcement
## Patch 8 of the hardware PMC support code
This is a code patch for the kernel, libpmc(3), hwpmc(4) and
pmcstat(8).
## What's new
- Sampling of dynamically loaded kernel modules and
and dlopen()'ed shared objects.
- pmcstat(8) supports many new options.
## Using the code
- Download the patch.
- Apply it to a freshly checked out -CURRENT source.
# cd /usr/src
# patch -p1 < PATCH-FILE
- Update 'world' following the usual procedure. If you are
impatient you can get by updating libpmc, pmcstat, and
pmccontrol and rebuilding your kernel.
- Add "options HWPMC_HOOKS" to your kernel config file if
not already present. You must recompile your kernel
and boot into.
- Load the hwpmc(4) kernel module.
(* load the kernel module *)
# kldload hwpmc
- Use pmcstat(8) to collect samples and generate gprof profiles.
(* collect event samples *)
# pmcstat -S instructions -O /tmp/foo.out
(* generate gprof compatible profiles *)
# pmcstat -R /tmp/foo.out -g
Related Links
|
Contact: jkoshy@FreeBSD.org
|
Last Modified:
Sat Apr 21 22:53:24 2007
|
|