Patch #8

About Articles How to contact me Projects Site Map

Joseph Koshy > Projects > PMC based Performance Measurement in FreeBSD > Code Snapshots > Patch #8

Patch #8, against -CURRENT of 20 March 2006

Summary

Snapshot date Against -CURRENT of date Format Download
20-Mar-2006 20-Mar-2006 Patch (-p1), gzip'ed Download (~23KB)
MD5: 4a745ac7cd8acfdb41cf7c2e0e0c5a04

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
Site Search Google