riscv-non-isa / riscv-trace-spec

RISC-V Processor Trace Specification
https://jira.riscv.org/browse/RVG-88
Creative Commons Attribution 4.0 International
152 stars 47 forks source link

Format 2 irreport/irdepth when stopping trace #134

Open pdonahue-ventana opened 1 month ago

pdonahue-ventana commented 1 month ago

If tracing stops for any reason, the address of the final traced instruction must be output.

This might involve a format 2 packet if there's no unreported branch information. The "Format 2 irreport and irdepth" section says:

In some cases it is also necessary to report the current stack depth or call count if the packet is reporting the last instruction before an exception, interrupt, privilege change or resync.

What if tracing stops while we're in this recursive situation? Should it report the stack depth before an exception, interrupt, privilege change, resync, or stopping trace? Or is that not necessary?

@IainCRobertson

IainCRobertson commented 1 month ago

Paul, Yes, the list should also include stopping trace.

Iain

From: Paul Donahue @.> Sent: 12 August 2024 18:50 To: riscv-non-isa/riscv-trace-spec @.> Cc: Robertson, Iain (DI SW ICS DDCP TST RD EAH) @.>; Mention @.> Subject: [riscv-non-isa/riscv-trace-spec] Format 2 irreport/irdepth when stopping trace (Issue #134)

If tracing stops for any reason, the address of the final traced instruction must be output.

This might involve a format 2 packet if there's no unreported branch information. The "Format 2 irreport and irdepth" section says:

In some cases it is also necessary to report the current stack depth or call count if the packet is reporting the last instruction before an exception, interrupt, privilege change or resync.

What if tracing stops while we're in this recursive situation? Should it report the stack depth before an exception, interrupt, privilege change, resync, or stopping trace? Or is that not necessary?

@IainCRobertsonhttps://github.com/IainCRobertson

- Reply to this email directly, view it on GitHubhttps://github.com/riscv-non-isa/riscv-trace-spec/issues/134, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALQOPSW6WPQJGYCCCBYMZHTZRDYTZAVCNFSM6AAAAABMMUT6P6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3DCNJXG4YTQNI. You are receiving this because you were mentioned.Message ID: @.**@.>>