Setting up the gator driver and daemon

To enable profiling, you must load the gator daemon and driver on your target.

Prerequisites
  • Linux kernel source code for the target platform. Note that Streamline supports only Linux kernel version 2.6.32 and above.

  • Cross compiler for building the Linux kernel. You could alternatively use the ARM Linux GCC that comes with DS-5.

Show/hideSetting up the gator driver and daemon

The gator daemon and driver set the target up to communicate Streamline session data to the host. They collect the statistics produced by the performance counters and kernel metrics and send them to the host, where you can view them in Eclipse for DS-5.

To install the gator driver and daemon, prepare and build your kernel by following these steps:

  1. Navigate to the root source directory of the Linux kernel.

  2. Invoke the following command in your shell:

    make ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- Your_SoC_defconfig

  3. Invoke the following command in your shell:

    make ARCH=arm make ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- menuconfig

  4. Activate the Profiling Support option in General Setup: CONFIG_PROFILING=y.

  5. Under Kernel hacking, activate the Tracers and Trace process context switches and events options: CONFIG_FTRACE=y and CONFIG_ENABLE_DEFAULT_TRACERS=y.

  6. Invoke the following command in your shell to build the kernel:

    make -j5 ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- uImage

Show/hideBuilding the gator module

To run Streamline against your target, you need to build the gator driver, gator.ko and place it in the same directory as the gator daemon, gatord, on the target file system. Assuming that you have all of the required tools for building kernel modules, invoke the following command to create the gator.ko module:

make -C kernel_build_dir M=`pwd` ARCH=arm CROSS_COMPILE=<...> modules

Show/hideRunning the gator daemon on your target

Now that you have all of the necessary files in place, it is time to start the gator daemon. To run gatord:

  1. Load the kernel onto the target

  2. Copy gatord and gator.ko into the file system on the target

    Note

    gatord is located in installdir/arm/armv5t/ on your host. gatord must be placed in the same directory as the gator.ko on the target.

  3. Ensure gatord has execute permission by invoking the following command:

    chmod +x gatord

  4. Make sure that you have root privileges and enter the following to execute the gator daemon:

    ./gatord &

By default, gatord uses port 8080 for communication with the host, but this can be adjusted by launching gatord with the port number as a parameter and changing the Port option in the run configuration dialog within Eclipse for DS-5.

Show/hideSee also

Copyright © 2010 ARM Limited. All rights reserved.ARM DUI 0482A
Non-ConfidentialID100210