Skip to content

Commit 0918486

Browse files
authored
Merge pull request #3532 from anupras-mohapatra-arm/performix-dynamic-insights
Performix dynamic insights LP review + style skill tweak to handle lists based on Arm tech writing style
2 parents 7718d44 + 88593e3 commit 0918486

8 files changed

Lines changed: 236 additions & 173 deletions

File tree

.github/skills/writing-style-review/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Use this skill for granular prose, voice, readability, terminology, and style re
4747
- Flag pages over 3500 words total when prose density hurts review or learning.
4848
- Use visual breaks to prevent walls of text. Code blocks count as visual breaks.
4949
- If a section explains three or more things, suggest splitting it.
50+
- Ensure lists have a lead-in sentence or phrase ending with a colon. Ensure each item starts with a capitalized word unless the word is supposed to be styled differently. Ensure list items don't end with periods unless the item is one or more complete sentences.
5051

5152
## Arm framing and technical depth
5253

content/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/_index.md

Lines changed: 57 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
---
2-
title: Generate Arm Performix AI Insights in VS Code with Codex
2+
title: Generate Arm Performix AI insights in Visual Studio Code with Codex
33

4-
draft: true
5-
cascade:
6-
draft: true
7-
8-
description: Configure the Arm Performix MCP server for Codex in Visual Studio Code and use profile evidence to generate and validate AI Insights.
4+
description: Configure the Arm Performix MCP server for Codex in Visual Studio Code and use profile evidence to generate and validate AI insights.
95

106
minutes_to_complete: 20
117

@@ -15,17 +11,67 @@ learning_objectives:
1511
- Configure the Arm Performix MCP server for the Codex extension in VS Code.
1612
- Verify that Codex can access Arm Performix recipes, targets, and runs.
1713
- Create or select a supported Code Hotspots run.
18-
- Generate an AI Insight and validate its recommendations against profile evidence.
14+
- Generate an AI insight and validate its recommendations against profile evidence.
1915

2016
prerequisites:
21-
- Arm Performix version 2026.2.5 or later installed. See the [Arm Performix install guide](/install-guides/performix/) for installation and target setup instructions.
22-
- Visual Studio Code with the Codex extension installed.
23-
- Access to Codex through ChatGPT sign-in, or an organization-approved OpenAI API key provided through the `OPENAI_API_KEY` environment variable.
24-
- Permission from your organization to share profile data, symbols, source excerpts, disassembly excerpts, and performance metrics with Codex.
17+
- Arm Performix version 2026.2.5 or later installed. For installation and target setup instructions, see the [Arm Performix install guide](/install-guides/performix/).
18+
- Visual Studio Code with the Codex extension installed
19+
- Access to Codex through ChatGPT sign-in, or an organization-approved OpenAI API key provided through the `OPENAI_API_KEY` environment variable
20+
- Permission from your organization to share profile data, symbols, source excerpts, disassembly excerpts, and performance metrics with Codex
21+
22+
# START generated_summary_faq
23+
generated_summary_faq:
24+
template_version: summary-faq-v3
25+
generated_at: '2026-07-27T15:24:59Z'
26+
generator: ai
27+
ai_assisted: true
28+
ai_review_required: true
29+
model: gpt-5
30+
prompt_template: summary-faq-v3
31+
source_hash: 3e21e94826b1e02673c240ad88dc503354a1920397903348316d696cf4e2aa2c
32+
summary_generated_at: '2026-07-27T15:24:59Z'
33+
summary_source_hash: 3e21e94826b1e02673c240ad88dc503354a1920397903348316d696cf4e2aa2c
34+
faq_generated_at: '2026-07-27T15:24:59Z'
35+
faq_source_hash: 3e21e94826b1e02673c240ad88dc503354a1920397903348316d696cf4e2aa2c
36+
summary: >-
37+
You'll learn how to connect Codex in Visual Studio Code to the Arm Performix Model
38+
Context Protocol (MCP) server, generate an AI insight for a specific Code Hotspots run, and
39+
validate the result with profile evidence. After configuring the MCP server on your local machine, you’ll select or create a representative Code Hotspots run, request an AI insight by run ID, and evaluate its supporting evidence.
40+
Then, you'll open the same run in Arm Performix to inspect flame graphs, functions, call
41+
stacks, source, and disassembly to confirm the recommendation.
42+
faqs:
43+
- question: How do I confirm Codex is connected to Arm Performix through MCP?
44+
answer: >-
45+
Ask Codex to list Arm Performix recipes, targets, or supported Code Hotspots runs. A successful
46+
listing confirms the MCP server is configured and reachable.
47+
- question: Which MCP configuration method should I use, and where should I configure it?
48+
answer: >-
49+
You can update Codex extension settings, run the `codex mcp add` command, or
50+
edit `~/.codex/config.toml`. Configure the MCP on the host where Codex runs; in remote development,
51+
verify which machine hosts Codex.
52+
- question: What should I prepare before creating a new Code Hotspots run?
53+
answer: >-
54+
Choose a representative workload and specify the executable with an absolute path. Build the workload with debug symbols when possible and aim for at least 20 seconds of activity to collect
55+
enough samples.
56+
- question: How do I make sure Codex uses the exact profile I want?
57+
answer: >-
58+
Request the AI insight using the run ID. If you don’t know it, ask Codex to list supported
59+
Code Hotspots runs with IDs, targets, workloads, and creation times. Then, select the correct
60+
ID.
61+
- question: What should I check to validate an AI insight against the profile?
62+
answer: >-
63+
Open the same run in Arm Performix and inspect the **Flame graph**, **Functions**, **Call Stack**,
64+
**Source**, and **Disassembly** views. Confirm that the cited functions, call paths, and sample percentages
65+
match the evidence referenced by the insight.
66+
# END generated_summary_faq
2567

2668
author:
2769
- Julie Gaskin
2870

71+
generate_summary_faq: false
72+
rerun_summary: false
73+
rerun_faqs: false
74+
2975
### Tags
3076
skilllevels: Introductory
3177
subjects: Performance and Architecture

content/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/configure_mcp_codex.md

Lines changed: 88 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ layout: learningpathall
99
---
1010
## Choose a configuration method
1111

12-
Codex CLI and the Codex extension share MCP configuration on the same host. Choose one of these methods:
12+
Codex CLI and the Codex extension share MCP configuration on the same host. Choose one of the following methods:
1313

14-
- Use the Codex extension settings.
15-
- Run `codex mcp add` in a terminal.
16-
- Edit `~/.codex/config.toml`.
14+
- Use the Codex extension settings
15+
- Run `codex mcp add` in a terminal
16+
- Edit `~/.codex/config.toml`
1717

18-
You only need to complete one method. The MCP server is a local standard input/output (STDIO) process started by the `apx` executable.
18+
You need to complete only one method. The MCP server is a local standard input and output (STDIO) process started by the `apx` executable.
1919

2020
{{% notice Note %}}
21-
Configure the server on the host where Codex runs. In a local VS Code session, this is your development computer. In a remote development session, confirm which host runs the Codex extension and which Arm Performix data directory it uses.
21+
Configure the server on the host where Codex runs. In a local Visual Studio Code (VS Code) session, this is your development computer. In a remote development session, confirm which host runs the Codex extension and which Arm Performix data directory it uses.
2222
{{% /notice %}}
2323

24-
## Configure the server in the Codex extension
24+
## Configure the MCP server in the Codex extension
2525

26-
To add the server in Visual Studio Code:
26+
To add the MCP server in VS Code:
2727

28-
1. Open the Codex sidebar and select the gear icon.
28+
1. Open the Codex sidebar and select the **gear icon**.
2929
2. Select **MCP servers**, then select **Add server**.
30-
3. Enter `arm-performix` for the server name.
30+
3. For **Server name**, enter `arm-performix`.
3131
4. Select **STDIO** as the transport.
32-
5. Enter the full path to the Arm Performix `apx` executable in the command field.
32+
5. For **Command**, enter the full path to the Arm Performix `apx` executable.
3333

3434
On macOS:
3535

@@ -55,7 +55,7 @@ To add the server in Visual Studio Code:
5555
C:\Users\<username>\AppData\Local\Programs\Arm Performix\assets\apx\apx.exe
5656
```
5757
58-
6. Add one argument:
58+
6. Add the following arguments:
5959
6060
```text
6161
mcp
@@ -80,9 +80,9 @@ codex mcp add arm-performix -- "/Applications/Arm Performix.app/Contents/assets/
8080

8181
Restart the Codex extension after the command completes.
8282

83-
## Configure the server in `config.toml`
83+
## Configure the server in the Codex config file
8484

85-
For direct configuration, open `~/.codex/config.toml` and add:
85+
For direct configuration, open `~/.codex/config.toml` and add the following:
8686

8787
```toml
8888
[mcp_servers.arm-performix]
@@ -92,13 +92,15 @@ args = ["mcp", "start"]
9292

9393
Replace `command` with the full path to `apx` on your host. Save the file and restart the Codex extension.
9494

95+
{{% notice Note %}}
9596
On Windows, use a TOML literal string so backslashes in the path aren't treated as escape characters:
9697

9798
```toml
9899
[mcp_servers.arm-performix]
99100
command = 'C:\Program Files\Arm Performix\assets\apx\apx.exe'
100101
args = ["mcp", "start"]
101102
```
103+
{{% /notice %}}
102104

103105
## Check that the MCP server is connected
104106

@@ -121,9 +123,79 @@ If Codex returns Performix recipes or runs, the end-to-end connection works. An
121123
Next, ask Codex to identify runs that support the insight workflow:
122124

123125
```text
124-
List the Arm Performix Code Hotspots runs that can be used to generate an AI Insight. Include the run ID and enough workload and target details for me to choose the correct run.
126+
List the Arm Performix Code Hotspots runs that can be used to generate an AI insight. Include the run ID and enough workload and target details for me to choose the correct run.
125127
```
126128

127129
Record the run ID you want to analyze. A run name can be changed and might not be unique, so use the run ID in later prompts.
128130

129-
You have now configured and tested the MCP connection. If no supported run is available, create a Code Hotspots run in the next section.
131+
## Troubleshoot the MCP connection
132+
133+
Use the following checks to diagnose MCP connection issues:
134+
135+
### The Arm Performix MCP server isn't listed
136+
137+
Check whether Codex loaded the server configuration:
138+
139+
```bash
140+
codex mcp list
141+
```
142+
143+
Find `arm-performix` in the output. Then confirm:
144+
145+
- The command is the full path to the `apx` executable, including `apx.exe` on Windows.
146+
- The arguments are `mcp` and `start`.
147+
- The server is enabled.
148+
- You restarted the extension after changing the configuration.
149+
- You edited the configuration for the same user account and Codex host that runs the extension.
150+
151+
### The MCP server fails to start
152+
153+
Run the executable's built-in help from a terminal to separate an `apx` problem from a Codex configuration problem. Replace `<path-to-apx>` with the configured path:
154+
155+
```bash
156+
"<path-to-apx>" mcp --help
157+
```
158+
159+
If the help text doesn't appear, check the executable path, file permissions, and installed Arm Performix version. If it does appear, reopen **MCP servers** in the Codex extension and check the server status.
160+
161+
In a remote development session, make sure `apx` is installed on the Codex host and that this installation uses the expected Performix configuration and run data.
162+
163+
### Codex doesn't use Arm Performix
164+
165+
Name the server and task explicitly:
166+
167+
```text
168+
Use the Arm Performix MCP server to list the available Arm Performix runs.
169+
```
170+
171+
For a specific run:
172+
173+
```text
174+
Use Arm Performix to generate an AI insight for run ID "<run-id>".
175+
```
176+
177+
If you have several MCP servers, an ambiguous prompt such as `give me insights` might not select Arm Performix.
178+
179+
### Code Hotspots runs are missing
180+
181+
Check for the following:
182+
183+
- You created at least one completed Code Hotspots run.
184+
- The MCP server runs as the same user who created or imported the run.
185+
- The GUI, CLI, and MCP server use the same Arm Performix data location.
186+
- The selected run contains enough samples and profile data for analysis.
187+
- A remote Visual Studio Code environment isn't using a different home directory or Performix configuration.
188+
189+
Compare the MCP result with the CLI:
190+
191+
```bash
192+
apx run list
193+
```
194+
195+
If the CLI also returns no run, create or import a run. If the CLI returns the run but Codex doesn't, recheck which host, user, and configuration start the MCP server.
196+
197+
## What you've accomplished and what's next
198+
199+
You've now configured and tested the MCP connection.
200+
201+
Next, you'll create a Code Hotspots run if no supported run is available. If you already have a supported run, skip to [Generate Arm Performix AI insights for a Code Hotspots run](/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/generate_ai_insights/).

content/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/create_a_code_hotspots_run.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Create a Code Hotspots run
2+
title: Create an Arm Performix Code Hotspots run
33

44
weight: 4
55

@@ -9,16 +9,16 @@ layout: learningpathall
99
---
1010
## Prepare a representative workload
1111

12-
You can skip this section if you already selected a supported Code Hotspots run.
12+
If you already have a supported Code Hotspots run, skip to [Generate Arm Performix AI insights for a Code Hotspots run](/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/generate_ai_insights/).
1313

1414
For a new run, choose a workload that represents the behavior you want to optimize. Specify the executable with an absolute path because Performix doesn't support relative workload paths. Build it with debug symbols when possible so Performix can attribute samples to functions and source lines. Aim for at least 20 seconds of representative activity; a very short run might not collect enough samples for useful analysis.
1515

1616
Before profiling, make sure you know:
1717

18-
- The Performix target name.
19-
- The executable path and arguments on the target.
20-
- The workload's working directory and required environment variables.
21-
- Whether running the workload has side effects.
18+
- The Performix target name
19+
- The executable path and arguments on the target
20+
- The workload's working directory and required environment variables
21+
- Whether running the workload has side effects
2222

2323
## Create a run with Codex
2424

@@ -34,20 +34,20 @@ Choose the correct target, then ask Codex to run Code Hotspots. Keep collection
3434
Use Arm Performix to run the Code Hotspots recipe on target "<target-name>" with workload "<command>". Before starting, repeat the target and workload and ask me to confirm them. When the run completes, return its run ID and collection status.
3535
```
3636

37-
Replace:
37+
Replace the following placeholders:
3838

39-
- `<target-name>` with the Performix target name returned by Codex.
40-
- `<command>` with the command that starts your workload on the target.
39+
- `<target-name>` with the Performix target name returned by Codex
40+
- `<command>` with the command that starts your workload on the target
4141

4242
For example:
4343

4444
```text
4545
Use Arm Performix to run the Code Hotspots recipe on target "graviton-dev" with workload "/opt/myapp/bin/my_app --input /data/input.dat". Before starting, repeat the target and workload and ask me to confirm them. When the run completes, return its run ID and collection status.
4646
```
4747

48-
After you confirm, Codex uses the MCP server to start the recipe. Review any permission request before allowing the assistant to run a command on the target.
48+
After you confirm the target and workload, Codex uses the MCP server to start the recipe. Review any permission request before allowing the assistant to run a command on the target.
4949

50-
## Create a run with the Performix CLI
50+
## Create a run with the Arm Performix CLI
5151

5252
If you prefer to control collection from a terminal, first check that the recipe dependencies and workload are ready:
5353

@@ -66,12 +66,36 @@ apx recipe run code_hotspots \
6666
--timeout 30
6767
```
6868

69-
The `--timeout 30` option limits profiling to 30 seconds; it doesn't make a short workload run longer. Use a duration that captures representative behavior. Add `--working-dir`, `--env`, or `--source` when your workload needs a specific working directory, environment variables, or host-based source mapping. For an already-running process, replace `--workload` with `--pid <process-id>`.
69+
The `--timeout 30` option limits profiling to 30 seconds and doesn't make a short workload run longer. Use a duration that captures representative behavior.
70+
71+
Add `--working-dir`, `--env`, or `--source` when your workload needs a specific working directory, environment variables, or host-based source mapping. For an already-running process, replace `--workload` with `--pid <process-id>`.
7072

7173
When collection finishes, list the saved runs:
7274

7375
```bash
7476
apx run list
7577
```
7678

77-
Confirm that the new run completed successfully and record its run ID. You now have the stable identifier Codex needs to analyze the intended profile.
79+
Confirm that the new run completed successfully and record its run ID.
80+
81+
## Troubleshoot remote target authentication
82+
83+
If remote target authentication fails, check that:
84+
85+
- SSH key-based authentication works without an interactive password prompt.
86+
- The private key doesn't require an interactive passphrase.
87+
- Passwordless `sudo` is configured for the target user.
88+
- Strict host-key checking succeeds.
89+
- `~/.ssh/known_hosts` contains the target key and each jump-node key.
90+
91+
Use the Arm Performix target test to check the configured connection independently of Codex:
92+
93+
```bash
94+
apx target test --target <target-name>
95+
```
96+
97+
## What you've accomplished and what's next
98+
99+
You now have the stable identifier Codex needs to analyze the intended profile.
100+
101+
Next, you'll generate AI insights from a Code Hotspots run.

0 commit comments

Comments
 (0)