Example - Using STORMAP with the EXTSET Option
Suppose you want to generate storage information whenever you execute a specific BALR instruction. You can use the STORMAP command with the EXTSET option and the CP TRACE command, in addition to other commands, to produce information about the amount of free storage available each time the BALR instruction is executed.
The following example shows you how this debugging works:
stormap (extset 250
Ready;
loadmod sttest
Ready;
progmap
Name Entry Origin Bytes Attributes
STTEST 013E6DB0 013E6DB0 00000250 Amode 31 Reloc
Ready;
d i13e6db0.10
R013E6DB0 LR 18CF LA 41500005 L 58F0C244 E6
R013E6DBA BALR 05EF BCT 4650C006
Ready;
trace inst pswa 13e6dba run cmd ext 250
Ready;
start
DMSLIO740I Execution begins...
-> 013E6DBA BALR 05EF -> 013E6FBA CC 1
Storage Map
------- ---
VMSIZE NUCALPHA NUCSIGMA NUCOMEGA NUCPHI NUCCHI
01400000 00F00000 00F52A00 01300000 01000000 012CF5C8
Unallocated Free Storage Queue
----------- ---- ------- -----
<16MB >16MB
Total Largest Total Largest Total Unallocated
00D2B000 00D1E000 003E1000 003DB000 0110C000
-> 013E6DBA BALR 05EF -> 013E6FBA CC 2
Storage Map
------- ---
VMSIZE NUCALPHA NUCSIGMA NUCOMEGA NUCPHI NUCCHI
01400000 00F00000 00F52A00 01300000 01000000 012CF5C8
Unallocated Free Storage Queue
----------- ---- ------- -----
<16MB >16MB
Total Largest Total Largest Total Unallocated
00D2B000 00D1E000 003DF000 003DB000 0110A000
-> 013E6DBA BALR 05EF -> 013E6FBA CC 2
Storage Map
------- ---
VMSIZE NUCALPHA NUCSIGMA NUCOMEGA NUCPHI NUCCHI
01400000 00F00000 00F52A00 01300000 01000000 012CF5C8
Unallocated Free Storage Queue
----------- ---- ------- -----
<16MB >16MB
Total Largest Total Largest Total Unallocated
00D2B000 00D1E000 003DD000 003DB000 01108000
-> 013E6DBA BALR 05EF -> 013E6FBA CC 2
Storage Map
------- ---
VMSIZE NUCALPHA NUCSIGMA NUCOMEGA NUCPHI NUCCHI
01400000 00F00000 00F52A00 01300000 01000000 012CF5C8
Unallocated Free Storage Queue
----------- ---- ------- -----
<16MB >16MB
Total Largest Total Largest Total Unallocated
00D2B000 00D1E000 003DB000 003D9000 01106000
-> 013E6DBA BALR 05EF -> 013E6FBA CC 2
Storage Map
------- ---
VMSIZE NUCALPHA NUCSIGMA NUCOMEGA NUCPHI NUCCHI
01400000 00F00000 00F52A00 01300000 01000000 012CF5C8
Unallocated Free Storage Queue
----------- ---- ------- -----
<16MB >16MB
Total Largest Total Largest Total Unallocated
00D2B000 00D1E000 003D9000 003D7000 01104000 Ready;
The following steps describe the procedure illustrated in the previous
example:
- The STORMAP command generates summary information whenever an external interrupt X'250' is reflected to the virtual machine. This external interrupt corresponds to CMD EXT 250 set in the TRACE instruction issued later.
- The LOADMOD command loads your STTEST program.
- The PROGMAP command determines where in storage STTEST is loaded.
- After you know the load point, 013E6DB0, the CP DISPLAY I command locates the BALR instruction. This is the instruction you want to trace.
- Then, the CP TRACE command sets a trace for the BALR instruction. The RUN option causes execution to continue when the BALR is executed. The CMD EXT X'250' generates an external interruptX'250' when the BALR is executed. This external interrupt corresponds to the EXTSET 250 option set on the STORMAP command issued earlier.
- The START command starts execution of STTEST. The result is that each time the BALR is executed, an external interrupt X'250' is generated which in turn displays the storage information.
The data shows that the total amount of unallocated storage above 16 MB is reduced by two pages on each BALR call. You now have to determine if this loss of two pages is a normal condition on that call.
After you know the meaning of the fields in the summary report,
you can reduce the amount of data displayed by using the NOHEAD option
on the STORMAP command. For example:
stormap (nohead extset 255
Ready;
d i13e6910.10
R013E6910 LR 18CF LA 41500005 L 58F0C244 E6
R013E691A BALR 05EF BCT 4650C006
Ready;
trace inst pswa 13e691a run cmd ext 255
Ready;
start
DMSLIO740I Execution begins...
-> 013E691A BALR 05EF -> 013E6B1A CC 1
01400000 00E00000 00FEB158 01000000
00D2B000 00D1E000 003CD000 003CB000 010F8000
-> 013E691A BALR 05EF -> 013E6B1A CC 2
01400000 00E00000 00FEB158 01000000
00D2B000 00D1E000 003CB000 003C9000 010F6000
-> 013E691A BALR 05EF -> 013E6B1A CC 2
01400000 00E00000 00FEB158 01000000
00D2B000 00D1E000 003C9000 003C7000 010F4000
-> 013E691A BALR 05EF -> 013E6B1A CC 2
01400000 00E00000 00FEB158 01000000
00D2B000 00D1E000 003C7000 003C5000 010F2000
-> 013E691A BALR 05EF -> 013E6B1A CC 2
01400000 00E00000 00FEB158 01000000
00D2B000 00D1E000 003C5000 003C3000 010F0000
Ready;
The third token of the second line of data after each BALR is reduced by two pages. From our previous example, you know this field is for unallocated storage above 16 MB.
Note: Remember, you can also use the FILE APPEND option
to write the data to the
STORMAP DATA A file rather than to the console.