Download and install Arm Code Advisor
To download and install Arm Code Advisor:
Login at https://silver.arm.com/browse using your Arm developer account. You can create one, if you do not have one.
The Downloads home page appears. If not, click on the Downloads option in the Arm Self Service navigation pane on the left.
Expand the Development Tools option in the list of products available to you. Under Arm HPC Tools, select Arm Code Advisor.
In the Public Downloads section, find the appropriate package for your Linux host platform and select Download Now.
Extract the downloaded package:
tar -xvf <package_name>
<package_name>with the full name of the downloaded package.
Change directory to see the extracted files:
Run the installation script as a privileged user:
% su root Password: ******** % ./<package_name>.sh
Packages are unpacked to
/opt/arm/<package_name>. Optionally, use the
--install-tooption to specify the install location:
% ./<package_name>.sh --install-to <install_dir>
Note: This results in a user-only installation along with the relevant module files. The included uninstall.sh helper script can not uninstall this type of installation.
The installer displays the EULA and prompts you to agree to the terms. To agree, type 'yes' at the prompt.
For more information about the release contents, see the release notes, located in the /opt/arm/<package_name>/share directory.
- Next, configure your Linux environment:
Note: If Environment Modules are not already installed on your machine, see the top of our Environment configuration topic for instructions on how to install them.
To see which Environment Modules are available, run:
% module avail
Note: You might need to configure the
MODULEPATHenvironment variable to include the installation directory:
% export MODULEPATH=$MODULEPATH:/opt/arm/modulefiles/Tip: Add the module load command to your .profile to run it automatically every time you log in.
To configure your Linux environment to make Arm Code Advisor available:
% module load <architecture>/<linux_variant>/<linux_version>/suites/arm-code-advisor/<version>
% module load Generic-AArch64/SUSE/12/suites/arm-code-advisor/1.2
Check your environment by examining the PATH variable. It should contain the appropriate Arm Code Advisor bin directory from /opt/arm:
% echo $PATH /opt/arm/arm-code-advisor-1.2_Generic-AArch64_SUSE-12_aarch64-linux/bin:...
You can also use the
whichcommand to check that the Arm Code Advisor
armcadvisorcommand is available:
% which armcadvisor /opt/arm/arm-code-advisor-1.2_Generic-AArch64_SUSE-12_aarch64-linux/bin/armcadvisor % armcadvisor --help Usage: armcadvisor [subcommand] [flags] armcadvisor [command] ...Note: For information about environment variables used by the Arm-provided suite of HPC tools, see our Environment variables reference topic.
- To ensure that you can run Arm Code Advisor with adequate permissions, modify the
/proc/sys/kernel/perf_event_paranoidsetting to a value of
perf_event_paranoidvalue is set to level
2by default and prevents users from starting Code Advisor, except when logged in as root. The following error message displays if you try to run Code Advisor when the restrictions are too high:
$ armcadvisor collect ./example Starting collection of program [./example] to profile temp in ./armcadvisor/profiles armcadvisor: [ERROR] permission denied
2(default) restrict measurements and prevent Code Advisor functioning correctly. Level
0allows Code Advisor to access CPU-specific data but does not allow access to raw tracepoint samples. Level
-1removes all restrictions.Set the level as follows:
sudo sh -c 'echo 0 > /proc/sys/kernel/perf_event_paranoid'Set the level to persist across reboots of the system as follows:
sudo sh -c 'echo kernel.perf_event_paranoid=0 > /etc/sysctl.d/local.conf'Note: For more information about
perf_eventconfiguration, see http://man7.org/linux/man-pages/man2/perf_event_open.2.html
See our getting started tutorial to learn how to use Arm Code Advisor: