Skip to content

Commit e840ab4

Browse files
authored
Merge pull request #3523 from pareenaverma/content_review
Tech review of the Performix MCP server insights LP
2 parents f9e4820 + 9bd7c05 commit e840ab4

8 files changed

Lines changed: 300 additions & 206 deletions

File tree

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

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
---
2-
title: Use Arm Performix Agentic Dynamic Insights from VS Code with Codex
2+
title: Generate Arm Performix AI Insights in VS Code with Codex
33

44
draft: true
55
cascade:
66
draft: true
77

8-
description: This Learning Path shows how to configure the Arm Performix MCP server with the Codex extension in Visual Studio Code, then generate AI Insights for an existing Arm Performix profiling run.
8+
description: Configure the Arm Performix MCP server for Codex in Visual Studio Code and use profile evidence to generate and validate AI Insights.
99

1010
minutes_to_complete: 20
1111

1212
who_is_this_for: This Learning Path is for software developers and performance engineers who want to optimize applications on Arm-based servers using Arm Performix.
1313

1414
learning_objectives:
15-
- Configure the Arm Performix MCP server in the Codex extension for VS Code.
16-
- Check that the assistant can see Arm Performix recipes and runs.
17-
- Ask the assistant to list available Arm Performix runs.
18-
- Generate AI Insights for a supported code hotspots run.
19-
- Use the result to decide where to inspect or optimize next.
15+
- Configure the Arm Performix MCP server for the Codex extension in VS Code.
16+
- Verify that Codex can access Arm Performix recipes, targets, and runs.
17+
- Create or select a supported Code Hotspots run.
18+
- Generate an AI Insight and validate its recommendations against profile evidence.
2019

2120
prerequisites:
22-
- Arm Performix version 2026.2.5 or later installed. Refer to the [Install Guide](https://learn.arm.com/install-guides/performix/) for instructions.
23-
- Visual Studio Code installed with the Codex extension.
24-
- Permission to use your organization-approved AI assistant with profile data, symbols, source excerpts, disassembly excerpts, and performance metrics.
25-
- For remote Linux targets, configure key-based SSH access before using the Arm Performix MCP server.
26-
- If you connect to your target as a non-root user, some recipes or target configurations might require passwordless sudo.
27-
- Make sure your SSH known_hosts file contains the target host key.
28-
- If your target configuration uses jump nodes, make sure known_hosts also contains the host key for each jump node.
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.
2925

3026
author:
3127
- Julie Gaskin
@@ -39,30 +35,28 @@ operatingsystems:
3935
- Linux
4036
tools_software_languages:
4137
- Arm Performix
42-
- C++
43-
- GCC
38+
- Codex
39+
- Model Context Protocol
40+
- Visual Studio Code
4441

4542
further_reading:
4643
- resource:
47-
title: Install guide
44+
title: Arm Performix install guide
4845
link: https://learn.arm.com/install-guides/performix
4946
type: documentation
5047
- resource:
51-
title: User guide
48+
title: Arm Performix User Guide
5249
link: https://developer.arm.com/documentation/110163/latest/
5350
type: documentation
5451
- resource:
55-
title: Code hotspots learning path
52+
title: Find Code Hotspots with Arm Performix
5653
link: https://learn.arm.com/learning-paths/servers-and-cloud-computing/cpu_hotspot_performix
57-
type: learning path
54+
type: documentation
5855
- resource:
59-
title: CPU microarchitecture learning path
56+
title: Tune application performance with Arm Performix CPU Microarchitecture
6057
link: https://learn.arm.com/learning-paths/servers-and-cloud-computing/performix-microarchitecture
61-
type: learning path
62-
- resource:
63-
title: Migrating applications to Arm servers
64-
link: https://learn.arm.com/learning-paths/servers-and-cloud-computing/migration/
65-
type: learning path
58+
type: documentation
59+
6660

6761
### FIXED, DO NOT MODIFY
6862
# ================================================================================

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

Lines changed: 73 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,98 +3,127 @@ title: Configure the Arm Performix MCP server in Codex
33

44
weight: 3
55

6+
description: Add the local Arm Performix MCP server to Codex and verify that the extension can access Performix tools and profiling runs.
7+
68
layout: learningpathall
79
---
8-
There are 3 ways to configure the MCP server:
10+
## Choose a configuration method
911

10-
- Through VS Code's GUI
11-
- Through the Codex CLI
12-
- By editing the Codex configuration file: `~/.codex/config.toml`.
12+
Codex CLI and the Codex extension share MCP configuration on the same host. Choose one of these methods:
1313

14-
## Configure the MCP server through VS Code
14+
- Use the Codex extension settings.
15+
- Run `codex mcp add` in a terminal.
16+
- Edit `~/.codex/config.toml`.
1517

16-
Use the following procedure in Visual Studio Code:
18+
You only need to complete one method. The MCP server is a local standard input/output (STDIO) process started by the `apx` executable.
1719

18-
1. Open Visual Studio Code and open the Codex sidebar.
19-
2. Open Codex settings.
20-
3. In the Codex Settings tab, select MCP servers.
21-
4. Click + Add server.
22-
5. In the Name field, enter a name such as arm-performix.
23-
6. In the Command to launch field, enter the path to the Arm Performix `apx` executable.
24-
Default paths include:
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.
22+
{{% /notice %}}
2523

26-
```
24+
## Configure the server in the Codex extension
25+
26+
To add the server in Visual Studio Code:
27+
28+
1. Open the Codex sidebar and select the gear icon.
29+
2. Select **MCP servers**, then select **Add server**.
30+
3. Enter `arm-performix` for the server name.
31+
4. Select **STDIO** as the transport.
32+
5. Enter the full path to the Arm Performix `apx` executable in the command field.
33+
34+
On macOS:
35+
36+
```text
2737
/Applications/Arm Performix.app/Contents/assets/apx/apx
38+
```
39+
40+
On Linux:
2841
42+
```text
2943
/opt/Arm Performix/assets/apx/apx
3044
```
3145
32-
On Windows, the default installation directory depends on whether Arm Performix was installed for one user or all users:
46+
On Windows with an all-users installation:
3347
48+
```text
49+
C:\Program Files\Arm Performix\assets\apx\apx.exe
3450
```
35-
C:\Users\<username>\AppData\Local\Programs\Arm Performix
3651
37-
C:\Program Files\Arm Performix
52+
On Windows with a single-user installation:
53+
54+
```text
55+
C:\Users\<username>\AppData\Local\Programs\Arm Performix\assets\apx\apx.exe
3856
```
3957
40-
7. In the Arguments field, add:
58+
6. Add one argument:
4159
42-
```
60+
```text
4361
mcp
4462
start
4563
```
4664
47-
8. Click **Save** and restart the Codex extension.
65+
7. Select **Save**, then select **Restart extension**.
4866
49-
## Configure the MCP server using Codex CLI
67+
## Configure the MCP server with Codex CLI
5068
51-
Alternatively, you can use Codex's CLI to add an MCP server. Replace `<path-to-apx>` with the path to the `apx` executable on your system. If the path contains spaces, put the path in double quotation marks.
69+
If the `codex` command is available in your terminal, add the same STDIO server from the command line. Replace `<path-to-apx>` with the full executable path for your host:
5270
53-
```
71+
```bash
5472
codex mcp add arm-performix -- "<path-to-apx>" mcp start
5573
```
5674

5775
For example, on macOS:
5876

59-
```
77+
```bash
6078
codex mcp add arm-performix -- "/Applications/Arm Performix.app/Contents/assets/apx/apx" mcp start
6179
```
6280

63-
## Configure the MCP server in the Codex configuration file
64-
65-
You can also configure the MCP server by editing the Codex configuration file directly.
81+
Restart the Codex extension after the command completes.
6682

67-
1. Open this file in a text editor: `~/.codex/config.toml`
83+
## Configure the server in `config.toml`
6884

69-
2. Add a server entry:
85+
For direct configuration, open `~/.codex/config.toml` and add:
7086

71-
```
72-
[mcp_servers.arm-performix]
87+
```toml
88+
[mcp_servers.arm-performix]
89+
command = "/Applications/Arm Performix.app/Contents/assets/apx/apx"
90+
args = ["mcp", "start"]
91+
```
7392

74-
command = "/Applications/Arm Performix.app/Contents/assets/apx/apx"
93+
Replace `command` with the full path to `apx` on your host. Save the file and restart the Codex extension.
7594

76-
args = ["mcp", "start"]
77-
```
95+
On Windows, use a TOML literal string so backslashes in the path aren't treated as escape characters:
7896

79-
3. Replace the command value with the path to the apx executable on your system.
80-
4. Save the file and restart the Codex extension.
97+
```toml
98+
[mcp_servers.arm-performix]
99+
command = 'C:\Program Files\Arm Performix\assets\apx\apx.exe'
100+
args = ["mcp", "start"]
101+
```
81102

82103
## Check that the MCP server is connected
83104

84-
Before generating insights, ask Codex to confirm that it can see Arm Performix data:
105+
If the `codex` command is available, confirm that Codex loaded the configuration:
85106

86-
```
87-
List the available Arm Performix recipes and profiling runs. If no code hotspots runs are available, tell me that the MCP server is connected but there are no supported runs to analyze.
107+
```bash
108+
codex mcp list
88109
```
89110

90-
If the assistant lists Arm Performix recipes or runs, the MCP server is connected.
111+
Find `arm-performix` in the server list and check that its command and `mcp` argument are correct. If you don't use Codex CLI, open **MCP servers** from the Codex gear menu to review the same status.
91112

92-
To narrow the result, include a workload name, recipe, or time period:
113+
Configuration alone doesn't prove that the tools can read Performix data. In a new Codex chat, enter:
93114

115+
```text
116+
Use the Arm Performix MCP server to list the available recipes and profiling runs. For each run, include its run ID, recipe, target, workload, and creation time when those fields are available.
94117
```
95-
Show me a list of Arm Performix runs for which AI insights are available.
118+
119+
If Codex returns Performix recipes or runs, the end-to-end connection works. An empty run list isn't a connection failure if recipes or targets are returned.
120+
121+
Next, ask Codex to identify runs that support the insight workflow:
122+
123+
```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.
96125
```
97126

98-
Review the returned runs and identify the run you want to analyze. Note the run name or run ID.
127+
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.
99128

100-
If no supported Code Hotspots runs are available, you can create one from VS Code by asking the assistant to use the Arm Performix MCP server.
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.

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

Lines changed: 51 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,75 @@ title: Create a Code Hotspots run
33

44
weight: 4
55

6+
description: Create a representative Arm Performix Code Hotspots run through Codex or the Performix CLI and record its run ID.
7+
68
layout: learningpathall
79
---
8-
If no supported Code Hotspots runs are available, you can create one from VS Code by asking the assistant to use the Arm Performix MCP server.
10+
## Prepare a representative workload
911

10-
First, ask the assistant to list the configured targets:
12+
You can skip this section if you already selected a supported Code Hotspots run.
1113

12-
```
13-
List the available Arm Performix targets
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+
16+
Before profiling, make sure you know:
1517

16-
Choose the target that should run your workload, then ask the assistant to run Code Hotspots and generate insights from the result:
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.
1722

23+
## Create a run with Codex
24+
25+
First, ask Codex to list the configured targets:
26+
27+
```text
28+
Use the Arm Performix MCP server to list the configured targets. Include each target's name and connection status when available.
1829
```
19-
Run the Code Hotspots recipe on the target named "<target name>" with this workload: "<command>".
20-
When the run completes, generate AI insights for that run. Suggest where I should start investigating next.
30+
31+
Choose the correct target, then ask Codex to run Code Hotspots. Keep collection and analysis as separate requests so you can confirm the target and workload before remote execution:
32+
33+
```text
34+
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.
2135
```
2236

2337
Replace:
2438

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

27-
- `<command>` with the command that starts your workload on the target.
42+
For example:
2843

29-
For example:
44+
```text
45+
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.
46+
```
47+
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.
49+
50+
## Create a run with the Performix CLI
51+
52+
If you prefer to control collection from a terminal, first check that the recipe dependencies and workload are ready:
3053

54+
```bash
55+
apx recipe ready code_hotspots \
56+
--target my-target \
57+
--workload "/opt/myapp/bin/my_app --input /data/input.dat"
3158
```
32-
Run the Code Hotspots recipe on the target named "graviton-dev" with this workload: "/opt/myapp/bin/my_app --input /data/input.dat".
59+
60+
If Performix reports missing or outdated target tools, deploy them as part of the run:
61+
62+
```bash
63+
apx recipe run code_hotspots \
64+
--target my-target \
65+
--workload "/opt/myapp/bin/my_app --input /data/input.dat" \
66+
--timeout 30
3367
```
3468

35-
The assistant uses the Arm Performix MCP server to prepare the target, run the Code Hotspots recipe.
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>`.
3670

37-
If you prefer to run the profile manually, use the Performix CLI:
71+
When collection finishes, list the saved runs:
3872

39-
```
40-
apx recipe ready code_hotspots --target my-target --workload "/opt/myapp/bin/my_app --input /data/input.dat"
41-
42-
apx recipe run code_hotspots --target my-target --workload "/opt/myapp/bin/my_app --input /data/input.dat" --timeout 30
73+
```bash
74+
apx run list
4375
```
4476

45-
Use `--timeout` for unattended profiling so the run ends automatically. If you are profiling an already-running process, use `--pid` instead of `--workload`.
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.

0 commit comments

Comments
 (0)