-
Notifications
You must be signed in to change notification settings - Fork 78
Add Smctr/Ssctr YAML and properly attribute SCTRCLR to them #554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4674bdf
Add Smctr/Ssctr YAML and properly attribute SCTRCLR to them
dfe4494
Make Smctr/Ssctr require S and Smcsrind/Sscsrind
8c95734
data(inst): add long_name and description for sctclr
dhower-qc c133198
refactor(data): convert SCTRCLR description to array form
dhower-qc 74e6237
Update sctrclr.yaml
dhower-qc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # yaml-language-server: $schema=../../schemas/ext_schema.json | ||
|
|
||
| $schema: "ext_schema.json#" | ||
| kind: extension | ||
| name: Smctr | ||
| long_name: Control Transfer Records | ||
| description: | | ||
| A method for recording control flow transfer history is valuable not only for performance | ||
| profiling but also for debugging. | ||
| Control flow transfers refer to jump instructions (including function calls and returns), taken | ||
| branch instructions, traps, and trap returns. | ||
| Profiling tools, such as Linux perf, collect control transfer history when sampling software | ||
| execution, thereby enabling tools, like AutoFDO, to identify hot paths for optimization. | ||
|
|
||
| Control flow trace capabilities offer very deep transfer history, but the volume of data produced | ||
| can result in significant performance overheads due to memory bandwidth consumption, buffer | ||
| management, and decoder overhead. | ||
| The Control Transfer Records (CTR) extension provides a method to record a limited history in | ||
| register-accessible internal chip storage, with the intent of dramatically reducing the | ||
| performance overhead and complexity of collecting transfer history. | ||
|
|
||
| CTR defines a circular (FIFO) buffer. Each buffer entry holds a record for a single recorded | ||
| control flow transfer. | ||
| The number of records that can be held in the buffer depends upon both the implementation (the | ||
| maximum supported depth) and the CTR configuration (the software selected depth). | ||
|
|
||
| Only qualified transfers are recorded. | ||
| Qualified transfers are those that meet the filtering criteria, which include the privilege mode | ||
| and the transfer type. | ||
|
|
||
| Recorded transfers are inserted at the write pointer, which is then incremented, while older | ||
| recorded transfers may be overwritten once the buffer is full. | ||
| Or the user can enable RAS (Return Address Stack) emulation mode, where only function calls are | ||
| recorded, and function returns pop the last call record. | ||
| The source PC, target PC, and some optional metadata (transfer type, elapsed cycles) are stored | ||
| for each recorded transfer. | ||
|
|
||
| The CTR buffer is accessible through an indirect CSR interface, such that software can specify | ||
| which logical entry in the buffer it wishes to read or write. | ||
| Logical entry 0 always corresponds to the youngest recorded transfer, followed by entry 1 as the | ||
| next youngest, and so on. | ||
| type: privileged | ||
| versions: | ||
| - version: "1.0.0" | ||
| state: ratified | ||
| ratification_date: 2024-11 | ||
| implies: | ||
| name: Ssctr | ||
| version: "1.0.0" | ||
| requires: | ||
| allOf: | ||
| - name: S | ||
| version: ~> 1.13 # The latest ratified version of S when Sscntr was ratified | ||
| - name: Smcsrind | ||
| version: ~> 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # yaml-language-server: $schema=../../schemas/ext_schema.json | ||
|
|
||
| $schema: "ext_schema.json#" | ||
| kind: extension | ||
| name: Ssctr | ||
| long_name: Control Transfer Records | ||
| description: | | ||
| The supervisor view of `Smctr`. | ||
| type: privileged | ||
| versions: | ||
| - version: "1.0.0" | ||
| state: ratified | ||
| ratification_date: 2024-11 | ||
ThinkOpenly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| requires: | ||
| allOf: | ||
| - name: S | ||
| version: ~> 1.13 # The latest ratified version of S when Sscntr was ratified | ||
| - name: Sscsrind | ||
| version: ~> 1.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.