summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Moll2011-03-14 10:21:50 -0500
committerPawel Moll2011-03-14 10:21:50 -0500
commit4b1652908140265b28795a529b73ebb41d690c15 (patch)
tree89c9843690ed739683e54b704097469cc6f3900f /README_Streamline.txt
downloadarm-ds5-gator-4b1652908140265b28795a529b73ebb41d690c15.tar.gz
arm-ds5-gator-4b1652908140265b28795a529b73ebb41d690c15.tar.xz
arm-ds5-gator-4b1652908140265b28795a529b73ebb41d690c15.zip
gator: ARM DS-5.3 Streamline gator driver
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Diffstat (limited to 'README_Streamline.txt')
-rw-r--r--README_Streamline.txt117
1 files changed, 117 insertions, 0 deletions
diff --git a/README_Streamline.txt b/README_Streamline.txt
new file mode 100644
index 0000000..4c52b7d
--- /dev/null
+++ b/README_Streamline.txt
@@ -0,0 +1,117 @@
1
2*** Purpose ***
3
4Instructions on setting up ARM Streamline on the target.
5The gator driver and gator daemon are required to run on the ARM linux target in order for ARM Streamline to operate.
6The driver should be built as a module and the daemon must run with root permissions on the target.
7
8*** Preparing and building the kernel ***
9
10cd into the root source dir of the linux kernel
11make ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- <platform_defconfig> (choose the appropriate configuration for your board)
12make ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- menuconfig
13
14Required Kernel Changes (depending on the kernel version, the location of these configuration settings within menuconfig may be different)
15- General Setup
16 - [*] Profiling Support
17- Kernel hacking
18 - [*] Tracers
19 - [*] Trace process context switches and events
20- Kernel Features
21 - [*] High Resolution Timer Support
22
23The "context switches and events" option will not be available if other trace configurations are enabled. Other trace configurations being enabled is sufficient to turn on context switches and events.
24
25Optional Kernel Changes (depending on the kernel version, the location of these configuration settings within menuconfig may be different)
26Note: Configurations may not be supported on all targets
27- System Type
28 - [*] <SoC name> debugging peripherals (enable core performance counters on supported SoCs) /* kernels before 2.6.35 */
29
30make -j5 ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- uImage
31
32*** Building the gator module ***
33
34To create the gator.ko module,
35 cd /ds-5-install-directory/arm/src
36 tar xzf gator-driver.tar.gz
37 cd gator-driver
38 make -C <kernel_build_dir> M=`pwd` ARCH=arm CROSS_COMPILE=<...> modules
39for example
40 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
41If successful, a gator.ko module should be generated
42
43*** Compiling an application or shared library ***
44
45Recommended compiler settings:
46 "-g": Debug symbols needed for best analysis results.
47 "-fno-inline": Speed improvement when processing the image files and most accurate analysis results.
48 "-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).
49
50*** Running gator ***
51
52Load the kernel onto the target and copy gatord and gator.ko into the target's filesystem.
53gatord is located in <installdir>/arm/armv5t/.
54Ensure gatord has execute permissions
55 chmod +x gatord
56gator.ko must be located in the same directory as gatord on the target.
57With root privileges, run the daemon
58 sudo ./gatord &
59
60*** Profiling the kernel (optional) ***
61
62make ARCH=arm CROSS_COMPILE=$(CROSS_TOOLS}/bin/arm-none-linux-gnueabi- menuconfig
63- Kernel Hacking
64 - [*] Compile the kernel with debug info
65
66make -j5 ARCH=arm CROSS_COMPILE=${CROSS_TOOLS}/bin/arm-none-linux-gnueabi- uImage
67Use vmlinux as the image for debug symbols in Streamline.
68Drivers may be profiled using this method by statically linking the driver into the kernel image.
69Note that the gator driver does not perform kernel call stack recording.
70
71*** Automatically start gator on boot (optional) ***
72
73cd /etc/init.d
74vi rungator.sh
75 #!/bin/bash
76 /path/to/gatord &
77update-rc.d rungator.sh defaults
78
79*** Driver Sources ***
80
81Gator Sources
82 backtrace.c
83 cpu_buffer.c
84 cpu_fifo.c
85 cpu_fifo.h
86 gator_annotate.c
87 gator_events_irq.c
88 gator_init.c
89 gator_interrupt.c
90 gator_pmnc_armv7.c
91 gator_pmnc_none.c
92 gator_schedtrace.c
93 gator_setup.c
94 gator_timer.c
95 gator_traceprobe.h
96
97Oprofile Sources // function names updated to avoid Oprofile collisions
98 buffer_sync.c
99 buffer_sync.h
100 cpu_buffer.h
101 event_buffer.c
102 event_buffer.h
103 oprof.h
104 oprofile.h
105 oprofile_files.c
106 oprofile_stats.c
107 oprofile_stats.h
108 timer_int.c
109
110Modified Oprofile Sources
111 buffer_sync.c // modify sample contract to allow bad 'mm' or cookie
112 oprofilefs.c // gatorfs and magic number
113 oprof.c // updated module name and author
114
115*** GPL License ***
116
117For license information, please see the file LICENSE.