Basic Instructions
==================
1) Build sep and pax drivers.

	cd sepdk/modules
	make

   sep.ko is the sampling driver.  pax.ko is used by userspace
   collectors to ensure multiple sampling runs cannot execute
   in parallel.

2) Install drivers

	kldload sepdk/modules/sep/sep.ko
	kldload sepdk/modules/pax/pax.ko

   or:

	cd sepdk/modules
	make install
	kldload sep pax

3) Run sep program to collect samples.

   cd bin
   ./sep -start -d 20 -ec <event list> -out <sample root name>

   Intel VTune(tm) Amplifier for Systems has event lists defined under config/analysis_type
   that will enable analysis viewpoints.These can be obtained by running the following command.
   cd bin
   ./sep -el

4) Copy binaries and symbols to Windows/Linux system for import.
   For kernel and modules, both binaries and .symbols files will
   be needed.  It is not necessary to copy the .debug files from
   the kernel build tree.

5) Create VTune AXE project, setting up search paths for source
   and symbols.

6) Copy and import .tb6 data files.  Default viewpoint will only
   show hardware counters, but pulldown menu at the top can be used
   to pick different viewpoints.

Additional Tips
===============

1) By default, sep puts temporary files in /tmp.  These files can
   get quite large (>10MB) during sampling.  Users can specify
   SEP_TMP_DIR to specify a different temp file location.

Restrictions
============

1) HWPMC_HOOKS must be enabled in the kernel configuration.  This is
the default starting with FreeBSD 8.

2) The sep toolchain requires libiconv.  This can be installed
from /usr/ports/converters/libiconv.

3) Executable sections unmapped via dlclose() during sampling are not
currently tracked in the results file.  This is planned for a future
release of the FreeBSD drivers, but will likely require kernel patches
since there is no way currently in the FreeBSD kernel to register for
these types of unmap notifications.

4) The drivers only work on amd64 kernels.  There is no plan for
adding i386 or ia64 support on FreeBSD.

5) Both kernel/module binaries and symbols files must be in the AXE
search path when importing data.  AXE will use the gnu_debuglink
ELF header to match the binary to the symbols file.
