You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/_index.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,5 @@
1
1
---
2
-
title: Generate Arm Performix AI Insights in VS Code with Codex
3
-
4
-
draft: true
5
-
cascade:
6
-
draft: true
2
+
title: Generate Arm Performix AI insights in Visual Studio Code with Codex
7
3
8
4
description: Configure the Arm Performix MCP server for Codex in Visual Studio Code and use profile evidence to generate and validate AI Insights.
9
5
@@ -18,7 +14,7 @@ learning_objectives:
18
14
- Generate an AI Insight and validate its recommendations against profile evidence.
19
15
20
16
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.
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/).
22
18
- Visual Studio Code with the Codex extension installed.
23
19
- Access to Codex through ChatGPT sign-in, or an organization-approved OpenAI API key provided through the `OPENAI_API_KEY` environment variable.
24
20
- Permission from your organization to share profile data, symbols, source excerpts, disassembly excerpts, and performance metrics with Codex.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/configure_mcp_codex.md
+79-7Lines changed: 79 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,21 +9,21 @@ layout: learningpathall
9
9
---
10
10
## Choose a configuration method
11
11
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:
13
13
14
14
- Use the Codex extension settings.
15
15
- Run `codex mcp add` in a terminal.
16
16
- Edit `~/.codex/config.toml`.
17
17
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.
19
19
20
20
{{% 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.
22
22
{{% /notice %}}
23
23
24
24
## Configure the server in the Codex extension
25
25
26
-
To add the server in Visual Studio Code:
26
+
To add the server in VS Code:
27
27
28
28
1. Open the Codex sidebar and select the gear icon.
29
29
2. Select **MCP servers**, then select **Add server**.
@@ -126,4 +128,74 @@ List the Arm Performix Code Hotspots runs that can be used to generate an AI Ins
126
128
127
129
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.
128
130
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 troubleshoot issues with MCP connection:
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:
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 have an available 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/).
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/create_a_code_hotspots_run.md
+34-10Lines changed: 34 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Create a Code Hotspots run
2
+
title: Create an Arm Performix Code Hotspots run
3
3
4
4
weight: 4
5
5
@@ -9,16 +9,16 @@ layout: learningpathall
9
9
---
10
10
## Prepare a representative workload
11
11
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/).
13
13
14
14
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.
15
15
16
16
Before profiling, make sure you know:
17
17
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
22
22
23
23
## Create a run with Codex
24
24
@@ -36,8 +36,8 @@ Use Arm Performix to run the Code Hotspots recipe on target "<target-name>" with
36
36
37
37
Replace:
38
38
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
41
41
42
42
For example:
43
43
@@ -66,12 +66,36 @@ apx recipe run code_hotspots \
66
66
--timeout 30
67
67
```
68
68
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>`.
70
72
71
73
When collection finishes, list the saved runs:
72
74
73
75
```bash
74
76
apx run list
75
77
```
76
78
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've now got the stable identifier Codex needs to analyze the intended profile.
100
+
101
+
Next, you'll generate AI insights from a Code Hotspots run.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/generate_ai_insights.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Generate AI Insights
2
+
title: Generate Arm Performix AI insights for a Code Hotspots run
3
3
4
4
weight: 5
5
5
@@ -51,6 +51,22 @@ Which additional Performix recipe or view would distinguish between those explan
51
51
What is the first optimization I should try, and why?
52
52
```
53
53
54
+
## Improve a generic AI Insight
55
+
56
+
Ask for one finding and its evidence:
57
+
58
+
```text
59
+
Focus on the highest-impact finding in run ID "<run-id>". Cite the measured evidence, distinguish hypotheses from observations, and identify the next Performix view or recipe to inspect.
60
+
```
61
+
62
+
For a known hotspot:
63
+
64
+
```text
65
+
For function "<function-name>" in run ID "<run-id>", summarize what Code Hotspots proves, what it doesn't prove, and which additional evidence is needed to identify the root cause.
66
+
```
67
+
68
+
If the response remains generic, confirm that the run has enough samples, symbols, source mapping, and disassembly. Code Hotspots locates sampled CPU time; use a more specific Performix recipe when you need evidence about microarchitecture, instruction mix, or memory access.
69
+
54
70
## Iterate and measure
55
71
56
72
After you review the evidence, use a controlled optimization loop:
@@ -64,4 +80,8 @@ After you review the evidence, use a controlled optimization loop:
64
80
65
81
Codex can help with more of this loop if your environment exposes build, deployment, remote-execution, or source-control tools. Review proposed code changes and command approvals before Codex applies or runs them.
66
82
67
-
You have now generated an evidence-based hypothesis. Next, open the same run in Arm Performix to inspect the underlying profile views.
83
+
## What you've accomplished and what's next
84
+
85
+
You've now generated an evidence-based hypothesis.
86
+
87
+
Next, you'll open the same run in Arm Performix to inspect the underlying profile views.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/performix-agentic-dynamic-insights-codex/open-in-performix.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,4 +22,8 @@ Use the AI Insight to focus your investigation, not replace it. For example, if
22
22
23
23
For a before-and-after comparison, keep the workload, target, input, thread count, CPU affinity, and collection settings consistent. A lower sample percentage doesn't prove that a function became faster if total runtime or the surrounding workload changed.
24
24
25
-
You have configured the Performix MCP server, selected or created a Code Hotspots run, generated an AI Insight, and checked its recommendation against the profile. Continue with the [Arm Performix getting-started video](https://youtu.be/_eX8ZpNT0kc) to explore the graphical workflow.
25
+
## What you've accomplished
26
+
27
+
You've now configured the Performix MCP server, selected or created a Code Hotspots run, generated an AI Insight, and checked its recommendation against the profile.
28
+
29
+
You can continue with the [Arm Performix getting-started video](https://youtu.be/_eX8ZpNT0kc) to explore the graphical workflow.
title: Understand the AI-assisted Arm Performix insight workflow
3
3
4
4
weight: 2
5
5
6
6
description: Learn how Codex uses the Arm Performix MCP server to turn profiling data into evidence-based performance recommendations.
7
7
8
8
layout: learningpathall
9
9
---
10
-
## Understand the AI-assisted profiling workflow
10
+
## Arm Performix local MCP server
11
11
12
12
[Arm Performix](https://developer.arm.com/servers-and-cloud-computing/arm-performix) is a performance toolkit designed to help developers identify bottlenecks and validate improvements on Arm-based systems. It simplifies the process of turning low-level performance data into actionable insights through guided analysis paths called recipes. These recipes help you answer common performance questions and move quickly from observation to root cause.
13
13
14
14
Arm Performix includes a local Model Context Protocol (MCP) server. MCP is a standard way for an AI assistant to discover and call tools. The server lets Codex query Performix recipes, targets, and runs from Visual Studio Code instead of relying on source-code analysis alone.
15
15
16
-
You will connect the server to Codex, select or create a Code Hotspots run, and ask for an AI Insight. The response should connect each recommendation to evidence from the selected run.
16
+
You'll connect the server to Codex, select or create a Code Hotspots run, and ask for an AI Insight. The response should connect each recommendation to evidence from the selected run.
17
17
18
-
The MCP server runs on the same host as Codex. It can make profile data, symbols, source excerpts, disassembly excerpts, and performance metrics available to the assistant. Confirm that this use complies with your organization's data-handling policy before you continue.
18
+
{{% notice Important %}}
19
+
The MCP server runs on the same host as Codex. It can make profile data, symbols, source excerpts, disassembly excerpts, and performance metrics available to the assistant. Before you continue, confirm that this use complies with your organization's data-handling policy.
20
+
{{% /notice %}}
19
21
20
22
Use AI-generated responses to support performance investigation. Validate important findings by reviewing the relevant data in Arm Performix and by rerunning the workload after making changes.
21
23
22
-
## How it works
24
+
## Arm Performix insights workflow
23
25
24
-
Arm Performix stores profiling runs, target information, and rendered analysis data. Its MCP server exposes select Performix capabilities as tools that an MCP-compatible assistant can call.
26
+
Arm Performix stores profiling runs, target information, and rendered analysis data. The local MCP server exposes select Performix capabilities as tools that an MCP-compatible assistant can call.
25
27
26
28
When you ask for insights, the flow is:
27
29
@@ -32,4 +34,8 @@ When you ask for insights, the flow is:
32
34
33
35
The available evidence depends on how the run was collected. Debug symbols and source mappings improve function and source-line attribution, while a representative profiling duration improves sampling quality.
34
36
35
-
Next, configure the local MCP server and verify that Codex can use its tools.
37
+
## What you've learned and what's next
38
+
39
+
You've learned about Arm Performix's local MCP server and the workflow that's executed when you ask for insights using Codex.
40
+
41
+
Next, you'll configure the local MCP server and verify that Codex can use its tools.
0 commit comments