Start of change

HISSERV macro — HISSERV Service

Description

HISSERV provides an interface to begin profiling and retrieve instrumentation data from the system. There are currently two types of instrumentation data:
Events
Events are recorded at the CPU Start of changeor coreEnd of change level. As events occur, they are captured and recorded, to be queried at any interval determined by software. Events are grouped into event types, which can be enabled and disabled independently of each other.
Sampling
At predetermined intervals, a sample representing the current state of a CPU is stored into a Sampling Data Buffer (SDBs). As SDBs are filled software is notified allowing the software to process the full SDBs. The SDBs are then cleared to be reused by the hardware. There are different sampling types that can be enabled and disabled independently of each other, however a profiler can only indicate its intention to receive sampling data. The sampling frequency, as well as which sampling types are enabled are determined by the service parameters specified on a F hisproc,SERVICE command.
Specifically, with HISSERV you can do the following:
  • Query for event info such as determining which events and event types are available. (REQUEST=QUERY,TYPE=EVENT).
  • Query for sampling info such as the sampling interval and which sampling types are available. (REQUEST=QUERY,TYPE=SAMPLE).
  • Query for statistics of whomever is currently profiling the system. (REQUEST=QUERY,TYPE=PROFILERS).
  • Begin profiling the system, indicating to the system the intention of collecting one or more event types and/or sampling data. Requests that require a PROFILETKN must first use this to identify itself as wanting to profile the system. (REQUEST=PROFILE,ACTION=START)
  • Stop profiling the system. The PROFILETKN is no longer useable and when the last profiler stops profiling the system, any unnecessary resources are released. (REQUEST=PROFILE,ACTION=STOP)
  • Query for event data provided by the service. Requires a PROFILETKN. (REQUEST=QUERY,TYPE=EVENTDATA).
The HISSERV service is only enabled when the HIS address space has been initialized. The dynamic exit HIS.SERVSTAT can be used to be notified when the service has been enabled or disabled.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Supervisor state or PKM 0-7
Dispatchable unit mode: Task
Cross memory mode: PASN=HASN=SASN
AMODE: 31- or 64-bit
ASC mode: Primary or access register (AR)
Interrupt status: Enabled for I/O and external interrupts
Locks: The caller must not be holding any locks.
Control parameters: Control parameters must be in the primary address space or, for AR-mode callers, must be in an address/data space that is addressable through a public entry on the caller's dispatchable unit access list (DU-AL).

The user-provided answer area (via the ANSAREA parameter) has the same requirements and restrictions as the control parameters.

The user-provided CPU Start of changeor coreEnd of change bitmask (via the CPUMASK parameter) has the same requirements and restrictions as the control parameters.

Programming Requirements

The caller should include the HISYSERV macro to get equate symbols for the return and reason codes.

The caller must include the HISYSERV macro to get a mapping of the output area provided via the ANSAREA parameter for REQUEST=QUERY.

The caller must include the HISYEXIT macro to get a mapping of the parameter area passed to the exit routine specified by the EXITRTN parameter for REQUEST=PROFILE,ACTION=START requests.

The caller must include the HISYSMPX macro to get a mapping of the parameter area passed to the exit routine specified by the EXITRTN parameter for REQUEST=PROFILE,ACTION=START requests, when the profiler requests sampling data (SAMPLE=YES).

Restrictions

The caller must not have functional recovery routines (FRRs) established.

Input Register Information

Before issuing the HISSERV macro, the caller does not have to place any information into any general purpose register (GPR) unless using it in register notation for a particular parameter, or using it as a base register.

Before issuing the HISSERV macro, the caller does not have to place any information into any access register (AR) unless using it in register notation for a particular parameter, or using it as a base register.

Output Register Information

When control returns to the caller, the GPRs contain:
Register
Contents
0
Reason code if GPR15 is not 0
1
Used as work registers by the system
2-13
Unchanged
14
Used as a work register by the system
15
Return code
When control returns to the caller, the ARs contain:
Register
Contents
0-1
Used as work registers by the system
2-13
Unchanged
14-15
Used as work registers by the system

Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.

Performance Implications

None.

Syntax

The HISSERV macro is written as follows:

Syntax Description
   
   name name: symbol. Begin name in column 1.
   
One or more blanks must precede HISSERV.
   
HISSERV  
   
One or more blanks must follow HISSERV.
   
REQUEST=PROFILE  
REQUEST=QUERY  
   
  ,ACTION=START  
  ,ACTION=STOP  
   
  ,OUTPROFILETKN=outprofiletkn outprofiletkn: RS-type address or address in register (2) - (12)
   
  ,EVENT=event event: RS-type address or address in register (2) - (12)
  ,EVENT=NO_EVENT Default: EVENT=NO_EVENT
   
  ,SAMPLE=NO Default: SAMPLE=NO
  ,SAMPLE=YES  
   
  ,NAME=name name: RS-type address or address in register (2) - (12)
   
  ,EXITRTN=exitrtn exitrtn: RS-type address or address in register (2) - (12)
   
  ,PROFILETKN=profiletkn profiletkn: RS-type address or address in register (2) - (12)
   
  ,ANSAREA=ansarea ansarea: RS-type address or address in register (2) - (12)
   
  ,ANSLEN=anslen anslen: RS-type address or address in register (2) - (12)
   
  ,TYPE=EVENTDATA  
  ,TYPE=EVENT  
  ,TYPE=SAMPLE  
  ,TYPE=PROFILERS  
   
  ,PROFILETKN=profiletkn profiletkn: RS-type address or address in register (2) - (12)
   
  ,CPUMASK=cpumask cpumask: RS-type address or address in register (2) - (12)
  ,CPUMASK=ALL Default: CPUMASK=ALL
   
  ,RETCODE=retcode retcode: RS-type address or register (2) - (12) or (15), (GPR15),
   
  ,RSNCODE=rsncode rsncode: RS-type address or register (0) or (2) - (12), (00), (GPR
   
  ,PLISTVER=IMPLIED_VERSION Default: PLISTVER=IMPLIED_VERSION
  ,PLISTVER=MAX  
  ,PLISTVER=0  
   
  ,MF=S Default: MF=S
  ,MF=(L,list addr) list addr: RS-type address or register (1) - (12)
  ,MF=(L,list addr,attr)  
  ,MF=(L,list addr,0D)  
  ,MF=(E,list addr)  

  ,MF=(E,list addr,COMPLETE)

 
   

Parameters

The parameters are explained as follows:

name
An optional symbol, starting in column 1, that is the name on the HISSERV macro invocation. The name must conform to the rules for an ordinary assembler language symbol.
REQUEST=PROFILE
REQUEST=QUERY
A required parameter, used to indicate the type of request.
REQUEST=PROFILE
indicates the intention to start or stop profiling the system.
REQUEST=QUERY
indicates to query the service.
,ACTION=START
,ACTION=STOP
When REQUEST=PROFILE is specified, a required parameter, used to indicate the profiling action to take. Note that a PROFILE action cannot be requested from within a profiler's exit routine, nor should it be requested from a work unit holding a resource required by a profiler's exit routine.
,ACTION=START
indicates to start profiling the system.
,ACTION=STOP
indicates to stop profiling the system. When profiling for sampling data, the exit routine specified by EXITRTN will receive a final sampling related callback, with the HisSmpParmFlgs_Last flag on, for each CPU that is currently sampling. Note this service call will not return until after the EXITRTN has handled every CPU's final sampling callback. If no more profilers are profiling the system, all resources associated with profiling will be released.
,OUTPROFILETKN=outprofiletkn
When ACTION=START and REQUEST=PROFILE are specified, a required output parameter, into which the unique profiler token to identify this profiler will be returned. If this is the first profiler of the system, resources associated with profiling will be obtained and held until the last profiler stops profiling the system.

To code: Specify the RS-type address, or address in register (2)-(12), of a 16-character field.

,EVENT=event
,EVENT=NO_EVENT
When ACTION=START and REQUEST=PROFILE are specified, an optional input parameter, which should contain the event types to profile. When querying the event data, only the event types specified when starting to PROFILE the system will be returned. If the event types are not authorized at the time of the PROFILE request the request will be remembered. Later if the system becomes authorized for that event type, it will be returned in any subsequent event data query. The storage is mapped by HisEvnTyp in macro HISYSERV and must be a subset of the event type data returned in HisEvn_ValidEvnTyp, which is returned in the REQUEST=QUERY,TYPE=EVENT request. If EVENT=NO_EVENT or the storage passed in is binary zeroes, the profiler will not be able to query for event data. The default is NO_EVENT.

To code: Specify the RS-type address, or address in register (2)-(12), of a 32 bit field.

,SAMPLE=NO
,SAMPLE=YES
When ACTION=START and REQUEST=PROFILE are specified, an optional parameter, which is used to determine whether to receive callbacks with sampling data. When SAMPLE=YES, the exit routine defined in the EXITRTN parameter will be called as Sampling Data Blocks (SDBs) become available If sampling is not authorized at the time of the PROFILE request the request will be remembered. Later if the system becomes authorized for sampling, it will begin providing sampling data. The types of sampling entries returned by the service is dependent on the configuration of the service by the SAMPTYPE parameter from the most recent F HIS,SERVICE or F HIS,BEGIN command. The default is SAMPLE=NO.
,SAMPLE=NO
Do not receive callbacks with sampling data.
,SAMPLE=YES
Receive callbacks with sampling data.
,NAME=name
When ACTION=START and REQUEST=PROFILE are specified, a required input parameter, which should contain the unique name identifying this profiler. The name should use EBCDIC characters from among the set of alphanumerics. The NAME will be returned in any QUERY,TYPE=PROFILE queries to identify this profiler. This name will also be displayed as output from the D HIS command. The NAME specified should be one that easily identifies the product requesting the profiling, for example the HIS supplied profiler starts with "HIS". The service will not allow another name starting with "HIS". The NAME must be unique for each profiler registered with the service.

To code: Specify the RS-type address, or address in register (2)-(12), of an 8-character field.

,EXITRTN=exitrtn
When ACTION=START and REQUEST=PROFILE are specified, a required input parameter, which should contain the name of the exit routine that will be called when the service needs to notify the profiler for some reason, such as for sampling callbacks. The exit routine must reside in LPA, the LNKLST LNKLST concatenation, or the nucleus. The interface to the exit routine is described in macro HISYEXIT. The EXITRTN must be unique for each profiler registered with the service.

To code: Specify the RS-type address, or address in register (2)-(12), of an 8-character field.

,PROFILETKN=profiletkn
When ACTION=STOP and REQUEST=PROFILE are specified, a required input parameter, which should contain the profiler's unique token received from this profiler's REQUEST=PROFILE,ACTION=START request (parameter OUTPROFILETKN.) The profiler's token will no longer be useable.

To code: Specify the RS-type address, or address in register (2)-(12), of a 16-character field.

,ANSAREA=ansarea
When REQUEST=QUERY is specified, a required input parameter, which will be used by the service to store information associated with the query request. Macro HISYSERV contains mappings of the answer areas to provide, the size of the area depends on the type of query being requested. The minimum amount of storage required for the request to be successful and return a subset of the data, is HisAns_kLength.

To code: Specify the RS-type address, or address in register (2)-(12), of a character field.

,ANSLEN=anslen
When REQUEST=QUERY is specified, a required input parameter, which should contain the length of the provided answer area. The length depends on the query that is requested. The minimum ANSLEN required for the request to be successful and return a subset of the data, is HisAns_kLength.

To code: Specify the RS-type address, or address in register (2)-(12), of a doubleword field, or specify a literal decimal value.

,TYPE=EVENTDATA
,TYPE=EVENT
,TYPE=SAMPLE
,TYPE=PROFILERS
When REQUEST=QUERY is specified, a required parameter, used to indicate the type of query to process.
,TYPE=EVENTDATA
indicates to process a query event data request. ANSAREA should point to storage that will be mapped by HisEvnData in macro HISYSERV. It is possible for the amount of storage required to change between two consecutive TYPE=EVENTDATA queries, depending on which event types are currently authorized in the system and which CPUs Start of changeor coresEnd of change are currently online.
,TYPE=EVENT
indicates to process a query event request. ANSAREA should point to storage that will be mapped by HisEvn in macro HISYSERV.
,TYPE=SAMPLE
indicates to process a query sample request. ANSAREA should point to storage that will be mapped by HisSmp in macro HISYSERV.
,TYPE=PROFILERS
indicates to process a query profiler info request. ANSAREA should point to storage that will be mapped by HisProf in macro HISYSERV. It is possible for the amount of storage required to change between two consecutive TYPE=PROFILERS queries, depending on the current number of profilers in the system.
,PROFILETKN=profiletkn
When TYPE=EVENTDATA and REQUEST=QUERY are specified, a required input parameter, which should contain the profiler's unique token received from this profilers's REQUEST=PROFILE,ACTION=START request (parameter OUTPROFILETKN).

To code: Specify the RS-type address, or address in register (2)-(12), of a 16-character field.

,CPUMASK=cpumask
,CPUMASK=ALL
When TYPE=EVENTDATA and REQUEST=QUERY are specified, an optional input parameter representing a bitmask of which CPUs Start of changeand/or coresEnd of change to query event data. The bitmask should be ECVTMaxMPNumBytesInMask bytes long. Start of changeBit 0 represents CPU 0's event data as well as core 0's event data to query,End of change and so forth up to the bit position at CVTMAXMP. If requesting all CPUs Start of changeand all coresEnd of change specify ALL, pass in a CPUMASK of binary ones, or omit the CPUMASK parameter. The default is ALL.

To code: Specify the RS-type address, or address in register (2)-(12), of a character field.

,RETCODE=retcode
An optional output parameter into which the return code is to be copied from GPR 15. If you specify 15, GPR15, REG15, or R15 (within or without parentheses), the value will be left in GPR 15.

To code: Specify the RS-type address of a fullword field, or register (2)-(12) or (15), (GPR15), (REG15), or (R15).

,RSNCODE=rsncode
An optional output parameter into which the reason code is to be copied from GPR 0. If you specify 0, 00, GPR0, GPR00, REG0, REG00, or R0 (within or without parentheses), the value will be left in GPR 0.

To code: Specify the RS-type address of a fullword field, or register (0) or (2)-(12), (00), (GPR0), (GPR00), REG0), (REG00), or (R0).

,PLISTVER=IMPLIED_VERSION
,PLISTVER=MAX
,PLISTVER=0
An optional input parameter that specifies the version of the macro. PLISTVER determines which parameter list the system generates. PLISTVER is an optional input parameter on all forms of the macro, including the list form. When using PLISTVER, specify it on all macro forms used for a request and with the same value on all of the macro forms. The values are:
  • IMPLIED_VERSION, which is the lowest version that allows all parameters specified on the request to be processed. If you omit the PLISTVER parameter, IMPLIED_VERSION is the default.
  • MAX, if you want the parameter list to be the largest size currently possible. This size might grow from release to release and affect the amount of storage that your program needs.

    If you can tolerate the size change, IBM recommends that you always specify PLISTVER=MAX on the list form of the macro. Specifying MAX ensures that the list-form parameter list is always long enough to hold all the parameters you might specify on the execute form, when both are assembled with the same level of the system. In this way, MAX ensures that the parameter list does not overwrite nearby storage.

  • 0, if you use the currently available parameters.
To code: Specify one of the following:
  • IMPLIED_VERSION
  • MAX
  • A decimal value of 0
,MF=S
,MF=(L,list addr)
,MF=(L,list addr,attr)
,MF=(L,list addr,0D)
,MF=(E,list addr)
,MF=(E,list addr,COMPLETE)
An optional input parameter that specifies the macro form.

Use MF=S to specify the standard form of the macro, which builds an inline parameter list and generates the macro invocation to transfer control to the service. MF=S is the default.

Use MF=L to specify the list form of the macro. Use the list form together with the execute form of the macro for applications that require reentrant code. The list form defines an area of storage that the execute form uses to store the parameters. Only the PLISTVER parameter may be coded with the list form of the macro.

Use MF=E to specify the execute form of the macro. Use the execute form together with the list form of the macro for applications that require reentrant code. The execute form of the macro stores the parameters into the storage area defined by the list form, and generates the macro invocation to transfer control to the service.

,list addr
The name of a storage area to contain the parameters. For MF=S and MF=E, this can be an RS-type address or an address in register (1)-(12).
,attr
An optional 1- to 60-character input string that you use to force boundary alignment of the parameter list. Use a value of 0F to force the parameter list to a word boundary, or 0D to force the parameter list to a doubleword boundary. If you do not code attr, the system provides a value of 0D.
,COMPLETE
Specifies that the system is to check for required parameters and supply defaults for omitted optional parameters.

ABEND Codes

None.

Return and Reason Codes

When the HISSERV macro returns control to your program:
  • GPR 15 (and retcode, when you code RETCODE) contains a return code.
  • When the value in GPR 15 is not zero, GPR 0 (and rsncode, when you code RSNCODE) contains a reason code.

Macro HISYSERV provides equate symbols for the return and reason codes. Note carefully that bits 0-15 of the reason code may contain component-diagnostic data and must not be assumed to be 0.

The following table identifies the hexadecimal return and reason codes and the equate symbol associated with each reason code. IBM support personnel may request the entire reason code, including the xxxx value.

Table 1. Return and Reason Codes for the HISSERV Macro
Return Code Reason Code Equate Symbol Meaning and Action
0 Equate Symbol: Hisserv_kRetOk

Meaning: HISSERV request successful.

Action: Processing continues.

4 Equate Symbol: Hisserv_kRetWarn

Meaning: Warning

Action: Refer to the action provided with the specific reason code.

4 xxxx0401 Equate Symbol: Hisserv_kRsnWarn_AnsAreaSmall

Meaning: For REQUEST=QUERY, the answer area provided was large enough to hold the minimum amount of data required for the request, but not large enough to hold all of the data requested.

Action: Obtain a larger answer area using the HisAns_LengthRequire field returned in the request's ANSAREA.

8 Equate Symbol: Hisserv_kRetUser

Meaning: HISSERV request failed due to a user error.

Action: Refer to the action provided with the specific reason code

8 xxxx0801 Equate Symbol: Hisserv_kRsnUser_BadParmArea

Meaning: Unable to access parameter area.

Action: Check for possible storage overlay.

8 xxxx0802 Equate Symbol: Hisserv_kRsnUser_BadParmAreaALET

Meaning: Bad parameter area ALET.

Action: Make sure that the ALET associated with the parameter area is valid. The access register might not have been set up correctly.

8 xxxx0803 Equate Symbol: Hisserv_kRsnUser_BadVersion

Meaning: Bad version for the parameter list was specified.

Action: Check for possible storage overlay.

8 xxxx0804 Equate Symbol: Hisserv_kRsnUser_SrbMode

Meaning: This function is only available in task mode.

Action: Use function in task mode.

8 xxxx0805 Equate Symbol: Hisserv_kRsnUser_NotEnabled

Meaning: This function is only available to enabled programs.

Action: Use function while enabled.

8 xxxx0806 Equate Symbol: Hisserv_kRsnUser_LocksHeld

Meaning: This function is only available to unlocked programs.

Action: Use function while unlocked.

8 xxxx0807 Equate Symbol: Hisserv_kRsnUser_CallerFRR

Meaning: This function is only available to programs that have not established an FRR.

Action: Retry the request without an FRR established.

8 xxxx0808 Equate Symbol: Hisserv_kRsnUser_BadRequest

Meaning: A Bad request was made to the service.

Action: Check for possible storage overlay.

8 xxxx0809 Equate Symbol: Hisserv_kRsnUser_BadProfTkn

Meaning: Token specified was not a valid token.

Action: Use a valid token provided by the REQUEST=PROFILE,ACTION=START request.

8 xxxx080A Equate Symbol: Hisserv_kRsnUser_NameInUse

Meaning: The name requested is already in use.

Action: Provide a NAME that is unique to the service.

8 xxxx080B Equate Symbol: Hisserv_kRsnUser_InvName

Meaning: The name requested is invalid.

Action: Provide a valid NAME, it cannot begin with HIS.

8 xxxx080C Equate Symbol: Hisserv_kRsnUser_ExitRtnNotFound

Meaning: The exit routine specified wasn't found.

Action: Ensure the exit routine specified exists in LPA, the LNKLS concatenation, or the nucleus.

8 xxxx080D Equate Symbol: Hisserv_kRsnUser_ExitRtnInUse

Meaning: The exit routine specified is already in use.

Action: A different exit routine must be provided.

8 xxxx080E Equate Symbol: Hisserv_kRsnUser_BadEvnTyp

Meaning: For REQUEST=PROFILE,ACTION=START requests, one or more event types specified could not be properly configured for because it is not allowed. Only event types returned in the HisEvn_ValidEvnTyp field of a REQUEST=QUERY,TYPE=EVENT request can be requested.

Action: Ensure the event types being requested are a subset of the event types returned in the HisEvn_ValidEvnTyp field of a REQUEST=QUERY,TYPE=EVENT request.

8 xxxx080F Equate Symbol: Hisserv_kRsnUser_BadProfReq

Meaning: A bad PROFILE request was made to the service.

Action: Check for possible storage overlay.

8 xxxx0810 Equate Symbol: Hisserv_kRsnUser_BadProfStart

Meaning: For REQUEST=PROFILE,ACTION=START, a bad request was made. At least one event type or sampling should be requested when starting to profile the system.

Action: Request at least one event type or sampling.

8 xxxx0811 Equate Symbol: Hisserv_kRsnUser_BadQuery

Meaning: For REQUEST=QUERY, a bad query was requested.

Action: Check for possible storage overlay.

8 xxxx0812 Equate Symbol: Hisserv_kRsnUser_BadAnsArea

Meaning: For REQUEST=QUERY, unable to access answer area.

Action: Provide a valid answer area.

8 xxxx0813 Equate Symbol: Hisserv_kRsnUser_BadAnsAreaALET

Meaning: Bad answer area ALET.

Action: Make sure that the ALET associated with the answer area is valid. The access register might not have been set up correctly.

8 xxxx0814 Equate Symbol: Hisserv_kRsnUser_AnsLenTooSmall

Meaning: For REQUEST=QUERY, the answer area length is incorrect.

Action: Ensure the answer area length and the storage provided as the answer area is at least HisAns_kLength bytes long.

8 xxxx0815 Equate Symbol: Hisserv_kRsnUser_BadCpuMask

Meaning: For REQUEST=QUERY,TYPE=EVENTDATA requests, unable to access the CPU mask.

Action: Provide a valid CPU mask.

8 xxxx0816 Equate Symbol: Hisserv_kRsnUser_BadCpuMaskALET

Meaning: Bad CPU mask ALET.

Action: Make sure that the ALET associated with the CPU mask is valid. The access register might not have been set up correctly.

8 xxxx0817 Equate Symbol: Hisserv_kRsnUser_NoEvnTyp

Meaning: For REQUEST=QUERY,TYPE=EVENTDATA requests, the profiler making the request is not profiling events.

Action: When registering with the system to profile, indicate the intention to profile events using the EVENT= parameter.

8 xxxx0818 Equate Symbol: Hisserv_kRsnUser_InvProfChange

Meaning: A REQUEST=PROFILE request was made from a profiler's exit routine.

Action: A REQUEST=PROFILE request cannot be made from a profiler's exit routine.

C Equate Symbol: Hisserv_kRetEnv

Meaning: Environmental error

Action: Refer to the action provided with the specific reason code.

C xxxx0C01 Equate Symbol: Hisserv_kRsnEnv_NotAvailable

Meaning: Function is not available.

Action: This function is only available when the HIS address space is running.

C xxxx0C02 Equate Symbol: Hisserv_kRsnEnv_NotReady

Meaning: Function is available but is not currently ready to accept requests.

Action: Retry the request.

C xxxx0C03 Equate Symbol: Hisserv_kRsnEnv_NoStorage

Meaning: There was not enough storage in HIS private storage to complete the request.

Action: Contact your system programmer.

10 Equate Symbol: Hisserv_kRetUnk

Meaning: Unexpected failure.

Action: Refer to the action provided with the specific reason code.

10 xxxx1001 Equate Symbol: Hisserv_kRsnUnk_Unk

Meaning: Unexpected failure. The state of the request is unpredictable.

Action: Contact your system programmer.

10 xxxx1002 Equate Symbol: Hisserv_kRsnUnk_QueryCpu

Meaning: For REQUEST=QUERY,TYPE=EVENTDATA, while attempting to query a CPU's event data an unknown error occurred.

Action: Contact your system programmer.

Example

Operation
  1. Profile for all available event types, and sampling.
  2. Query the event types on 1 minute intervals for an hour, ensuring all event data is returned each query.
  3. Process Sampling Data Blocks (SDBs) as they become available.
  4. Stop profiling the system.
The code is as follows.
*************************************************************
* Query Events to determine what can be enabled.            *
*************************************************************
         HISSERV MF=(E,serviceList),REQUEST=QUERY,           *
               ANSAREA=EvnAnsArea,ANSLEN=EvnAnsLen,          *
               TYPE=EVENT,RETCODE=LRetCode,                  *
               RSNCODE=LRsnCode
         ICM  R5,B'1111',LRetCode
         JZ   EVNAREA_GOOD
         LA   R4,Hisserv_kRetWarn
         CLR  R5,R4
         JE   EVNAREA_WARN
EVNAREA_BAD   DS 0H
*
* Place code to check bad return/reason codes here
*
EVNAREA_WARN  DS 0H
         L    R5,LRsnCode
         NILH R5,0
         CHI  R5,Hisserv_kRsnWarn_AnsAreaSmall
         JNE  EVNAREA_BAD
*
* Place code to handle obtaining more storage for the
* ANSAREA, and repeat the request if necessary.
*
EVNAREA_GOOD   DS 0H
         LA    R8,EvnAnsArea
         Using HisEvn,R8
*************************************************************
* Start profiling the system. Output from the previous      *
* query is used as input to this query, specifically we     *
* want to profile all valid event types.                    *
*************************************************************
         HISSERV MF=(E,serviceList),REQUEST=PROFILE,         *
               ACTION=START,OUTPROFILETKN=ProfToken,         *
               NAME=ProfName,EXITRTN=ExitMod,SAMPLE=YES,     *
               EVENT=HisEvn_ValidEvnTyp,RETCODE=LRetCode,    *
               RSNCODE=LRsnCode
*
* Place code to check return/reason codes here
*
* Place code to obtain storage of length HisEvnData_kLength,
* save address in R8, length in EvnDataAnsLen
*
EVN_LOOP      DS 0H
*************************************************************
* Query the current state of the events                     *
*************************************************************
         Using HisEvnData,R8
         HISSERV MF=(E,serviceList),REQUEST=QUERY,           *
               TYPE=EVENTDATA,PROFILETKN=ProfToken,          *
               CPUMASK=ALL,ANSAREA=HisEvnData,               *
               ANSLEN=EvnDataAnsLen,RETCODE=LRetCode,        *
               RSNCODE=LRsnCode
         ICM  R5,B'1111',LRetCode
         JZ   EVNDATAAREA_GOOD
         LA   R4,Hisserv_kRetWarn
         CLR  R5,R4
         JE   EVNDATAAREA_WARN
EVNDATAAREA_BAD   DS 0H
*
* Place code to check bad return/reason codes here
*
EVNDATAAREA_WARN  DS 0H
         L    R5,LRsnCode
         NILH R5,0
         CHI  R5,Hisserv_kRsnWarn_AnsAreaSmall
         JNE  EVNAREA_BAD
*
* Place code to free storage of length EvnDataAnsLen, then
* obtain new storage of length HisEvnData_Length, save address
* in R8, length in EvnDataAnsLen
*
         J    EVN_LOOP
EVNDATAAREA_GOOD DS 0H
*
* Place code to process the returned events here.
*
         L    R5,EvnQueryVal
         BCT  R5,EVNDONE
         ST   R5,EvnQueryVal
         STIMER WAIT,BINTVL=EvnIntv
         J    EVN_LOOP
EVNDONE       DS 0H
*************************************************************
* Stop profiling the system                                 *
*************************************************************
         HISSERV MF=(E,serviceList),REQUEST=PROFILE,         *
               ACTION=STOP,PROFILETKN=ProfToken,             *
               RETCODE=LRetCode,RSNCODE=LRsnCode
*
* Place code to check return/reason codes here
*
EvnIntv     DC    F'6000'       One minute interval between  *
                                event queries
ProfName    DC    CL8'SAMPLE01' External name for profiler
ExitMod     DC    CL8'SAMPEXRT' EXITRTN Name
            HISYSERV            Return code information and  *
                                ANSAREA mappings.
DynArea     DSECT
LRetCode    DS    F
LRsnCode    DS    F
ProfToken   DC    CL16'0'
EvnQueryVal DC    F'60'         Query events 60 times
EvnAnsArea  DS    XL(HisEvn_Len+HisEvnCtr_Len)
EvnAnsLen   DS    AD(HisEvn_Len+HisEvnCtr_Len)
EvnDataAnsLen DS  D
         HISSERV MF=(L,serviceList)
*
*
* HISEXRTN CSECT, the EXITRTN located in LPA,LNKLIST or the
* nucleus.
*
HISEXRTN    CSECT
            Using HisExitParm,R1
            CLI   HisExitParm_Func,HisExitParmFunc_kStat
            JNE   CHECK_SMP
            PUSH  USING
            USING HisStatParm,R1
*
* Place code to process any service actions
*
            J     DONE
            POP   USING
CHECK_SMP   DS    0H
            CLI   HisExitParm_Func,HisExitParmFunc_kSmp
            JNE   DONE
            PUSH  USING
            USING HisSmpParm,R1
*
* Place code to process the full SDBs
*
            POP   USING
DONE        DS    0H
            HISYEXIT
            HISYSMPX
End of change