Skip to content

feat(hpm): add descriptions to HPM events - #157

Open
good-circle wants to merge 1 commit into
masterfrom
kunminghu-v2-hpm
Open

feat(hpm): add descriptions to HPM events#157
good-circle wants to merge 1 commit into
masterfrom
kunminghu-v2-hpm

Conversation

@good-circle

Copy link
Copy Markdown
Contributor

Carry an event description together with each HPM name and value, preserving the metadata while events pass through module boundaries. Add the small HPMDocDump utility that writes the four event sets to build/hpm.csv when elaboration requests a dump.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class event metadata (name/value/description) for HPM performance events so descriptions can flow across module boundaries, and introduces a small utility to dump documented event sets to a CSV during elaboration.

Changes:

  • Introduce PerfEventInfo(name, value, description) and migrate HasPerfEvents/HPM monitor code to use it.
  • Add a tuple extension method (withDescription) to conveniently construct PerfEventInfo.
  • Add HPMDocDump utility to emit a build/hpm.csv containing ordered event sets.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/main/scala/utility/package.scala Adds an implicit helper to attach descriptions to (String, UInt) perf event tuples.
src/main/scala/utility/HPMDocDump.scala New CSV dump utility for registered HPM event sets.
src/main/scala/utility/HardwarePerfMonitor.scala Introduces PerfEventInfo and updates perf event plumbing to preserve descriptions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/main/scala/utility/HPMDocDump.scala Outdated
Carry an event description together with each HPM name and value, preserving the metadata while events pass through module boundaries. Add the small HPMDocDump utility that writes the four event sets to build/hpm.csv when elaboration requests a dump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants