Download and install Arm Code Advisor

To download and install Arm Code Advisor:

  1. 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. 

  2. Expand the Development Tools option in the list of products available to you. Under Arm HPC Tools, select Arm Code Advisor.

  3. In the Public Downloads section, find the appropriate package for your Linux host platform and select Download Now.

  4. Extract the downloaded package:

    tar -xvf <package_name>

    replacing <package_name> with the full name of the downloaded package.

  5. Change directory to see the extracted files:

    cd <package_name>

  6. Run the installation script as a privileged user:

    % su root Password: ******** % ./<package_name>.sh

    Packages are unpacked to <install_dir>/opt/arm/<package_name>. Optionally, use the --install-to option 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.

  7. 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.

  8. 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.

    1. To see which Environment Modules are available, run:

      % module avail

      Note: You might need to configure the MODULEPATH environment 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.

    2. To configure your Linux environment to make Arm Code Advisor available:

      % module load <architecture>/<linux_variant>/<linux_version>/suites/arm-code-advisor/<version>

      For example:

      % module load Generic-AArch64/SUSE/12/suites/arm-code-advisor/1.2
    3. 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 which command to check that the Arm Code Advisor armcadvisor command 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.
  9. To ensure that you can run Arm Code Advisor with adequate permissions, modify the /proc/sys/kernel/perf_event_paranoid setting to a value of 0 or -1.

    The perf_event_paranoid value is set to level 2 by 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[3344]: [ERROR] permission denied

    Note: Levels 1 and 2 (default) restrict measurements and prevent Code Advisor functioning correctly. Level 0 allows Code Advisor to access CPU-specific data but does not allow access to raw tracepoint samples. Level -1 removes 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_event configuration, see http://man7.org/linux/man-pages/man2/perf_event_open.2.html

Getting started

See our getting started tutorial to learn how to use Arm Code Advisor: