MIPS linux-2.6.12 (highly patched) + LTTng-0.5.69 + ltt-control-0.10-12062006

David Wuertele <[email protected]> Mon, 15 Sep 2008 21:09:42 +0000 (UTC)
Newsgroups gmane.linux.kernel.tracing
Message-ID <[email protected]>
I am having no success using LTTng to instrument an embedded MIPS system with a
vendor-supplied linux-2.6.12.  I tried many different versions of the LTTng
patches, but the only way I could get everything to compile and boot was as
follows:

  1.  port relayfs from 2.6.16 back to my 2.6.12, replaced all use of mutexes
      with semaphores.

  2.  backport atomic_cmpxchg from 2.6.16 to 2.6.12

  3.  integrate patch-2.6.16-lttng-0.5.69.tar.bz2

  4.  build ltt-control-0.10-12062006 and install it in an NFS rootfs

  5.  boot my kernel from NFS

  6.  mount -t tmpfs none /tmp
      mount -t tmpfs none /mnt
      mkdir -p /mnt/debugfs
      mount debugfs /mnt/debugfs -o rw

Here's the output from lttctl:

  bash-3.2# lttctl -n trace -d -l /mnt/debugfs/ltt -t /tmp/trace
  Linux Trace Toolkit Trace Control
  [4294701.895000] ltt_control : trace trace

  Controlling trace : trace

  Linux Trace Toolkit Trace Daemon

  Reading from relayfs directory : /mnt/debugfs/ltt/trace
  Writing to trace directory : /tmp/trace

  signal 18 received
  Creating supplementary trace files
  Appending facility file kernel_arch_arm.xml
  Appending facility file memory.xml
  Appending facility file user_generic.xml
  Appending facility file network_ip_interface.xml
  Appending facility file ipc.xml
  Appending facility file socket.xml
  Appending facility file stack_arch_i386.xml
  Appending facility file core.xml
  Appending facility file timer.xml
  [4294702.009000] ltt_control : trace trace
  Appending facility file process.xml
  Appending facility file kernel_arch_c2.xml
  Appending facility file fs.xml
  Appending facility file statedump.xml
  Appending facility file network.xml
  Appending facility file locking.xml
  Appending facility file kernel.xml
  Appending facility file kernel_arch_mips.xml
  Appending facility file kernel_arch_i386.xml

At this point, the system appears to hang, but if I come back in a half hour, I
have a prompt again.

Here's what I don't understand:

1.  Am I even close to the recommended process?

2.  Is lttctl supposed to hang for a half hour like that?

3.  I've seen recommendations to use genevent to generate headers for the
    kernel ltt.  The instructions for genevent say use the XML in
    LinuxTraceToolkitViewer/facilities.  But there is no such directory.  There
    *is* such a directory in ltt-control-0.10-12062006/facilities.  Is that the
    right one to use?

4.  Given that ltt-control-0.10 is supposed to be compatible with LTTng-0.5.69,
    does that mean I don't need to run genevent?

5.  Do I need to customize these facility XML files?  Is there any
    documentation on how to do that?

6.  Can I have LTTng write the trace files to a path on the NFS rootfs, or
    should I use tmpfs mounts?

Thanks,
Dave