summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Medhurst2014-08-01 07:32:58 -0500
committerJon Medhurst2014-08-01 07:33:21 -0500
commitbc8a84cf0b138a2951679581453da7bd93003db6 (patch)
treeb94eb00f90c24063053d99bea588fbbd493076ef /README_Streamline.txt
parentba783f1443773505231ac2808c9a3716c3c2f3ae (diff)
downloadarm-ds5-gator-DS-5.19.tar.gz
arm-ds5-gator-DS-5.19.tar.xz
arm-ds5-gator-DS-5.19.zip
gator: Version 5.19DS-5.19-tiDS-5.19
Signed-off-by: Jon Medhurst <tixy@linaro.org> On branch master Changes not staged for commit: modified: README_Streamline.txt no changes added to commit (use "git add" and/or "git commit -a") Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'README_Streamline.txt')
-rwxr-xr-xREADME_Streamline.txt51
1 files changed, 42 insertions, 9 deletions
diff --git a/README_Streamline.txt b/README_Streamline.txt
index df3f923..54791c0 100755
--- a/README_Streamline.txt
+++ b/README_Streamline.txt
@@ -2,7 +2,7 @@
2*** Purpose *** 2*** Purpose ***
3 3
4Instructions on setting up ARM Streamline on the target. 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. A new early access feature allows the gator daemon can run without the gator driver by using userspace APIs with reduced functionality when using Linux 3.12 or later. 5The gator driver and gator daemon are required to run on the ARM Linux target in order for ARM Streamline to operate. A new early access feature allows the gator daemon can run without the gator driver by using userspace APIs with reduced functionality when using Linux 3.4 or later.
6The driver should be built as a module and the daemon must run with root permissions on the target. 6The driver should be built as a module and the daemon must run with root permissions on the target.
7 7
8*** Introduction *** 8*** Introduction ***
@@ -14,7 +14,7 @@ A Linux development environment with cross compiling tools is most likely requir
14 -First, check if the kernel has the proper configuration options (see below). Profiling cannot occur using a kernel that is not configured properly, a new kernel must be created. See if /proc/config.gz exists on the target. 14 -First, check if the kernel has the proper configuration options (see below). Profiling cannot occur using a kernel that is not configured properly, a new kernel must be created. See if /proc/config.gz exists on the target.
15 -Second, given a properly configured kernel, check if the filesystem contains the kernel source/headers, which can be used to re-create the gator driver. These files may be located in different areas, but common locations are /lib/modules/ and /usr/src. 15 -Second, given a properly configured kernel, check if the filesystem contains the kernel source/headers, which can be used to re-create the gator driver. These files may be located in different areas, but common locations are /lib/modules/ and /usr/src.
16 -If the kernel is not properly configured or sources/headers are not available, the developer is on their own and kernel creation is beyond the scope of this document. Note: It is possible for a module to work when compiled against a similar kernel source code, though this is not guaranteed to work due to differences in kernel structures, exported symbols and incompatible configuration parameters. 16 -If the kernel is not properly configured or sources/headers are not available, the developer is on their own and kernel creation is beyond the scope of this document. Note: It is possible for a module to work when compiled against a similar kernel source code, though this is not guaranteed to work due to differences in kernel structures, exported symbols and incompatible configuration parameters.
17 -If the target is running Linux 3.12 or later the kernel driver is not required and userspace APIs will be used instead. 17 -If the target is running Linux 3.4 or later the kernel driver is not required and userspace APIs will be used instead.
18 18
19*** Kernel configuration *** 19*** Kernel configuration ***
20 20
@@ -59,8 +59,7 @@ If a device tree is used it must include the pmu bindings, see Documentation/dev
59*** Building the gator module *** 59*** Building the gator module ***
60 60
61To create the gator.ko module, 61To create the gator.ko module,
62 cd /path/to/gator/driver-src 62 tar xzf /path/to/DS-5/arm/gator/driver-src/gator-driver.tar.gz
63 tar xzf gator-driver.tar.gz
64 cd gator-driver 63 cd gator-driver
65 make -C <kernel_build_dir> M=`pwd` ARCH=arm CROSS_COMPILE=<...> modules 64 make -C <kernel_build_dir> M=`pwd` ARCH=arm CROSS_COMPILE=<...> modules
66for example when using the linaro-toolchain-binaries 65for example when using the linaro-toolchain-binaries
@@ -78,10 +77,14 @@ Edit Kconfig in the kernel drivers folder and add this before the last endmenu
78 source "drivers/gator/Kconfig" 77 source "drivers/gator/Kconfig"
79You can now select gator when using menuconfig while configuring the kernel and rebuild as directed 78You can now select gator when using menuconfig while configuring the kernel and rebuild as directed
80 79
80*** Use the prebuilt gator daemon ***
81
82A prebuilt gator daemon is provided at /path/to/DS-5/arm/gator/gatord. This gator daemon should work in most cases so building the gator daemon is only required if the prebuilt gator daemon doesn't work.
83To improve portablility gatord is statically compiled against musl libc from http://www.musl-libc.org/releases/musl-1.0.2.tar.gz instead of glibc. The gator daemon will work correctly with either glibc or musl.
84
81*** Building the gator daemon *** 85*** Building the gator daemon ***
82 86
83cd /path/to/gator/daemon-src 87tar -xzf /path/to/DS-5/arm/gator/daemon-src/gator-daemon.tar.gz
84tar -xzf gator-daemon.tar.gz (may need to issue with 'sudo')
85For Linux targets, 88For Linux targets,
86 cd gator-daemon 89 cd gator-daemon
87 make CROSS_COMPILE=<...> # For ARMv7 targets 90 make CROSS_COMPILE=<...> # For ARMv7 targets
@@ -105,7 +108,7 @@ gator.ko must be located in the same directory as gatord on the target or the lo
105With root privileges, run the daemon 108With root privileges, run the daemon
106 sudo ./gatord & 109 sudo ./gatord &
107Note: gatord requires libstdc++.so.6 which is usually supplied by the Linux distribution on the target. A copy of libstdc++.so.6 is available in the DS-5 Linux example distribution. 110Note: gatord requires libstdc++.so.6 which is usually supplied by the Linux distribution on the target. A copy of libstdc++.so.6 is available in the DS-5 Linux example distribution.
108If gator.ko is not loaded and is not in the same directory as gatord when using Linux 3.12 or later, gatord can run without gator.ko by using userspace APIs. Not all features are supported by userspace gator. If /dev/gator/version does not exist after starting gatord it is running userspace gator. 111If gator.ko is not loaded and is not in the same directory as gatord when using Linux 3.4 or later, gatord can run without gator.ko by using userspace APIs. Not all features are supported by userspace gator. If /dev/gator/version does not exist after starting gatord it is running userspace gator.
109 112
110*** Customizing the l2c-310 Counter *** 113*** Customizing the l2c-310 Counter ***
111 114
@@ -123,7 +126,7 @@ CCN-504 is disabled by default. To enable CCN-504, insmod gator module with the
123Recommended compiler settings: 126Recommended compiler settings:
124 "-g": Debug information, such as line numbers, needed for best analysis results. 127 "-g": Debug information, such as line numbers, needed for best analysis results.
125 "-fno-inline": Speed improvement when processing the image files and most accurate analysis results. 128 "-fno-inline": Speed improvement when processing the image files and most accurate analysis results.
126 "-fno-omit-frame-pointer": ARM EABI frame pointers (Code Sourcery cross compiler) allow recording of the call stack with each sample taken when in ARM state (i.e. not -mthumb). 129 "-fno-omit-frame-pointer": ARM EABI frame pointers allow recording of the call stack with each sample taken when in ARM state (i.e. not -mthumb).
127 "-marm": This option is required if your compiler is configured with --with-mode=thumb, otherwise call stack unwinding will not work. 130 "-marm": This option is required if your compiler is configured with --with-mode=thumb, otherwise call stack unwinding will not work.
128 131
129*** Hardfloat EABI *** 132*** Hardfloat EABI ***
@@ -132,6 +135,35 @@ To compile for non-hardfloat targets it is necessary to add options '-marm -marc
132The armv5t_mtx filesystem is provided as part of the "DS-5 Linux Example Distribution" package which can be downloaded from the DS-5 Downloads page. 135The armv5t_mtx filesystem is provided as part of the "DS-5 Linux Example Distribution" package which can be downloaded from the DS-5 Downloads page.
133Attempting to run an incompatible binary often results in the confusing error message "No such file or directory" when clearly the file exists. 136Attempting to run an incompatible binary often results in the confusing error message "No such file or directory" when clearly the file exists.
134 137
138*** Mali GPU ***
139
140Streamline supports Mali-400, 450, T6xx, and T7xx series GPUs with hardware activity charts, hardware & software counters and an optional 'film strip' showing periodic framebuffer snapshots. Support is chosen at build time and only one type of GPU (and version of driver) is supported at once. For best results build gator in-tree at .../drivers/gator and use the menuconfig options. Details of what these mean or how to build out of tree below.
141
142Mali-4xx:
143 ___To add Mali-4xx support to gator___
144 GATOR_WITH_MALI_SUPPORT=MALI_4xx # Set by CONFIG_GATOR_MALI_4XXMP
145 CONFIG_GATOR_MALI_PATH=".../path/to/Mali_DDK_kernel_files/src/devicedrv/mali" # gator source needs to #include "linux/mali_linux_trace.h"
146 GATOR_MALI_INTERFACE_STYLE=<3|4> # 3=Mali-400 DDK >= r3p0-04rel0 and < r3p2-01rel3
147 # 4=Mali-400 DDK >= r3p2-01rel3
148 # (default of 4 set in gator-driver/gator_events_mali_4xx.c)
149 ___To add the corresponding support to Mali___
150 Userspace needs MALI_TIMELINE_PROFILING_ENABLED=1 MALI_FRAMEBUFFER_DUMP_ENABLED=1 MALI_SW_COUNTERS_ENABLED=1
151 Kernel driver needs USING_PROFILING=1 # Sets CONFIG_MALI400_PROFILING=y
152 See the DDK integration guide for more details (the above are the default in later driver versions)
153
154Mali-T6xx/T7xx:
155 ___To add Mali-T6xx support to gator___
156 GATOR_WITH_MALI_SUPPORT=MALI_T6xx # Set by CONFIG_GATOR_MALI_T6XX
157 DDK_DIR=".../path/to/Mali_DDK_kernel_files" # gator source needs access to headers under .../kernel/drivers/gpu/arm/...
158 # (default of . suitable for in-tree builds)
159 ___To add the corresponding support to Mali___
160 Userspace (scons) needs gator=1
161 Kernel driver needs CONFIG_MALI_GATOR_SUPPORT=y
162 See the DDK integration guide for more details
163
164*** Polling /dev, /sys and /proc files ***
165Gator supports reading arbitrary /dev, /sys and /proc files 10 times a second. It will either interpret the file contents as a number or use a POSIX extended regex to extract the number, see events-Filesystem.xml for examples.
166
135*** Bugs *** 167*** Bugs ***
136 168
137There is a bug in some Linux kernels where perf misidentifies the CPU type. To see if you are affected by this, run ls /sys/bus/event_source/devices/ and verify the listed processor type matches what is expected. For example, an A9 should show the following. 169There is a bug in some Linux kernels where perf misidentifies the CPU type. To see if you are affected by this, run ls /sys/bus/event_source/devices/ and verify the listed processor type matches what is expected. For example, an A9 should show the following.
@@ -139,7 +171,7 @@ There is a bug in some Linux kernels where perf misidentifies the CPU type. To s
139 ARMv7_Cortex_A9 breakpoint software tracepoint 171 ARMv7_Cortex_A9 breakpoint software tracepoint
140To work around the issue try upgrading to a later kernel or comment out the gator_events_perf_pmu_cpu_init(gator_cpu, type); call in gator_events_perf_pmu.c 172To work around the issue try upgrading to a later kernel or comment out the gator_events_perf_pmu_cpu_init(gator_cpu, type); call in gator_events_perf_pmu.c
141 173
142There is a bug in some Linux kernels where an Oops may occurs when using userspace gator and a core is offlined. The fix was merged into mainline in 3.14-rc5, see http://git.kernel.org/tip/e3703f8cdfcf39c25c4338c3ad8e68891cca3731, and as been backported to older kernels. 174There is a bug in some Linux kernels where an Oops may occur when using userspace gator and a core is offlined. The fix was merged into mainline in 3.14-rc5, see http://git.kernel.org/tip/e3703f8cdfcf39c25c4338c3ad8e68891cca3731, and as been backported to older kernels.
143 175
144If you see this error when using SELinux, ex: Android 4.4 or later 176If you see this error when using SELinux, ex: Android 4.4 or later
145 # ./gatord 177 # ./gatord
@@ -172,3 +204,4 @@ update-rc.d rungator.sh defaults
172*** GPL License *** 204*** GPL License ***
173 205
174For license information, please see the file LICENSE after unzipping driver-src/gator-driver.tar.gz. 206For license information, please see the file LICENSE after unzipping driver-src/gator-driver.tar.gz.
207The prebuilt gatord uses musl from http://www.musl-libc.org/releases/musl-1.0.2.tar.gz for musl license information see the COPYRIGHT file in the musl tar file.