PROCESS CLASSES

Process classes are used to segregate data for reporting purposes A set of usage statistics is automatically maintained for each process class. These are "printed" whenever a report or a report_classes statement is executed. In addition, facility information (from report_facilities) is kept by process class, when process classes exist. See “CSIM Report Output” on page 45 for details about the reports that are generated.

Declaring and Initializing Process Classes

To declare a process class
CLASS c
Where

  • c - is the variable name representing the process class (type CLASS)
    Notes
  • A process class must be initialized via the process_class statement before it can be used in any other statement.

    To initialize a process class
    c = process_class("name")
    Where

  • c - is the variable name representing the process class (type CLASS)
  • name - is the name of the process class (quoted string or type char*)
    Notes
  • name is used only for output (reports, traces).

    To change the name of a process class
    set_name_process_class(c,” name”)
    Where

  • c - is the process class whose name is to be changed (type CLASS)
  • name - is the new name for the process class (quoted string or type char*)
    Notes
  • name is used only for output (reports, traces).

    Deleting Process Classes

    To delete a process class
    delete_process_class(c)
    Where

  • c - is the process class to be deleted (type CLASS)
    Notes
  • If a facility is collecting statistics for the deleted class, this collection will continue.

    Using Process Classes

    To have the executing process join a class
    set_process_class(c)
    Where

  • c- is the process class that the process wishes to join (type CLASS)
    Notes
  • If no set_process_class statement is executed for a process, that process is automatically a member of the “default” class.
  • A report statement will not print process class statistics for the default process class.
  • A report_classes statement will print process class statistics for the default process class, but ONLY if it is the only process class. If any other process class is defined, report_classes will only report on non-default process classes.

    Retrieving Process Class-Related Information

    These functions each return a statistic which describes some aspect of the usage of the specified process class. The type of the returned value for each of these functions is as indicated. The syntax conventions for these statements are as follows
  • c - is the process class about which information is requested. It must be type CLASS.
  • a - is a returned value of type char*.
  • n - is a returned value of type long.
  • x - is a returned value of type double.

    Retrieving Static Process Class Information

    Statement			Returned Value
    

    n = class_id(c); id of process class c a = class_name(c); pointer to name of process class c

    Retrieving Process Class Summary Information

    Statement Returned Value

    n = class_cnt(c); 		number of processes in process class c
    x = class_lifetime(c);		total time for all processes in process class c
    n = class_holdcnt(c);		total number of holds for all processes in process class c
    x = class_holdtime(c);		total hold time for all processes in process class c