Asight Systems quick start

Updated at:
Copy as MD

1. Overview

Asight Systems is a performance analysis suite for PPU applications. It helps you trace various CPU and GPU events, display them on a timeline, and perform system-level analysis to identify performance bottlenecks. Asight Systems consists of two tools:

  • asys command-line tool: Collects events from a target application on Linux and generates a report. asys supports collecting various event types, such as HGGC, HGTX, and OSRT, including their call stack information. It also provides flexible options for starting and stopping data collection.

  • Asight Systems GUI: A report viewer that runs on Windows and Mac. The Asight Systems GUI provides multiple views to display reports, such as TimelineView, EventsView, and FunctionTable. It is easy to use and smoothly displays massive datasets.

The workflow for the Asight Systems tool suite is as follows:

  1. Use the asys command-line tool to trace a target application and generate a report.

  2. Use the Asight Systems GUI to open and analyze the report.

2. Installation

The tool comes preinstalled on the official image.

2.1 asys command-line tool

  1. Configure environment variables

    Navigate to the PPU_SDK directory and run the following script to configure the required environment variables:

    source envsetup.sh
  2. Check the runtime environment

    After configuring the environment variables, run the following command to verify that your environment supports asys tracing and sampling:

    asys status

    If the environment check passes, you can use asys to capture application traces.

    image

    Tip: Failures in some configuration checks do not prevent the asys command-line tool from running, but they may affect certain features:

    • If the root privileges check fails, CPU sampling and call stack collection are unavailable.

    • If the perf_event_open syscall check fails, call stack collection is not available. If you use Docker, you can add the --pid=host --privileged=true parameters to the docker run command to enable the perf_event_open syscall.

    • If the Ftrace check fails, you cannot use CPU sampling. To enable Ftrace if you use Docker, add the -v/sys/kernel/debug:/sys/kernel/debug parameter to the docker run command to mount the ftrace directory. Additionally, ensure that the /sys/kernel/debug directory on the Host is not empty.

2.2 Asight Systems GUI

The Asight Systems GUI is distributed as a separate installation package and supports the following operating systems:

  • Windows 10, Windows 11

  • macOS 10.15 and later

Click the download link to visit the download page and select the version you need. Download the MSI package for Windows or the DMG package for macOS.

Note

You need an account and password to download the software package. Contact your customer success manager (PDSA) to obtain them.

3. Quick start

In this guide, the device that runs the PPU application is the target, and the device used to view reports is the host. The workflow is to collect a report on the target with the asys command-line tool, then open, view, and analyze it on the host with the Asight Systems GUI.

3.1 Collecting a report with asys

You can run the asys profile command on the target, specify the items to trace, run the application, and generate a trace report. The syntax for the profile subcommand is: asys profile [option] <application> [applicationargs]

For example, to collect data from a target application named test, run the following command:

asys profile -o report test

This command produces the following output and generates a file named report.asysrep in the current directory:

[Asight]:Profile executed.
[Asight]:Starttraceservice,thismaytakeawhile...
[Asight]:Startingtargetapp:./test
[Asight]:Targetapplicationpid:125290,pgrp:125290
[Asight]:Collectingdata...
[Asight]:Alltargetapplicationcreatedprocessesareterminated.
[Asight]:Tracewrittenintotheoutputfile:report.asysrep

The asys tool supports tracing various components, such as hggc, hgtx, and acblas. It also supports controlling the collection process and interactive collection modes. For more details, see Capturing Reports with the asys Command-Line Tool.

Tip: Keep the report file size under 200 MB. To reduce the file size, you can disable CPU sampling by using the -s none option (see CPU and Thread Activity Tracing) or limit the collection duration (see Controlling the Collection Process).

3.2 Viewing a report

Reports collected by the asys command-line tool are saved as .asysrep files, which you can view in the Asight Systems GUI. You can open a file in the GUI in several ways:

  • From the main menu: File > Open...

  • Drag and drop the file into the Asight Systems GUI main window.

  • From the context menu: Right-click a blank area in the Project Explorer and select Open...

  • Open from the command line of the GUI tool, such as asys-ui report.asysrep.

Report files (.asysrep) are self-contained and can be shared with other users. However, the Asight Systems suite version used to view a report must not be older than the version used to collect it. The GUI displays a notification if you try to open a report collected with a newer version of the command-line tool.

For more details about the Asight Systems GUI, see Using the Asight Systems GUI to View Reports.

3.3 Remote collection with the GUI

Besides collecting reports directly on the target with the asys command-line tool, you can also perform remote collection from the host GUI over an SSH connection.

3.3.1 Target requirements for remote collection

  1. PPU_SDK is installed.

  2. The SSH service is enabled.

  3. For password-based authentication, ensure an SSH password is set.

For help installing the SSH service, see Install SSH Service.

3.3.2 Starting remote collection

From the main menu, select Connection > Connect... to open the Connection Dialog, as shown below:

image

After you configure the target application, report name, and connection information, click Launch to start the collection.

image

After the collection is complete, the report automatically opens in the GUI. For more details, see Connection Dialog.