MmioTrace2_6_25

Mmiotrace for kernel 2.6.25

This patch is for 2.6.25: http://jumi.lut.fi/~paalanen/scratch/mmio25/fullpatch-preview2.patch

It provides a built-in version of mmiotrace, no more kernel modules, no more hook scripts. It is experimental and still uses the ./mmio-trace user space application to log events.

Installation:

  1. Get 2.6.25 sources and apply the patch.
  2. Under Kernel hacking, enable "Memory mapped IO tracing". As usual, it requires RELAY and DEBUG_FS, and also DEBUG_KERNEL. The test module is not necessary.
  3. Build and install your kernel.
  4. Build the user space part from git://people.freedesktop.org/~pq/mmio-trace by make userspace

Tracing:

  1. Press Alt+Sysrq+8 or use another way to set console loglevel to debug level ($dmesg -n8)
  2. mount debugfs to /debug

  3. enable mmiotracing: echo 1 > /debug/mmio-trace/enabled

  4. start the mmio-trace process: ./mmio-trace &

  5. load the driver you are tracing

When you have finished, disable mmiotrace by echo 0 > /debug/mmio-trace/enabled and terminate the mmio-trace process. You should be able to disable mmiotrace at any time, especially during traced driver activity.

You can enable mmiotrace during boot by passing the kernel option mmiotrace.enable_now=1. When user space comes up, start ./mmio-trace and check your kernel log.

If enabling mmiotrace gives you the error "mmiotrace: relay app channel creation failed", you probably forgot to kill the mmio-trace process before re-enabling mmiotrace.

The marker file has moved from /proc/mmio-marker to /debug/mmio-trace/marker.

You should check the kernel log for errors, oopses, and buffer full messages