Dear all,

thanks for the good advice. I forgot to mention the background of my question: 
I'm currently looking into "modernizing" 20-year-old code (some of which is by 
me, so I feel a bit old, too).

While I have to add some more functions, I will also take the opportunity to 
improve the code.

What I have done so far:
- Changed xH to xHI if possible (e.g. LH Rx,=Y(4) to LHI Rx,4)
- Changed ICM to LT/L if possible
- Looked into TIME LINKAGE=SYSTEM instead of TIME LINKAGE=SVC
- Toyed with the idea of replacing GETMAIN / FREEMAIN with STORAGE (not worth 
the effort - of course, new code will be STORAGE)

The first two are simply a change from one statement into another - no big deal 
(except that there is no SHI, so I've got to use AHI ...,-nn).

Changing xH to xHI improves both performance and maintainability, ICM to LT/L 
makes it at least easier to read. I do not know if there is a performance 
impact if the alignment is wrong. And I have thought about setting the 
assembler options to NOALIGN to get rid of those annoying "alignment" 
messages...

The transition to the "new" TIME format is not so easy - I need work area 
fields instead of simply getting the values in R0/R1, I have to take care of 
MF=E/L etc. This will take more time and effort - don't know yet if I will 
tackle that one.

Do you have any other ideas ? I do not want to rewrite too much, so I'm looking 
for "quick wins" like the two above.

Thanks,
Beate

> -----Original Message-----
> From: IBM Mainframe Assembler List
> [mailto:[email protected]] On Behalf Of Chris Craddock
> Sent: Monday, October 25, 2010 3:37 PM
> To: [email protected]
> Subject: Re: [ASSEMBLER-LIST] GETMAIN/FREEMAIN vs. STORAGE
> OBTAIN/RELEASE
>
> > I was pretty sure that the STORAGE macros are "better" than
> GETMAIN/FREEMAIN, both in terms of functionality and
> performance. To back that up, I searched for documentation.
> >
> > What I found so far is a fairly recent presentation from
> SHARE:
> http://ew.share.org/client_files/callpapers/attach/SHARE_in_De
> nver/S1237DB120530.pdf which says (on page 34) that
> GETMAIN/FREEMAIN is taking a lot less cycles than STORAGE
> OBTAIN/RELEASE (17,000 vs. 20,000). I haven't found any IBM
> document saying anything about performance, all I got was
> that STORAGE is recommended for some environments (e.g. for
> AR mode). And then I found a thread on IBM-MAIN where Peter
> Relson talked about the relationship between the two:
> http://www.mail-archive.com/[email protected]/msg122945.htm
> l but unfortunately not much about the default LINKAGE=SYSTEM
> of STORAGE.
> >
> > I always thought that an SVC interrupt (GETMAIN) "costs"
> more than a PC (STORAGE with LINKAGE=SYSTEM) - am I wrong?
> >
> > Anyway: In a "normal" environment (primary mode, key 8),
> what would you recommend to use and why? And if you want to
> "modernize" a module, would you change from one to the other?
>
>
>
> It is true that SVC FLIH and SLIH processing is much more
> expensive than a single stacking PC instruction, however both
> are small relative to the overall internal pathlength of the
> GETMAIN/STORAGE function. It turns out that the STORAGE
> interface has to do a lot more validation processing because
> it is a lot more flexible than GETMAIN and it also has to set
> up for entry to the VSM internal logic the same way the SVC
> would have and then "undo" it on the way back before the PR
> instruction returns from the macro call. So the net is that
> both end up going to the same place, but STORAGE is a bit
> longer pathlength overall than GETMAIN.
> If you're writing garden variety code there's still a few
> differences between the two that you might prefer STORAGE
> over GETMAIN if you're writing new code. If you're renovating
> old code it probably isn't worth changing the macro
> interfaces you use unless you're actually changing their
> usage at the same time.
>
> CC

Reply via email to