| |||
Home > Getting Started with ARM Streamline > Setting up the gator driver and daemon |
To enable profiling, you must load the gator daemon and driver on your target.
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.
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:
Navigate to the root source directory of the Linux kernel.
Invoke the following command in your shell:
make ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- Your_SoC
_defconfig
Invoke the following command in your shell:
make ARCH=arm make ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- menuconfig
Activate the Profiling Support option in General Setup: CONFIG_PROFILING=y.
Under Kernel hacking, activate the Tracers and Trace process context switches and events options: CONFIG_FTRACE=y and CONFIG_ENABLE_DEFAULT_TRACERS=y.
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
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
Now that you have all of the necessary files in place, it
is time to start the gator daemon. To run gatord
:
Load the kernel onto the target
Copy gatord
and gator.ko
into
the file system on the target
gatord
is located in
on
your host. installdir
/arm/armv5t/gatord
must be placed in the same
directory as the gator.ko
on the target.
Ensure gatord has execute permission by invoking the following command:
chmod +x gatord
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.