You copied the Doc URL to your clipboard.

Setting up an Android target

These instructions are specific to targets running Android.

Prepare and build your kernel

You must enable certain kernel configuration options to run Streamline. In the kernel configuration menu, use the arrow keys to navigate to the desired submenu and press Enter. Each submenu is listed with the action you need to take within it.

General Setup

Make sure the Profiling Support option is enabled.

Kernel Hacking

In the Kernel Hacking submenu navigate to the Tracers submenu and press Enter. Make sure the Trace process context switches option is enabled.

Kernel

Make sure Profiling Support is enabled.

Kernel Features

Make sure the High Resolution Timer Support is enabled. Enable Use local timer interrupts if you are using an SMP target.

If these options are not set correctly, you must change them and rebuild your kernel. If they are set correctly, you are ready to build and install the Gator driver.

Build the Gator module

To use Streamline with your Android target, you must build the Gator driver, gator.ko and place it in the same directory as the Gator daemon, gatord, on the target file system. Transfer the gator driver module sources from your host to the target. They are located on your host here:

installdir/arm/gator/src/gator-driver.tar.gz

Assuming that you have unzipped the file and that you have all of the required tools for building kernel modules, enter the following command on your target to create the gator.ko module:

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

Connect to the target

Streamline supports connection to your target using ethernet. Using the Android Debug Bridge (ADB) utility that is part of the Android SDK, it is possible to forward a TCP port from the target to your localhost over a USB connection. ADB can also be configured to work over ethernet.

For more information about the Android SDK and ADB setup, see the Android website.

Once ADB is set up, forward the Streamline port to your localhost using the following command:

adb forward tcp:8080 tcp:8080

Copy Gator daemon and module to the target

You must install the version of the Gator daemon, gatord, that is specifically designed for Android. It is located here:

installdir/arm/gator/android/

Transfer the gator binary from this directory on your host to your working directory on your target.

Place the newly built gator module in the same directory on the target as the Gator daemon.

Run the Gator Daemon on your target

Enter the following command to instantiate the Gator driver.

insmod gator.ko

Now run gatord on the target:

./gatord &

Set capture options to support your Android target

In the Capture Options dialog box, opened in the ARM Streamline Data view in Eclipse for DS-5 and enter the ethernet address. If you use ABD to forward the port, enter Localhost in the Address field.

Note

With Android, make sure to add the shared libraries you are interested in profiling to the session using the Program Images section of the Capture Options dialog box.

Was this page helpful? Yes No