diff options
-rw-r--r-- | README_Streamline.txt (renamed from driver/README_Streamline.txt) | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/driver/README_Streamline.txt b/README_Streamline.txt index 9b64b8e..0445e3f 100644 --- a/driver/README_Streamline.txt +++ b/README_Streamline.txt | |||
@@ -48,7 +48,7 @@ make -j5 ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- uImag | |||
48 | *** Building the gator module *** | 48 | *** Building the gator module *** |
49 | 49 | ||
50 | To create the gator.ko module, | 50 | To create the gator.ko module, |
51 | cd /ds-5-install-directory/arm/gator/driver-src | 51 | cd /path/to/gator/driver-src |
52 | tar xzf gator-driver.tar.gz | 52 | tar xzf gator-driver.tar.gz |
53 | cd gator-driver | 53 | cd gator-driver |
54 | make -C <kernel_build_dir> M=`pwd` ARCH=arm CROSS_COMPILE=<...> modules | 54 | make -C <kernel_build_dir> M=`pwd` ARCH=arm CROSS_COMPILE=<...> modules |
@@ -56,23 +56,34 @@ for example | |||
56 | make -C /home/username/kernel_2.6.32/ M=`pwd` ARCH=arm CROSS_COMPILE=/home/username/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- modules | 56 | make -C /home/username/kernel_2.6.32/ M=`pwd` ARCH=arm CROSS_COMPILE=/home/username/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- modules |
57 | If successful, a gator.ko module should be generated | 57 | If successful, a gator.ko module should be generated |
58 | 58 | ||
59 | *** Compiling an application or shared library *** | 59 | *** Building the gator daemon *** |
60 | 60 | ||
61 | Recommended compiler settings: | 61 | cd /path/to/gator/daemon-src |
62 | "-g": Debug symbols needed for best analysis results. | 62 | tar -xzf gator-daemon.tar.gz |
63 | "-fno-inline": Speed improvement when processing the image files and most accurate analysis results. | 63 | For Linux, |
64 | "-fno-omit-frame-pointer": ARM EABI frame pointers (Code Sourcery cross compiler) allow the call stack to be recorded with each sample taken when in ARM state (i.e. not -mthumb). | 64 | build with 'make' |
65 | For Android, | ||
66 | mv gator-daemon jni | ||
67 | install the android ndk, see developer.android.com | ||
68 | /path/to/ndk/ndk-build | ||
69 | gatord should now be created and located in libs/armeabi | ||
65 | 70 | ||
66 | *** Running gator *** | 71 | *** Running gator *** |
67 | 72 | ||
68 | Load the kernel onto the target and copy gatord and gator.ko into the target's filesystem. | 73 | Load the kernel onto the target and copy gatord and gator.ko into the target's filesystem. |
69 | gatord is located in <installdir>/arm/gator/linux or <installdir>/arm/gator/android or can be built from source. | ||
70 | Ensure gatord has execute permissions | 74 | Ensure gatord has execute permissions |
71 | chmod +x gatord | 75 | chmod +x gatord |
72 | gator.ko must be located in the same directory as gatord on the target. | 76 | gator.ko must be located in the same directory as gatord on the target. |
73 | With root privileges, run the daemon | 77 | With root privileges, run the daemon |
74 | sudo ./gatord & | 78 | sudo ./gatord & |
75 | 79 | ||
80 | *** Compiling an application or shared library *** | ||
81 | |||
82 | Recommended compiler settings: | ||
83 | "-g": Debug symbols needed for best analysis results. | ||
84 | "-fno-inline": Speed improvement when processing the image files and most accurate analysis results. | ||
85 | "-fno-omit-frame-pointer": ARM EABI frame pointers (Code Sourcery cross compiler) allow the call stack to be recorded with each sample taken when in ARM state (i.e. not -mthumb). | ||
86 | |||
76 | *** Profiling the kernel (optional) *** | 87 | *** Profiling the kernel (optional) *** |
77 | 88 | ||
78 | make ARCH=arm CROSS_COMPILE=$(CROSS_TOOLS}/bin/arm-none-linux-gnueabi- menuconfig | 89 | make ARCH=arm CROSS_COMPILE=$(CROSS_TOOLS}/bin/arm-none-linux-gnueabi- menuconfig |
@@ -82,7 +93,7 @@ make ARCH=arm CROSS_COMPILE=$(CROSS_TOOLS}/bin/arm-none-linux-gnueabi- menuconfi | |||
82 | make -j5 ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- uImage | 93 | make -j5 ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- uImage |
83 | Use vmlinux as the image for debug symbols in Streamline. | 94 | Use vmlinux as the image for debug symbols in Streamline. |
84 | Drivers may be profiled using this method by statically linking the driver into the kernel image or adding the module as an image. | 95 | Drivers may be profiled using this method by statically linking the driver into the kernel image or adding the module as an image. |
85 | Note that the gator driver does not perform kernel call stack recording. | 96 | To perform kernel stack unwinding and module unwinding, edit the Makefile to enable GATOR_KERNEL_STACK_UNWINDING and rebuild gator.ko. |
86 | 97 | ||
87 | *** Automatically start gator on boot (optional) *** | 98 | *** Automatically start gator on boot (optional) *** |
88 | 99 | ||