You copied the Doc URL to your clipboard.

Setting up the Gator driver and daemon

The Gator daemon and driver collect target metrics and then send them to your host machine.

To enable profiling, load the Gator daemon and driver on your target.

Prerequisites

You need the following tools on your host to build the Linux kernel and the Gator driver:

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

  • Either the cross compiler for building the Linux kernel or the ARM Linux GCC that comes with DS-5.

Setting up the Gator driver and daemon

To set up the Gator driver and daemon, first prepare and build your kernel by following these steps:

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

  2. Enter the following command in your shell:

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

  3. Enter the following command in your shell:

    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. Enter the following command in your shell to build the kernel:

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

Building the Gator module

To use Streamline with your ARM 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, enter the following command to create the gator.ko module:

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

Running 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 gator.ko on the target.

  3. To ensure gatord has execute permission, enter the following command:

    chmod +x gatord

  4. After making sure that you have root privileges, enter the following to execute the Gator daemon:

    ./gatord &

By default, gatord uses port 8080 for communication with the host, but you can adjust this by launching gatord with the port number as a parameter and changing the Port option in the Capture Options dialog box. To open the Capture Options dialog box, click Change capture options in the ARM Streamline Data view.