- On-device — Collects real-time performance data by monitoring running apps and system activities.
- On-host — Processes and displays data previously collected on the device.
When to use Simpleperf
Prerequisites
Before you begin, make sure you have:- Vega SDK installed
- A Fire TV Stick device connected through VDA
- Your app built and running on the device
Set up Simpleperf
Simpleperf isn’t included in the device image by default. You need to sideload the binary from the Vega SDK onto your device.Step 1: Verify your build variant
Confirm that your device uses auser-external or user build variant. Either build works with Simpleperf, though user-external is more common:
Step 2: Enable developer mode
Enable developer mode on the device:Step 3: Connect to your device and start your app
Open a shell connection to your device:vmsgr. For example:
Step 4: Push the Simpleperf binary to the device
Find the Simpleperf binary in the SDK at:tmp/scratch folder.
Step 5: Access the component shell
Open a new terminal on your host machine. You need a separate terminal because your first terminal is running thevda shell session from Step 3.
Connect to the component shell:
Find your app’s process ID
Before profiling, find your app’s process ID (PID):pidof:
List available events
Usesimpleperf list to see which events your device supports:
cache— Hardware cache eventsraw— Raw CPU PMU eventstracepoint— Tracepoint eventscs-etm— CoreSight ETM instruction tracing eventspmu— System-specific PMU events
-e option when running simpleperf stat and simpleperf record commands.
Collect performance statistics with stat
Usesimpleperf stat to collect aggregate performance statistics for CPU events. This mode provides a concise summary of hardware and software events without the overhead of detailed sampling data. It’s useful for quick performance assessment and A/B testing of optimizations.
Interpret stat results
Use these guidelines to interpret the output:simpleperf help stat.
Record detailed performance data
Usesimpleperf record to collect in-depth CPU performance metrics by sampling CPU events at predefined intervals. Simpleperf stores all recorded data in a perf.data file for subsequent analysis.
Events can be scoped to monitor user space only (:u) or kernel space only (:k). For most Vega app profiling, use user space monitoring.
simpleperf help record.
Transfer performance data to your host machine
The component shell stores performance data files in the/scratch directory. To retrieve them, open a terminal on your host machine (outside the component shell) and run:
Analyze performance data with report
Usesimpleperf report on your host machine to analyze the collected perf.data file. Use the host version of Simpleperf provided with the SDK at:
0.23.6323).
simpleperf help report.
Other commands
Simpleperf includes additional commands for specialized profiling needs:Known limitations
Simpleperf relies on theperf_event_paranoid kernel parameter to determine its operational permissions. By default, Vega OS sets this value to 2, which restricts certain profiling capabilities for security reasons.
For devices with user-external build variants and developer mode enabled, the system automatically adjusts the value to 1, which allows more comprehensive profiling. However, unprivileged users are still restricted from:
- Profiling kernel space events
- Accessing hardware PMU events
- Profiling other users’ processes
- Collecting raw tracepoint events
- Accessing kernel call graphs
- Collecting kernel-mode stack traces
Best practices
Data collection
- Always specify a duration or use controlled termination.
- Use an appropriate sampling frequency.
- Monitor system load during profiling.
Event selection
- Start with basic events (
cpu-cycles,instructions). - Avoid too many simultaneous hardware events.
- Consider hardware limitations of your target device.
Report analysis
- Compare multiple runs for consistent results.
- Use appropriate filters to narrow down results.
- Always check for lost samples.
Resource management
- Clean up old
perf.datafiles to free device storage. - Control CPU overhead by limiting sampling frequency.
Example: Diagnose frame drops during scrolling
This walkthrough shows how to use Simpleperf to investigate an app that drops frames when scrolling through a content list. 1. Confirm the problem with stat:context-switches (>500/sec) or high cache-misses relative to cpu-cycles, there’s likely a performance issue worth investigating.
2. Record a call graph during the problematic interaction:
Overhead percentages. For example:
Related topics
- Monitor CPU Usage
- Investigate JavaScript Thread Performance
- App Performance Best Practices
- Inspect Traces in Vega Apps

