Capture a Streamline profile

Performance Advisor runs on a Streamline capture file. You need to take a capture with Streamline first, before you can generate a report with Performance Advisor. In your Arm Mobile Studio installation directory, there is a Python script, lwi_me.py that connects Streamline to your device and directs you to take a capture. The script will temporarily install a daemon application on your device, called gatord. This application is provided in your Arm Mobile Studio installation directory.

  1. In a terminal window, navigate to the following folder in your Arm Mobile Studio installation directory, where the Python script lwi_me.py is located:
    cd <installation_directory>/performance_advisor/lwi/helpers/
  2. The syntax to run the lwi_me.py script is:
    python3 lwi_me.py --daemon <path_to_gatord> --lwi-out-dir <path_to_empty_directory> [--lwi-gles-layer-lib-path | --lwi-vk-layer-lib-path <path_to_Android10_layer_lib>]
    Use the --daemon option to specify the path to the gatord binary that you want to install on your device to collect data. This file is provided in your installation directory in two versions:

    For 32-bit applications, use <install_directory>/streamline/bin/arm/gatord. For 64-bit applications, use <install_directory>/streamline/bin/arm64/gatord.

    Use --lwi-out-dir to specify an empty directory to save frame capture images.

    For Android 10, use --lwi-gles-layer-lib-path or --lwi-vk-layer-lib-path to specify the path to the OpenGL ES or Vulkan layer library file for Android 10 devices. These files are provided in your installation directory. Libraries for both 32-bit and 64-bit applications are stored in different folders; armeabi-v7a for 32-bit applications, and arm64-v8a for 64-bit applications.

    The Open GL ES layer library file libGLES_layer_lwi.so is located in: <install_directory>/ performance_advisor/lwi/target/android/arm/unrooted/{arm64-v8a|armeabi-v7a}/ libGLES_layer_lwi.so.

    The Vulkan layer library file libVkLayerLWI64.so is located in: <install_directory>/ performance_advisor/lwi/target/android/arm/rooted//{arm64-v8a|armeabi-v7a}/ libVkLayerLWI64.so.

    For example, to run the script for a 64-bit OpenGL ES application on an Android 10 device:
    python3 lwi_me.py --daemon ../../../streamline/bin/arm64/gatord  --lwi-out-dir $HOME/Documents/frame_captures --lwi-gles-layer-lib-path ../target/android/arm/unrooted/arm64-v8a/libGLES_layer_lwi.so 
  3. The script returns a numbered list of the Android package names for the debuggable applications that are installed on your device. Enter the number of the package you want to profile.

    The script identifies the GPU in the device, installs the daemon application, and waits for you to complete the capture in Streamline. Leave the terminal window open, as you will need to come back to it later to terminate the script.

  4. Launch Streamline:
    1. On Windows, from the Start menu, navigate to Arm MS 2020.1 and select Arm MS Streamline 2020.1.
    2. On macOS, go to the <install_directory>/streamline folder, and double-click the Streamline.app file.
    3. On Linux, navigate to the <install_directory>/streamline directory in a terminal, and run the Streamline file:
      cd <install_directory>/streamline 
      ./Streamline
  5. In the Target view, click the eye icon and select your connected device.
    Streamline target tab
  6. Click Counter configuration  and choose an appropriate counter template for the GPU in your device.
     
    The number of counters in the template that your target device supports is shown next to each template. For example, here, 34 of the 38 available counters in the Mali Midgard template are supported in the connected device.

    Save your selection.
  7. Optionally, click Capture and Analysis options  to set more capture options, including the sample rate and the capture duration. Refer to Capture options in the Arm Streamline User Guide for more details.
  8. Select the Start Capture button  to start capturing data from the target device. Specify the name and location on the host of the capture file that Streamline will create when the capture is complete. Streamline then switches to Live view and waits for you to start the application on the device.
  9. Start the application on the device and perform your test scenario.
  10. Unless you specified a capture duration, click Stop capture to end the capture . Streamline stores the capture file in the location you specified.
  11. IMPORTANT: Switch back to the terminal running the lwi_me.py script and press any key to terminate it. The script kills all processes that it started and remove the daemon application from the device.

Now that you have a Streamline capture, run Performance Advisor on it, to generate a performance report

Previous Next