Overview
Parsing dense terminal logs during application profiling often obscures critical performance bottlenecks. Part of the modern GNU profiling suite (gprofng), gp-display-html streamlines performance analysis by transforming raw execution traces into an interactive, browser-friendly dashboard. Through navigable call graphs and detailed function-level CPU metrics, engineers can swiftly pinpoint resource-heavy code paths. This walkthrough demonstrates the end-to-end workflow on Ubuntu—spanning utility setup, instrumenting a sample C benchmark, and producing production-ready HTML profiling reports.
1. Provisioning gprofng and Required Build Toolchains
Begin by refreshing the APT repository metadata and pulling down the GNU binary utilities (binutils), which ship with the gprofng toolchain, alongside gcc for compiling test executables.

Verify that the gp-display-html utility has installed cleanly and is reachable within the standard execution environment.

The gp-display-html command digests experiment archives collected via GNU gprofng, synthesizing those raw data structures into a multi-page HTML analytics dashboard viewable in standard web browsers.
⚙️ [Command Flags & Options]
--help : Displays command syntax alongside available configuration arguments.--version : Prints the installed release version, legal notices, and build metadata.-o, --output=<dir> : Defines the target directory where output HTML assets will be written.-O, --overwrite : Forces an overwrite if the chosen output directory already exists on disk.--title=<title> : Embeds a customized header banner across the generated web reports.--htmlpath=<path> : Designates a browser binary to automatically spawn the dashboard after compilation.

2. Crafting and Compiling a Target Benchmark Application
To keep testing artifacts isolated, create a dedicated workspace folder and change into it via mkdir -p ~/profiling_lab && cd ~/profiling_lab.

Next, generate a sample C source file, compute.c, designed with unbalanced workloads across routines to produce distinct CPU consumption metrics during profiling.

Build the test program into a standalone executable named compute. Enabling compiler optimization (-O2) combined with debugging symbols (-g) ensures realistic execution flow while maintaining clear source line mapping.

Confirm successful generation of the compute binary, checking file size and execution attributes with ls -lh compute.

3. Capturing Runtime Performance Metrics with gp-collect-app
Ensure your active shell is stationed within the experimentation workspace using cd ~/profiling_lab.

Execute gp-collect-app ./compute to monitor the target binary across its execution cycle. This command tracks active CPU time, memory events, and call trees, writing all telemetry into a newly provisioned experiment repository named test.1.er.

Verify that the profiling engine successfully initialized and closed out the experiment directory by inspecting permissions and attributes with ls -ld test.*.er.

4. Generating Interactive HTML Analytics via gp-display-html
Maintain your position inside the profiling environment with cd ~/profiling_lab.

Programmatically target the most recent profile capture archive and direct gp-display-html to render complete web dashboards under html_report via the -o parameter.

Inspect the newly created html_report directory via ls -la html_report to ensure the core dashboard entry point (index.html) and associated static assets were exported cleanly.

Review the header structure and document metadata of the generated dashboard by reading the initial lines of the index file through head -n 25 html_report/index.html.

This complete sequence demonstrates how modern Linux systems harness gp-display-html to translate low-level performance traces into intuitive visual dashboards. Leveraging these clear representations allows engineering teams to diagnose hotspots quickly and refine application efficiency with confidence.