Skip to content
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

Trace encoder behavior when using etrigger/itrigger with start, stop and notify actions #192

Closed
Muhammad-Saadi-Abbasi opened this issue Jan 25, 2025 · 2 comments

Comments

@Muhammad-Saadi-Abbasi
Copy link

An etrigger/itrigger is a type of trigger fired when a trap occurs. I have a couple of questions related to the trace encoder's behavior when the action of these triggers is either trace on, trace off, or trace notify.

Consider the following sequence of instructions for each question:

  • X (the instruction before trap)
  • Y (traps, either due to exception or interrupt)
  • Z (first instruction of trap handler)
  1. For the above instruction sequence, if an etrigger/itrigger fires with the action "trace on" (obviously fired on the trap), what should be the first instruction reported, Y or Z? If Y is reported, how can it be represented using a trap packet? The trap packet's address field points to instruction Y, and then the address of instruction Z is reported via a sync packet because if trap packet's address field points to instruction Z then the decoder can't know that which instruction's trap information is this. OR The same question without triggers: what is the encoder's behavior if the first instruction traced traps?

  2. For the above instruction sequence, if an etrigger/itrigger fires with the action "trace notify," what should be the behavior of the trace encoder?
    The trace encoder is already going to report instruction X (because it retired before the trap) and instruction Z via a trap packet containing the trap information for instruction Y, assuming Y is not the target of an uninferable PC discontinuity. Since the trap packet doesn’t include a notify bit, does this mean the trace encoder should behave as it normally does when a trap occurs, or is some special handling required?

  3. For the above instruction sequence, if an etrigger/itrigger fires with the action "trace off," what should be the value of the QualStat field in the support packet, which indicates that the trace has been disabled? The last instruction is reported via a trap packet with the address pointing to the trap handler, not because it is the last traced instruction. In this case, the QualStat value should be ended_ntr? However, the specification states that the QualStat value should be ended_ntr when the last instruction is reported because it is the target of uninferable PC discontinuity. The spec states Interrupts and exceptions are another form of uninferable PC discontinuity so QualStat value should be ended_ntr, correct?

@IainCRobertson
Copy link
Collaborator

IainCRobertson commented Jan 27, 2025 via email

@Muhammad-Saadi-Abbasi
Copy link
Author

Thanks.

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

No branches or pull requests

2 participants