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

Selective branch tracing enhancement #503

Open
Fish-Git opened this issue Sep 18, 2022 · 1 comment
Open

Selective branch tracing enhancement #503

Fish-Git opened this issue Sep 18, 2022 · 1 comment
Labels
Enhancement This issue does not describe a problem but rather describes a suggested change or improvement.

Comments

@Fish-Git
Copy link
Member

Fish-Git commented Sep 18, 2022

This is the formal enhancement request originally made in another unrelated issue.

What is requested is a new instruction tracing feature that provides the ability to only trace branches that occur within a given address range , and, optionally, whose branch target is within a given address range (where the target range can optionally be specified as either the same range or a completely different range).

For example: given the pseudo-program segment:

    1            LTR   R5,R5
    2            BZ    SKIP
    3            L     R15,ASYS1
    4            BASR  R14,R15      Call system function
    5   SKIP     CLR   R6,R7
    6            BH    ERROR
    7            ...
    8            ...
    9   ERROR    BAS   14,MYMSGSUB
    10           ...
    11           ...
    12  MYMSGSUB ST    R14,SAVE14
    13           ...
    14           L     R15,IOFUNC
    15           BASR  R14,R15      Call system function
    16           ...
    17           L     R14,SAVE14
    18           BR    R14

What is desired is the ability to specify e.g. t+ branches 1-11 into same, which would only trace the branches at 2 and 6, but not the branches at 4 (target outside of range) or 9 (same reason: target outside of range) or 15 (branch instruction itself outside of range) or 18 (same reason: branch instruction itself outside of range).

This GitHub Issue is being created to simply formalize the request since it was originally made in a different issue regarding a different matter.

@Fish-Git Fish-Git added the Enhancement This issue does not describe a problem but rather describes a suggested change or improvement. label Sep 18, 2022
@Fish-Git
Copy link
Member Author

Fish-Git commented Feb 8, 2023

FYI:

Page 131 of IBM reference manual SC24-6334-73 "z/VM 7.3 Virtual Machine Operation" documents z/VM's own powerful tracing ability, including its own trace branch command that supports the ability to not only trace branches but also ones which optionally only occur within a specified address range and/or which branch into a given range, which coincidentally happens to be exactly the type of Hercules tracing support being requested by this GitHub Issue!

trace branch
trace branch into 10000-11000
trace branch from 24000-30000
trace branch into 10000-11000 from 24000-30000

Which, when translated to Hercules syntax, would be:

t+ branch
t+ branch into 10000-11000
t+ branch 24000-30000
t+ branch 24000-30000 into 10000-11000

I'm only mentioning this as a helpful hint of a possible alternative way of accomplishing your goal until such time as we can manage to provide the same/similar ability in Hercules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This issue does not describe a problem but rather describes a suggested change or improvement.
Projects
None yet
Development

No branches or pull requests

1 participant