/*static char *SCCSID = "@(#)pvwktext.c 6.6 92/03/11";*/
/*      SCCSID = "@(#)pvwktext.c        6.6 92/03/11"        */

/*
 *      Perfview Kernel Entity Text Blocks
 *
 *      This is an OS/2 2.x specific file
 *
 *      IBM/Microsoft Confidential
 *
 *      Copyright (c) IBM Corporation 1987, 1989
 *      Copyright (c) Microsoft Corporation 1987, 1989
 *
 *      All Rights Reserved
 *
 *      NOTE:   This file generates the Perfview kernel entity text blocks
 *              which are used by perfvwc.c.  It obtains the kernel entity
 *              definitions from the header file pvwkdef.h, which is also
 *              used by pvwkdata.c.
 *
 *  10/16/91 Steve Best B728714 Take out counters that were not implemented
 *  10/29/91 Steve Best B729110 Take out VDM counter group
 *  02/03/92 Steve Best aa04705 Added object name to transient text block
 *  03/08/92 Steve Best b734380 take out sem counter group
 *
 *  -- CP Change Team Additions
 *
 *  Defect Date     Author            Comments
 *  -------------------------------------------------------------
 *  51579  08/25/92 Carlos A. Romero  Add QCT related definitions
 *  76699  12/16/93 RAS               Make Perfview Comiple Option
 *  76699  12/16/93 RAC               Correct ifdef from PERVIEW to PERFVIEW
 */

#ifdef PERFVIEW

#include <os2def.h>
#include <pvwxport.h>

// BUGBUG 21-May-90, DaveBe, <The actual text strings still get put in _DATA,
//                            NOT in CSWAP_DATA as desired.>

#pragma code_seg("PERFSWAP_TEXT", "CODE")
#pragma data_seg("CSWAP_DATA", "CSWAPDATA")


/* Initialize Counter Flags */
#define ctFlag  TBN_FL_CT_CNT
#define qctFlag TBN_FL_CT_QCT      //51579
#define tmFlag TBN_FL_CT_TIMR
#define qlFlag TBN_FL_CT_QLEN
#define ssFlag TBN_FL_CT_SUMSQ

/* Initialize Counter Types */
#define qctType QCT                //51579
#define ctType CNT
#define tmType TIMR
#define qlType QLEN
#define ssType SUMSQ


/* Define entity name */
#define PvwKDef(ctrtype,enttype,entname)  {ctrtype##Flag, sizeof(ctrtype##Type), 0, ###ctrtype###entname},


#define CPU
pvtbName_t apvtbn_cpu[] = {
#include <pvwkdef.h>
};

pvtbh_t pvtbh_cpu = {
    TBH_VER_2_0_0_0,

    0,
    0,

    (TBN_FL_PERS | TBN_FL_KRNL),
    0,
    0,
    "CPU",

    0,
    0,
    0,
    "",

    "",
    "",
    sizeof(apvtbn_cpu) / sizeof(pvtbName_t),
    apvtbn_cpu
};
#undef CPU

#define MEM
pvtbName_t apvtbn_mem[] = {
#include <pvwkdef.h>
};

pvtbh_t pvtbh_mem = {
    TBH_VER_2_0_0_0,

    0,
    0,

    (TBN_FL_PERS | TBN_FL_KRNL),
    0,
    0,
    "MEM",

    0,
    0,
    0,
    "",

    "",
    "",
    sizeof(apvtbn_mem) / sizeof(pvtbName_t),
    apvtbn_mem
};
#undef MEM

#define FBC
pvtbName_t apvtbn_fbc[] = {
#include <pvwkdef.h>
};

pvtbh_t pvtbh_fbc = {
    TBH_VER_2_0_0_0,

    0,
    0,

    (TBN_FL_PERS | TBN_FL_KRNL),
    0,
    0,
    "FBC",

    0,
    0,
    0,
    "",

    "",
    "",
    sizeof(apvtbn_fbc) / sizeof(pvtbName_t),
    apvtbn_fbc
};
#undef FBC


#define FIL
pvtbName_t apvtbn_fil[] = {
#include <pvwkdef.h>
};

pvtbh_t pvtbh_fil = {
    TBH_VER_2_0_0_0,

    0,
    0,

    (TBN_FL_TRAN | TBN_FL_KRNL),
    0,
    0,
    "FIL",

    0,
    0,
    0,
    "",

    "",
    "",
    sizeof(apvtbn_fil) / sizeof(pvtbName_t),
    apvtbn_fil
};
#undef FIL


//b734380#define PRC
//b734380pvtbName_t apvtbn_prc[] = {
//b734380#include <pvwkdef.h>
//b734380};
//b734380
//b734380pvtbh_t pvtbh_prc = {
//b734380    TBH_VER_2_0_0_0,
//b734380
//b734380    0,
//b734380    0,
//b734380
//b734380    (TBN_FL_TRAN | TBN_FL_KRNL),
//b734380    0,
//b734380    0,
//b734380    "PRC",
//b734380
//b734380    0,
//b734380    0,
//b734380    0,
//b734380    "",
//b734380
//b734380    "",
//b734380    "",
//b734380    sizeof(apvtbn_prc) / sizeof(pvtbName_t),
//b734380    apvtbn_prc
//b734380};
//b734380#undef PRC


#define THD
pvtbName_t apvtbn_thd[] = {
#include <pvwkdef.h>
};

pvtbh_t pvtbh_thd = {
    TBH_VER_2_0_0_0,

    0,
    0,

    (TBN_FL_TRAN | TBN_FL_KRNL),
    0,
    0,
    "THD",

    0,
    0,
    0,
    "",

    "",
    "",
    sizeof(apvtbn_thd) / sizeof(pvtbName_t),
    apvtbn_thd
};
#undef THD


//#define WSQ                                                          //b728714
//pvtbName_t apvtbn_wsq[] = {                                          //b728714
//#include <pvwkdef.h>                                                 //b728714
//};                                                                   //b728714
                                                                       //b728714
//pvtbh_t pvtbh_wsq = {                                                //b728714
//    TBH_VER_2_0_0_0,                                                 //b728714
//                                                                     //b728714
//    0,                                                               //b728714
//    0,                                                               //b728714
//                                                                     //b728714
//    (TBN_FL_PERS | TBN_FL_KRNL),                                     //b728714
//    0,                                                               //b728714
//    0,                                                               //b728714
//    "WSQ",                                                           //b728714
//                                                                     //b728714
//    0,                                                               //b728714
//    0,                                                               //b728714
//    0,                                                               //b728714
//    "",                                                              //b728714
//                                                                     //b728714
//    "",                                                              //b728714
//    "",                                                              //b728714
//    sizeof(apvtbn_wsq) / sizeof(pvtbName_t),                         //b728714
//    apvtbn_wsq                                                       //b728714
//};                                                                   //b728714
//#undef WSQ                                                           //b728714


//b734380#define SEM
//b734380pvtbName_t apvtbn_sem[] = {
//b734380#include <pvwkdef.h>
//b734380};
//b734380
//b734380pvtbh_t pvtbh_sem = {
//b734380    TBH_VER_2_0_0_0,
//b734380
//b734380    0,
//b734380    0,
//b734380
//b734380    (TBN_FL_TRAN | TBN_FL_KRNL),
//b734380    0,
//b734380    0,
//b734380    "SEM",
//b734380
//b734380    0,
//b734380    0,
//b734380    0,
//b734380    "",
//b734380
//b734380    "",
//b734380    "",
//b734380    sizeof(apvtbn_sem) / sizeof(pvtbName_t),
//b734380    apvtbn_sem
//b734380};
//b734380#undef SEM


//#define QUE                                                          //b728714
//pvtbName_t apvtbn_que[] = {
//#include <pvwkdef.h>
//};
//
//pvtbh_t pvtbh_que = {
//    TBH_VER_2_0_0_0,
//
//    0,
//    0,
//
//    (TBN_FL_TRAN | TBN_FL_KRNL),
//    0,
//    0,
//    "QUE",
//
//    0,
//    0,
//    0,
//    "",
//
//    "",
//    "",
//    sizeof(apvtbn_que) / sizeof(pvtbName_t),
//    apvtbn_que
//};
//#undef QUE                                                           //B718714


//#define VDM                                                          //b729110
//pvtbName_t apvtbn_vdm[] = {
//#include <pvwkdef.h>
//};
//
//pvtbh_t pvtbh_vdm = {
//    TBH_VER_2_0_0_0,
//
//    0,
//    0,
//
//    (TBN_FL_PERS | TBN_FL_KRNL),
//    0,
//    0,
//    "VDM",
//
//    0,
//    0,
//    0,
//    "",
//
//    "",
//    "",
//    sizeof(apvtbn_vdm) / sizeof(pvtbName_t),
//    apvtbn_vdm
//};
//#undef VDM                                                           //b729110


#define SPR
pvtbName_t apvtbn_spr[] = {
#include <pvwkdef.h>
};

pvtbh_t pvtbh_spr = {
    TBH_VER_2_0_0_0,

    0,
    0,

    (TBN_FL_PERS | TBN_FL_KRNL),
    0,
    0,
    "SPR",

    0,
    0,
    0,
    "",

    "",
    "",
    sizeof(apvtbn_spr) / sizeof(pvtbName_t),
    apvtbn_spr
};
#undef SPR


#define CAL
pvtbName_t apvtbn_cal[] = {
#include <pvwkdef.h>
};

pvtbh_t pvtbh_cal = {
    TBH_VER_2_0_0_0,

    0,
    0,

    (TBN_FL_PERS | TBN_FL_KRNL),
    0,
    0,
    "CAL",

    0,
    0,
    0,
    "",

    "",
    "",
    sizeof(apvtbn_cal) / sizeof(pvtbName_t),
    apvtbn_cal
};
#undef CAL


/* Template of text block for transient entity instance registrations */

/*      The order of the members of apvtbn_instance[] MUST correspond to
 *      the instance descriptor enum (inst_desc).
 */
/* added object name aa04705 */
pvtbName_t apvtbn_instance[] = {
        {-1,0,0,""},            // For Process Name.
        {0,0,0,"PID"},
        {0,0,0,"TID"},
        {0,0,0,"Slot"},
        {-1,0,0,""},           // for object name
};

pvtbh_t pvtbh_instance = {
    TBH_VER_2_0_0_0,

    0,
    0,

    (TBN_FL_TRAN | TBN_FL_KRNL),
    0,
    0,
    "",

    (TBN_FL_TRAN | TBN_FL_KRNL),
    0,
    0,
    "",

    "",
    "",
    sizeof(apvtbn_instance) / sizeof(pvtbName_t),
    apvtbn_instance
};
#endif
