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-mcp-agent/4-optimize.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ The only remaining hotspot is `Mandelbrot::draw` itself at ~98.6% of samples, wh
81
81
82
82
## What you've accomplished
83
83
84
-
You've now applied AI-suggested optimizations to the Mandelbrot application.
84
+
You've now applied AI-suggested optimizations — such as replacing `std::complex<double>` with plain `double` arithmetic, enabling `-03` for compiler optimizations, and eliminating sqrt in the escape check — to the Mandelbrot application.
85
85
86
86
The cumulative result, measured by profile sample counts, was a reduction from approximately 48,750 baseline samples to approximately 3,997 — a ~12x speedup — through three rounds of code changes, each validated by a re-profile before moving to the next.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/performix-mcp-agent/_index.md
+49-1Lines changed: 49 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,57 @@ prerequisites:
19
19
- Access to Arm Performix configured with the remote Arm target. See the [Arm Performix install guide](/install-guides/performix/) for setup instructions
You'll combine the Arm MCP Server's `apx_recipe_run` tool with an AI agent to drive the complete Code Hotspots workflow to profile on Arm Neoverse. First, you'll build an intentionally unoptimized Mandelbrot
38
+
C++ application on a remote Arm Linux target, then use a GitHub Copilot prompt file to run
39
+
the Performix Code Hotspots recipe. The agent confirms target details, executes collection,
40
+
and returns a flame graph with structured hotspot data to pinpoint the hottest functions.
41
+
Guided by the agent, you'll apply concrete code changes, such as math simplifications and enabling
42
+
a higher optimization level, directly on the server over SSH. Then, you'll re-run the recipe to compare
43
+
results. The end-to-end flow keeps profiling, interpretation, and edits within a single AI-assisted
44
+
loop.
45
+
faqs:
46
+
- question: Which prompt file should I use to run the Code Hotspots recipe?
47
+
answer: >-
48
+
Use the `arm-hotspots-optimization` prompt file from the Arm MCP Server repository with GitHub
49
+
Copilot. It directs the agent to confirm the remote target, run the recipe, and return structured
50
+
profiling results.
51
+
- question: What result should I expect after the profiling run completes?
52
+
answer: >-
53
+
Expect a flame graph and a hotspot summary that highlights the hottest functions in the
54
+
Mandelbrot application. Use these outputs to guide which code changes to apply first.
55
+
- question: Should I compile the Mandelbrot example with optimizations before profiling?
56
+
answer: >-
57
+
No. The single-threaded, unoptimized build is intentional so the hotspot analysis produces
58
+
a clear signal. The agent later proposes enabling -O3 as part of the optimization pass.
59
+
- question: How do I know the agent is targeting the correct machine?
60
+
answer: >-
61
+
The agent explicitly confirms your remote target details before running the Code Hotspots
62
+
recipe. Review this confirmation and proceed only if it matches your intended Arm target.
63
+
- question: What should I check if the Code Hotspots run fails to start?
64
+
answer: >-
65
+
Confirm that Arm Performix is configured with your remote Arm target and that the MCP Server
66
+
can reach it over SSH. Also verify that the Mandelbrot application builds on the target
0 commit comments