Skip to content

Commit 3496941

Browse files
authored
Merge pull request #3522 from anupras-mohapatra-arm/servers-and-cloud-computing
arm-performix skill LP review
2 parents 5b96b57 + 40e554e commit 3496941

5 files changed

Lines changed: 192 additions & 178 deletions

File tree

Lines changed: 29 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,62 @@
11
---
2-
title: What is the arm-performix skill?
2+
title: Understand the arm-performix skill
3+
description: Understand how the arm-performix skill selects Arm Performix recipes, gathers workload context, and returns structured profiling reports.
34
weight: 2
45

56
### FIXED, DO NOT MODIFY
67
layout: learningpathall
78
---
89

9-
## A skill, not a tool
10+
## What the skill is
1011

11-
**Arm Performix** is a desktop application for hardware-specific performance
12+
Arm Performix is a desktop application for hardware-specific performance
1213
tuning. It offers curated analysis pathways for performance-critical factors in
13-
applications, libraries, runtimes, and source code. The **arm-performix skill** is
14-
a set of instructions you add to your AI assistant so that it knows how to use
15-
Performix correctly on your behalf: which recipe to pick, how to gather context,
16-
how to read the results, and how to report findings.
14+
applications, libraries, runtimes, and source code.
1715

18-
Without the skill, an assistant tends to guess at performance problems by reading
19-
your source code. With the skill, it follows a disciplined workflow: measure
20-
first, characterize the bottleneck, change one thing at a time, and confirm the
21-
improvement with before/after data.
16+
The `arm-performix` skill is a set of instructions you can add to your AI assistant so that it knows how to use Performix correctly on your behalf. The skill defines which recipe to pick, how to gather context, how to read the results, and how to report findings.
2217

23-
## What the skill does for you
18+
Without the skill, an assistant might guess at performance problems by reading
19+
your source code.
2420

2521
When the skill is active, the assistant:
2622

2723
- Asks for the target, binary path, and workload command before profiling
2824
- Chooses the narrowest Performix recipe that answers your question
2925
- Runs the recipe through the `apx` command-line interface (CLI), or through the
3026
Arm Model Context Protocol (MCP) Server
31-
- Returns a structured Analysis Report with a bottleneck summary, key metrics,
27+
- Returns a structured analysis report with a bottleneck summary, key metrics,
3228
hot functions, ranked recommendations, and a single next step
3329

34-
## What the skill does not do
35-
36-
- Profile non-Neoverse Arm cores, such as phone-class SoCs
37-
- Guess at bottlenecks from source reading instead of measurement
38-
- Silently switch to another profiler when Performix is unavailable; it asks you
39-
how to proceed instead
40-
41-
## The recipes it can run
30+
## What recipes the skill can run
4231

4332
Performix exposes five profiling recipes, and the skill orchestrates them as a
4433
workflow: it picks a starting recipe from your question, then follows the
4534
evidence into whichever further recipes are needed to explain and confirm the
46-
bottleneck. Each recipe answers a different question:
35+
bottleneck.
36+
37+
Each recipe provides a different view of application performance:
4738

4839
| Your question | Recipe | What it shows |
4940
| --- | --- | --- |
50-
| Where is my time spent? | **Code Hotspots** | Hottest functions, call paths, flame graph |
51-
| Why is the pipeline stalling? | **CPU Microarchitecture** | Front-end and back-end stalls, bad speculation, retiring |
52-
| Am I using single instruction, multiple data (SIMD), such as Neon or Scalable Vector Extension (SVE)? | **Instruction Mix** | Scalar vs vector instruction balance |
53-
| Is memory the bottleneck? | **Memory Access** | L1 cache hit rate, latency, translation lookaside buffer (TLB) and page-walk pressure |
54-
| What can the hardware do? | **System Characterization** | Memory bandwidth and latency baseline per non-uniform memory access (NUMA) node |
41+
| Where is my time spent? | Code Hotspots | Hottest functions, call paths, and flame graphs to identify where time is spent |
42+
| Why is the pipeline stalling? | CPU Microarchitecture | Front-end and back-end pipeline stalls, bad speculation, retiring |
43+
| Am I using single instruction, multiple data (SIMD), such as Neon or Scalable Vector Extension (SVE)? | Instruction Mix | Scalar versus vector instruction balance |
44+
| Is memory the bottleneck? | Memory Access | L1 cache hit rate, latency, translation lookaside buffer (TLB) and page-walk pressure to identify whether memory is the bottleneck |
45+
| What can the hardware do? | System Characterization | Memory bandwidth and latency baseline per non-uniform memory access (NUMA) node to identify what the hardware can do |
5546

5647
{{% notice Note %}}
57-
**Where the recipes run:**
58-
59-
- **Profiling target** (the machine running your workload). The four
60-
microarchitecture-level recipes (CPU Microarchitecture, Instruction Mix,
61-
Memory Access, and System Characterization) require an **Arm Neoverse** target
62-
on Linux; Memory Access additionally needs the Statistical Profiling Extension
63-
(SPE) enabled. Code Hotspots is broader: it also runs on x86-64 Linux and on
48+
- The four microarchitecture-level recipes — CPU Microarchitecture, Instruction Mix,
49+
Memory Access, and System Characterization — require an Arm Neoverse target
50+
on Linux. The Code Hotspots recipe additionally runs on x86-64 Linux and on
6451
Windows 11 on Arm or x86-64.
65-
- **Host** (the machine where you run the `apx` CLI or your AI assistant). It can
66-
be macOS, Windows, or Linux on either arm64 or x86-64, and connects to the
67-
target locally or over Secure Shell (SSH).
52+
- To use the Memory Access recipe, enable the Statistical Profiling Extension
53+
(SPE).
54+
- The host machine can be macOS, Windows, or Linux on either arm64 or x86-64. The host can connect to the target locally or over SSH.
55+
- The skill guides AI assistants to use the `apx` CLI by default. If `apx` isn’t installed or available, it asks how you want to proceed rather than switching tools automatically. You can use the Arm MCP Server as an alternative tool, especially if you want fully agent-driven launch-mode profiling. Note that the MCP server doesn’t expose the System Characterization recipe.
6856
{{% /notice %}}
6957

70-
{{% notice Note %}}
58+
## What you've learned and what's next
7159

72-
The `apx` CLI is the full-capability interface. Use it for attach-to-process ID
73-
(PID), system-wide captures, timed captures, run export/import, custom result
74-
queries, CI/CD automation, and the System Characterization recipe. The Arm MCP
75-
Server is useful for agent-driven launch-mode profiling, but it exposes only the
76-
`code_hotspots`, `instruction_mix`, `cpu_microarchitecture`, and `memory_access`
77-
recipes. If you need System Characterization or run-history operations, use the
78-
CLI or the graphical user interface (GUI).
79-
{{% /notice %}}
60+
You've now learned how the `arm-performix` skill can help an assistant use Performix correctly, and what Performix recipes the skill can run.
61+
62+
Next, you'll install the skill and make it discoverable to your AI assistant.
Lines changed: 34 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
---
2-
title: Install and enable the skill
2+
title: Install and enable the arm-performix skill
3+
description: Download and install the arm-performix skill, place it in an AI assistant's skills directory, and confirm that the assistant can discover it.
34
weight: 3
45

56
### FIXED, DO NOT MODIFY
67
layout: learningpathall
78
---
89

9-
## Get the skill files
10+
## Download the skill folder
1011

11-
Use one of these options to get the skill files.
12+
Use one of the following options to download the skill files:
1213

13-
### Option 1: Clone from Gitee
14+
### Clone skills repository from Gitee
1415

15-
Use this option if you prefer managing the skill source with Git.
16+
If you prefer managing the skill source with Git, clone the skill file from Gitee.
1617

1718
From the root of the project where your assistant works, clone the skills
1819
repository:
@@ -29,23 +30,22 @@ mkdir -p .github/skills
2930
cp -R anolis-skills/skills/arm-performix .github/skills/
3031
```
3132

32-
### Option 2: Download from SkillHub
33+
### Download package from SkillHub
3334

34-
Use this option if you prefer downloading a package directly from the web.
35+
If you prefer downloading a package directly from the web, download the skill from SkillHub.
3536

36-
Go to the [arm-performix SkillHub page](https://skillhub.openanolis.cn/skill/arm-performix)
37+
Go to the [`arm-performix` SkillHub page](https://skillhub.openanolis.cn/skill/arm-performix)
3738
and download the skill.
3839

3940
The downloaded skill is a `.zip` package. Extract it, then place the
4041
`arm-performix` folder in your assistant's skills directory.
4142

42-
## Place the skill files
43+
## Make the skill folder discoverable
4344

44-
The skill is a folder that contains `SKILL.md`, `README.md`, and a
45-
`references/` directory. Put it where your assistant discovers skills. For GitHub
46-
Copilot in VS Code, use the `.github/skills/` directory of your workspace. Other
47-
assistants use different project directories, such as `.claude/skills/` or
48-
`.agents/skills/`, so use the directory that matches your assistant:
45+
The skill folder contains `SKILL.md`, `README.md`, and a
46+
`references/` directory. Place the folder where your AI assistant discovers skills.
47+
48+
For GitHub Copilot in VS Code, use the `.github/skills/` directory of your workspace:
4949

5050
```text
5151
.github/
@@ -57,36 +57,25 @@ assistants use different project directories, such as `.claude/skills/` or
5757
<references>.md
5858
```
5959

60-
The `SKILL.md` file describes the profiling workflow; `README.md` provides
61-
supporting overview information; and files under `references/` provide detailed
60+
Other assistants use different project directories, such as `.claude/skills/` or
61+
`.agents/skills/`, so use the directory that matches your assistant.
62+
63+
The `SKILL.md` file describes the profiling workflow. `README.md` provides
64+
supporting overview information. The files under `references/` provide detailed
6265
reference materials that the assistant reads on demand.
6366

64-
## Confirm the skill is discovered
65-
66-
Reload your assistant or IDE, then ask your assistant a profiling question (see
67-
the next page). In VS Code, confirm that Agent Skills are enabled in the
68-
**Configure Chat** skills view or with the `/skills` command. A correctly
69-
installed skill is picked up automatically when your request matches its
70-
triggers; you do not need to invoke it with an explicit command.
71-
72-
{{% notice Tip %}}
73-
The skill only *describes* how to use Performix. You still need Performix itself
74-
available: either the `apx` CLI on your `PATH`, or the Arm MCP Server configured.
75-
The skill tells you when neither is reachable rather than guessing.
76-
{{% /notice %}}
77-
78-
## Choose how Performix runs
79-
80-
The skill can start Performix in two ways. You do not have to pick manually, but
81-
it helps to know which path you have set up:
82-
83-
- **apx CLI**: the full-capability path. Install it on your host, add the `apx`
84-
directory to your `PATH`, and confirm it with `apx version` from the same
85-
terminal environment your assistant can use. This path works best for remote
86-
Secure Shell (SSH) targets, automation, and CI.
87-
- **Arm MCP Server**: bundles its own `apx`, so your host needs no CLI install.
88-
This path works best for fully agent-driven launch-mode profiling. The skill
89-
routes here only when you ask, or when the CLI is not installed and you confirm
90-
MCP. Use the CLI or GUI for attach-to-process ID (PID), system-wide profiling,
91-
run export/import, custom result queries, CI/CD automation, and System
92-
Characterization.
67+
## Confirm the skill is discoverable
68+
69+
Reload your assistant or IDE to confirm that it can discover the skill.
70+
71+
In VS Code, confirm that Agent Skills are enabled in the **Configure Chat** skills view or with the `/skills` command.
72+
73+
A correctly installed skill is picked up automatically when your request shows profiling or performance intent. You don't need to use a specific command to invoke the skill.
74+
75+
For prompts you can use to confirm skill discovery, see [Best practices for prompting AI assistants to use the arm-performix skill](/learning-paths/servers-and-cloud-computing/performix-llm-agent-skill/3-trigger-the-skill).
76+
77+
## What you've accomplished and what's next
78+
79+
You've now installed the `arm-performix` skill folder and made it discoverable to your AI assistant.
80+
81+
Next, you'll learn best practices for writing prompts to profile an application using the skill.
Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,61 @@
11
---
2-
title: Trigger the skill with profiling context
2+
title: Best practices for prompting AI assistants to use the arm-performix skill
3+
description: Write prompts that activate the arm-performix skill by providing profiling intent, an Arm target, an absolute binary path, and a repeatable workload.
34
weight: 4
45

56
### FIXED, DO NOT MODIFY
67
layout: learningpathall
78
---
89

9-
## Write a prompt that activates the skill
10+
## Ensure the prompt shows performance and profiling intent
1011

11-
The skill activates on performance and profiling intent. Prompts that work:
12+
The skill activates on performance and profiling intent.
13+
14+
The following are examples of prompts that show the expected intent:
1215

1316
- "Profile this workload on Arm and find the hotspots."
1417
- "Why is this binary slow on my Arm Neoverse server?"
1518
- "Use Performix to check whether my hot loop uses vector instructions."
1619
- "Investigate cache and translation lookaside buffer stalls on my Neoverse target."
1720

18-
Prompts that don't activate the skill:
21+
Prompts that are vague won't activate the skill.
22+
23+
The following are example vague prompts:
1924

20-
- "Will my code build on Arm?" — a migration question, not a profiling one.
21-
- "Make my code faster" — too vague without a target or binary; add both.
25+
- "Will my code build on Arm?"
26+
- "Make my code faster"
2227

2328
## Provide context up front
2429

25-
The skill needs these details before it can profile. Supplying them in your first
26-
message avoids a round of back-and-forth:
30+
In addition to prompting with the right intent, you need to provide the following context:
2731

28-
1. **Target**: a local Arm machine, or `user@host` for a remote Secure Shell (SSH) target
29-
2. **Binary**: the **absolute path** to the executable on the target
30-
3. **Workload**: the exact command and arguments, ideally repeatable
31-
4. **Goal**: hotspots, vector instruction usage, memory locality, or a regression
32+
1. Target: a local Arm machine, or `user@host` for a remote Secure Shell (SSH) target
33+
2. Binary: the absolute path to the executable on the target
34+
3. Workload: the exact command and arguments, ideally repeatable
35+
4. Goal: hotspots, vector instruction usage, memory locality, or a regression
3236
to investigate
3337

34-
If it needs anything else, such as the source tree for line-level attribution or
35-
your build flags, the skill asks rather than guesses.
38+
If the AI assistant needs anything else, such as the source tree for line-level attribution or
39+
your build flags, it'll prompt you for it rather than making an assumption.
3640

37-
A good starting prompt looks like this:
41+
The following is a good starting prompt:
3842

3943
```text
4044
Profile /home/me/build/myapp --input /home/me/data/bench.dat on my Arm Neoverse target
4145
me@neoverse-box with Performix. I want to know where the time goes.
4246
```
4347

4448
This prompt gives the assistant the workload command and the SSH target. The
45-
skill picks **Code Hotspots** first, runs it, and reports back with an analysis.
46-
47-
{{% notice Note %}}
48-
Always give the **absolute path** to the binary, and use absolute paths for input
49-
files, output files, and other files your workload reads or writes. If the
50-
workload must run from a specific directory, tell the assistant that working
51-
directory explicitly. Performix can launch the process from a different working
52-
directory, so relative paths can resolve unexpectedly.
53-
{{% /notice %}}
49+
skill picks Code Hotspots first, runs it, and reports back with an analysis.
50+
51+
## Provide absolute paths
52+
53+
Always provide the absolute path to the binary. Use absolute paths for all files your workload reads or writes.
54+
55+
If the workload must run from a specific directory, include the directory in the prompt. Performix can launch the process from a different working directory, so relative paths can resolve unexpectedly.
56+
57+
## What you've learned and what's next
58+
59+
You've now learned how to best structure your prompts to profile an application using the `arm-performix` skill.
60+
61+
Next, you'll learn how to use generated reports to drive performance improvements.

0 commit comments

Comments
 (0)