# Performance analysis tools

Examine the system performance with the following analysis tools:

- Function Tracer (ftrace)–Debugs and analyzes latencies and performance issues.
- LTTng–Traces Linux kernel and user space simultaneously.
- Trace Compass (Eclipse)–Visualizes performance issues graphically.
- Qualcomm^®^ Profiler CLI–Profiles and optimizes application scaling on Qualcomm SoCs.
- Perf Utility–Evaluates performance monitoring unit (PMU) counters in Linux.
- Systemd-analyze–Analyzes and debugs system boot performance in Linux.

## Function tracer (ftrace)

- This tool provides insights into the kernel’s operations.
- Function tracer is useful for debugging or analyzing latencies and performance issues.
- Function tracer serves as a tracing tool to collect kernel space traces for analysis.

To collect ftrace, do the following:

Note

The commands specified in the following steps should be run on the device.

1. To enable trace events, run the following commands from the SSH
shell:

mount -t debugfs none /sys/kernel/debug
        Copy to clipboard

echo 0 > /sys/kernel/tracing/tracing_on
        Copy to clipboard

echo 25600 > /sys/kernel/tracing/buffer_size_kb
        Copy to clipboard

echo "" > /sys/kernel/tracing/set_event
        Copy to clipboard

echo "" > /sys/kernel/tracing/trace
        Copy to clipboard
2. To check the available events, run the following command:

cat /sys/kernel/tracing/available_events
        Copy to clipboard
3. To enable the required events, for example, a scheduler trace, run
the following commands:

echo 1 > /sys/kernel/tracing/events/sched/sched_wakeup_new/enable
        Copy to clipboard

echo 1 > /sys/kernel/tracing/events/sched/sched_waking/enable
        Copy to clipboard

echo 1 > /sys/kernel/tracing/events/sched/sched_switch/enable
        Copy to clipboard
4. To understand the set events, run the following command:

cat /sys/kernel/debug/tracing/set_event
        Copy to clipboard
5. To start a trace, run the following command:

echo 1 > /sys/kernel/tracing/tracing_on
        Copy to clipboard
6. Run use cases.
7. To stop the trace after running use cases, run the following
command:

echo 0 > /sys/kernel/tracing/tracing_on
        Copy to clipboard
8. To save the trace, run the following command:

cat /sys/kernel/tracing/trace > /opt/ftrace.txt
        Copy to clipboard
9. To pull ftrace from the target to the host, use a secure copy protocol (SCP) or a similar tool. Ensure that you specify the target IP address in the command. The
following is an example command to run on the host computer:

scp -r root@10.92.162.185:/opt/ftrace.txt /local/mnt/workspace/logs
        Copy to clipboard

For more information, see [ftrace - Function Tracer](https://www.kernel.org/doc/html/v4.17/trace/ftrace.html).

## Linux Trace Toolkit next generation (LTTng)

- LTTng is an open-source tracing tool.
- It's used to trace the Linux kernel and user space simultaneously.

For more information, see [LTTng Documentation](https://lttng.org/docs/v2.13/).

## Trace Compass by Eclipse

- Trace Compass is an open-source tool that provides a graphical view
for analyzing performance issues.
- It can parse several types of traces including ftrace and LTTng, and
visualize the following:

    - Kernel resources
    - Kernel control flow
    - User space marker

Trace Compass is a host application that requires a Java virtual machine
to work on the host computer. For more information, see [Eclipse Trace Compass](https://projects.eclipse.org/projects/tools.tracecompass).

To download Trace Compass, see
[Eclipse Trace Compass - Downloads](https://projects.eclipse.org/projects/tools.tracecompass/downloads).

## Qualcomm Profiler

- Qualcomm Profiler is a performance profiling tool to identify, measure, and
optimize application scaling improvement opportunities across Qualcomm system-on-chip (SoC).
- It supports CPU, GPU, aDSP, cDSP, user space processes, memory, and I/O profiling metrics.
- To download the Qualcomm Profiler tool on the host computer, first download and install the Qualcomm Software Center. For detailed steps, see [Install QSC Launcher](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-254/build_from_source_qsc_gui_intro.html#install-qsc-launcher).
- Launch Qualcomm Software Center, search for Qualcomm Profiler, and download it.
- For detailed information about how to use the Qualcomm Profiler tool, see [Qualcomm Profiler User Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-54323-2/introduction.html).

## Perf utility

- The Perf utility is an open-source profiling tool in Linux to monitor the PMU counters.
- It's used to obtain a function call stack.
- It's part of the Qualcomm^®^ Linux^®^ build.

To run the perf utility, run the following command on the device:

perf --help
    Copy to clipboard

For more information, see [perf: Linux profiling with performance counters](https://perfwiki.github.io/main/).

## systemd-analyze

- Systemd-analyze is a command-line tool used to analyze and debug
system boot performance in Linux.
- It measures boot time milestones and analyzes bottlenecks at
different layers, such as the kernel, user space platform, and
services.
- The Yocto system recipe comes with the systemd-analyze tool by
default.

To compile and install the systemd-analyze utility, do the following:

- On host:

    1. To compile `systemd-analyze.ipk`, run the following command in
your workspace:

bitbake systemd
            Copy to clipboard
    2. The `.ipk` file is generated in the following directory:

        `/build-qcom-wayland/tmp-glibc/deploy/ipk/armv8-2a/ssystemd-analyze_255.13-r0_armv8-2a.ipk`
    3. Push the `.ipk` file into the device from the host using SCP or
a similar tool. The following are example commands to run on the host computer. Ensure that you specify the target IP address in the SCP command:

adb shell mount -o remount,rw /usr
            Copy to clipboard

scp systemd-analyze_255.13-r0_armv8-2a.ipk root@10.92.162.185:/usr/bin
            Copy to clipboard
- On target:

    Install the `.ipk` file by running the following commands:

> 
> 
> cd /usr/bin
>         Copy to clipboard
> 
> 
> opkg --nodeps install --force-reinstall /usr/bin/systemd-analyze_255.13-r0_armv8-2a.ipk
>         Copy to clipboard

For more information, see [systemd-analyze — Analyze and debug system manager](https://www.freedesktop.org/software/systemd/man/latest/systemd-analyze.html).

### Next steps

- [Configure CPU, GPU, and memory](https://docs.qualcomm.com/doc/80-70022-10/topic/14-configure.html#configure)

Last Published: Oct 10, 2025

[Previous Topic
Features impacting performance](https://docs.qualcomm.com/bundle/publicresource/80-70022-10/topics/2-performance-features.md) [Next Topic
Configure CPU, GPU, and memory](https://docs.qualcomm.com/bundle/publicresource/80-70022-10/topics/14-configure.md)