*** Purpose *** Instructions on setting up ARM Streamline on the target. The gator driver and gator daemon are required to run on the ARM linux target in order for ARM Streamline to operate. The driver should be built as a module and the daemon must run with root permissions on the target. *** Introduction *** A linux development environment with cross compiling tools is most likely required, depending on what is already created and provided. -For users, the ideal environment is to be given a BSP with gatord and gator.ko already running on a properly configured kernel. In such a scenario, a development environment is not needed, root permission may or may not be needed (gatord must be executed with root permissions but can be automatically started, see below), and the user can run Streamline and profile the system without any setup. -The ideal development environment has the kernel source code available to be rebuilt, usually by cross-compiling on a host machine. This environment allows the greatest flexibility in configuring the kernel and building the gator driver module. -However, it is possible that a user/developer has a kernel but does not have the source code. In this scenario it may or may not be possible to obtain a valid profile. -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. -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. -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. *** Kernel configuration *** menuconfig options (depending on the kernel version, the location of these configuration settings within menuconfig may differ) - General Setup - Kernel Performance Events And Counters - [*] Kernel performance events and counters (enables CONFIG_PERF_EVENTS) - [*] Profiling Support (enables CONFIG_PROFILING) - Kernel Features - [*] High Resolution Timer Support (enables CONFIG_HIGH_RES_TIMERS) - [*] Use local timer interrupts (only required for SMP, enables CONFIG_LOCAL_TIMERS) - [*] Enable hardware performance counter support for perf events (enables CONFIG_HW_PERF_EVENTS) - CPU Power Management - CPU Frequency scaling - [*] CPU Frequency scaling (enables CONFIG_CPU_FREQ) - Kernel hacking - [*] Compile the kernel with debug info (optional, enables CONFIG_DEBUG_INFO) - [*] Tracers - [*] Trace process context switches and events (#) (#) The "Trace process context switches and events" is not the only option that enables tracing (CONFIG_GENERIC_TRACER or CONFIG_TRACING) and may not be visible in menuconfig as an option if other trace configurations are enabled. Other trace configurations being enabled is sufficient to turn on tracing. The configuration options: CONFIG_GENERIC_TRACER or CONFIG_TRACING CONFIG_PROFILING CONFIG_HIGH_RES_TIMERS CONFIG_LOCAL_TIMERS (for SMP systems) CONFIG_PERF_EVENTS and CONFIG_HW_PERF_EVENTS (kernel versions 3.0 and greater) CONFIG_DEBUG_INFO (optional, used for analyzing the kernel) CONFIG_CPU_FREQ (optional, provides frequency setting of the CPU) These may be verified on a running system using /proc/config.gz (if this file exists) by running 'zcat /proc/config.gz | grep