/* -- automatically generated -- do not change ------------------------------ */
/* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv */

/* -- Region -- */

    case ELG_ENTER :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 rid;
        int i;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) - sizeof(rid) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time) + sizeof(rid)
                                   + (handle->metc * sizeof(elg_ui8)) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        rid    = ElgRec_read_ui4(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);

        elg_readcb_ENTER(lid, time, rid, handle->metc, handle->metv, userdata);
        break;
      }

    case ELG_ENTER_CS :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 csid;
        int i;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) - sizeof(csid) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time) + sizeof(csid)
                                   + (handle->metc * sizeof(elg_ui8)) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        csid   = ElgRec_read_ui4(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);

        elg_readcb_ENTER_CS(lid, time, csid, handle->metc, handle->metv,
                   userdata);
        break;
      }

    case ELG_EXIT :
      {
        elg_ui4 lid;
        elg_d8 time;
        int i;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time)
                                   + (handle->metc * sizeof(elg_ui8)) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);

        elg_readcb_EXIT(lid, time, handle->metc, handle->metv, userdata);
        break;
      }

/* -- MPI-1 -- */

    case ELG_MPI_SEND :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 dlid;
        elg_ui4 cid;
        elg_ui4 tag;
        elg_ui4 sent;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(dlid) + sizeof(cid)
                                   + sizeof(tag) + sizeof(sent) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        dlid   = ElgRec_read_ui4(rec);
        cid    = ElgRec_read_ui4(rec);
        tag    = ElgRec_read_ui4(rec);
        sent   = ElgRec_read_ui4(rec);

        elg_readcb_MPI_SEND(lid, time, dlid, cid, tag, sent, userdata);
        break;
      }

    case ELG_MPI_RECV :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 slid;
        elg_ui4 cid;
        elg_ui4 tag;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(slid) + sizeof(cid)
                                   + sizeof(tag) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        slid   = ElgRec_read_ui4(rec);
        cid    = ElgRec_read_ui4(rec);
        tag    = ElgRec_read_ui4(rec);

        elg_readcb_MPI_RECV(lid, time, slid, cid, tag, userdata);
        break;
      }

    case ELG_MPI_COLLEXIT :
      {
        elg_ui4 lid;
        elg_d8 time;
        int i;
        elg_ui4 rlid;
        elg_ui4 cid;
        elg_ui4 sent;
        elg_ui4 recvd;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) - sizeof(rlid) - sizeof(cid)
                                  - sizeof(sent) - sizeof(recvd) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time)
                                   + (handle->metc * sizeof(elg_ui8))
                                   + sizeof(rlid) + sizeof(cid) + sizeof(sent)
                                   + sizeof(recvd) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);
        rlid   = ElgRec_read_ui4(rec);
        cid    = ElgRec_read_ui4(rec);
        sent   = ElgRec_read_ui4(rec);
        recvd  = ElgRec_read_ui4(rec);

        elg_readcb_MPI_COLLEXIT(lid, time, handle->metc, handle->metv, rlid,
                   cid, sent, recvd, userdata);
        break;
      }

/* -- MPI-1 Non-blocking -- */

    case ELG_MPI_SEND_COMPLETE :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 reqid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(reqid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        reqid  = ElgRec_read_ui4(rec);

        elg_readcb_MPI_SEND_COMPLETE(lid, time, reqid, userdata);
        break;
      }

    case ELG_MPI_RECV_REQUEST :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 reqid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(reqid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        reqid  = ElgRec_read_ui4(rec);

        elg_readcb_MPI_RECV_REQUEST(lid, time, reqid, userdata);
        break;
      }

    case ELG_MPI_REQUEST_TESTED :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 reqid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(reqid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        reqid  = ElgRec_read_ui4(rec);

        elg_readcb_MPI_REQUEST_TESTED(lid, time, reqid, userdata);
        break;
      }

    case ELG_MPI_CANCELLED :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 reqid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(reqid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        reqid  = ElgRec_read_ui4(rec);

        elg_readcb_MPI_CANCELLED(lid, time, reqid, userdata);
        break;
      }

/* -- MPI-2 One-sided Operations -- */

    case ELG_MPI_PUT_1TS :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 dlid;
        elg_ui4 wid;
        elg_ui4 rmaid;
        elg_ui4 nbytes;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(dlid) + sizeof(wid)
                                   + sizeof(rmaid) + sizeof(nbytes) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        dlid   = ElgRec_read_ui4(rec);
        wid    = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);
        nbytes = ElgRec_read_ui4(rec);

        elg_readcb_MPI_PUT_1TS(lid, time, dlid, wid, rmaid, nbytes, userdata);
        break;
      }

    case ELG_MPI_PUT_1TE :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 slid;
        elg_ui4 wid;
        elg_ui4 rmaid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(slid) + sizeof(wid)
                                   + sizeof(rmaid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        slid   = ElgRec_read_ui4(rec);
        wid    = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);

        elg_readcb_MPI_PUT_1TE(lid, time, slid, wid, rmaid, userdata);
        break;
      }

    case ELG_MPI_PUT_1TE_REMOTE :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 dlid;
        elg_ui4 wid;
        elg_ui4 rmaid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(dlid) + sizeof(wid)
                                   + sizeof(rmaid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        dlid   = ElgRec_read_ui4(rec);
        wid    = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);

        elg_readcb_MPI_PUT_1TE_REMOTE(lid, time, dlid, wid, rmaid, userdata);
        break;
      }

    case ELG_MPI_GET_1TO :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 rmaid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(rmaid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        rmaid  = ElgRec_read_ui4(rec);

        elg_readcb_MPI_GET_1TO(lid, time, rmaid, userdata);
        break;
      }

    case ELG_MPI_GET_1TS :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 dlid;
        elg_ui4 wid;
        elg_ui4 rmaid;
        elg_ui4 nbytes;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(dlid) + sizeof(wid)
                                   + sizeof(rmaid) + sizeof(nbytes) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        dlid   = ElgRec_read_ui4(rec);
        wid    = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);
        nbytes = ElgRec_read_ui4(rec);

        elg_readcb_MPI_GET_1TS(lid, time, dlid, wid, rmaid, nbytes, userdata);
        break;
      }

    case ELG_MPI_GET_1TS_REMOTE :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 dlid;
        elg_ui4 wid;
        elg_ui4 rmaid;
        elg_ui4 nbytes;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(dlid) + sizeof(wid)
                                   + sizeof(rmaid) + sizeof(nbytes) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        dlid   = ElgRec_read_ui4(rec);
        wid    = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);
        nbytes = ElgRec_read_ui4(rec);

        elg_readcb_MPI_GET_1TS_REMOTE(lid, time, dlid, wid, rmaid, nbytes,
                   userdata);
        break;
      }

    case ELG_MPI_GET_1TE :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 slid;
        elg_ui4 wid;
        elg_ui4 rmaid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(slid) + sizeof(wid)
                                   + sizeof(rmaid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        slid   = ElgRec_read_ui4(rec);
        wid    = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);

        elg_readcb_MPI_GET_1TE(lid, time, slid, wid, rmaid, userdata);
        break;
      }

    case ELG_MPI_WINEXIT :
      {
        elg_ui4 lid;
        elg_d8 time;
        int i;
        elg_ui4 wid;
        elg_ui4 cid;
        elg_ui1 synex;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) - sizeof(wid) - sizeof(cid)
                                  - sizeof(synex) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time)
                                   + (handle->metc * sizeof(elg_ui8))
                                   + sizeof(wid) + sizeof(cid) + sizeof(synex) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);
        wid    = ElgRec_read_ui4(rec);
        cid    = ElgRec_read_ui4(rec);
        synex  = ElgRec_read_ui1(rec);

        elg_readcb_MPI_WINEXIT(lid, time, handle->metc, handle->metv, wid, cid,
                   synex, userdata);
        break;
      }

    case ELG_MPI_WINCOLLEXIT :
      {
        elg_ui4 lid;
        elg_d8 time;
        int i;
        elg_ui4 wid;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) - sizeof(wid) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time)
                                   + (handle->metc * sizeof(elg_ui8))
                                   + sizeof(wid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);
        wid    = ElgRec_read_ui4(rec);

        elg_readcb_MPI_WINCOLLEXIT(lid, time, handle->metc, handle->metv, wid,
                   userdata);
        break;
      }

    case ELG_MPI_WIN_LOCK :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 llid;
        elg_ui4 wid;
        elg_ui1 ltype;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(llid) + sizeof(wid)
                                   + sizeof(ltype) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        llid   = ElgRec_read_ui4(rec);
        wid    = ElgRec_read_ui4(rec);
        ltype  = ElgRec_read_ui1(rec);

        elg_readcb_MPI_WIN_LOCK(lid, time, llid, wid, ltype, userdata);
        break;
      }

    case ELG_MPI_WIN_UNLOCK :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 llid;
        elg_ui4 wid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(llid) + sizeof(wid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        llid   = ElgRec_read_ui4(rec);
        wid    = ElgRec_read_ui4(rec);

        elg_readcb_MPI_WIN_UNLOCK(lid, time, llid, wid, userdata);
        break;
      }

/* -- Generic One-sided Operations -- */

    case ELG_PUT_1TS :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 dlid;
        elg_ui4 rmaid;
        elg_ui4 nbytes;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(dlid) + sizeof(rmaid)
                                   + sizeof(nbytes) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        dlid   = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);
        nbytes = ElgRec_read_ui4(rec);

        elg_readcb_PUT_1TS(lid, time, dlid, rmaid, nbytes, userdata);
        break;
      }

    case ELG_PUT_1TE :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 slid;
        elg_ui4 rmaid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(slid) + sizeof(rmaid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        slid   = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);

        elg_readcb_PUT_1TE(lid, time, slid, rmaid, userdata);
        break;
      }

    case ELG_PUT_1TE_REMOTE :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 dlid;
        elg_ui4 rmaid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(dlid) + sizeof(rmaid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        dlid   = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);

        elg_readcb_PUT_1TE_REMOTE(lid, time, dlid, rmaid, userdata);
        break;
      }

    case ELG_GET_1TS :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 dlid;
        elg_ui4 rmaid;
        elg_ui4 nbytes;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(dlid) + sizeof(rmaid)
                                   + sizeof(nbytes) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        dlid   = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);
        nbytes = ElgRec_read_ui4(rec);

        elg_readcb_GET_1TS(lid, time, dlid, rmaid, nbytes, userdata);
        break;
      }

    case ELG_GET_1TS_REMOTE :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 dlid;
        elg_ui4 rmaid;
        elg_ui4 nbytes;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(dlid) + sizeof(rmaid)
                                   + sizeof(nbytes) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        dlid   = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);
        nbytes = ElgRec_read_ui4(rec);

        elg_readcb_GET_1TS_REMOTE(lid, time, dlid, rmaid, nbytes, userdata);
        break;
      }

    case ELG_GET_1TE :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 slid;
        elg_ui4 rmaid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(slid) + sizeof(rmaid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        slid   = ElgRec_read_ui4(rec);
        rmaid  = ElgRec_read_ui4(rec);

        elg_readcb_GET_1TE(lid, time, slid, rmaid, userdata);
        break;
      }

    case ELG_COLLEXIT :
      {
        elg_ui4 lid;
        elg_d8 time;
        int i;
        elg_ui4 rlid;
        elg_ui4 cid;
        elg_ui4 sent;
        elg_ui4 recvd;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) - sizeof(rlid) - sizeof(cid)
                                  - sizeof(sent) - sizeof(recvd) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time)
                                   + (handle->metc * sizeof(elg_ui8))
                                   + sizeof(rlid) + sizeof(cid) + sizeof(sent)
                                   + sizeof(recvd) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);
        rlid   = ElgRec_read_ui4(rec);
        cid    = ElgRec_read_ui4(rec);
        sent   = ElgRec_read_ui4(rec);
        recvd  = ElgRec_read_ui4(rec);

        elg_readcb_COLLEXIT(lid, time, handle->metc, handle->metv, rlid, cid,
                   sent, recvd, userdata);
        break;
      }

    case ELG_ALOCK :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 lkid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(lkid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        lkid   = ElgRec_read_ui4(rec);

        elg_readcb_ALOCK(lid, time, lkid, userdata);
        break;
      }

    case ELG_RLOCK :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 lkid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(lkid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        lkid   = ElgRec_read_ui4(rec);

        elg_readcb_RLOCK(lid, time, lkid, userdata);
        break;
      }

/* -- OpenMP -- */

    case ELG_OMP_FORK :
      {
        elg_ui4 lid;
        elg_d8 time;

        if ( length == sizeof(lid) + sizeof(time) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);

        elg_readcb_OMP_FORK(lid, time, userdata);
        break;
      }

    case ELG_OMP_JOIN :
      {
        elg_ui4 lid;
        elg_d8 time;

        if ( length == sizeof(lid) + sizeof(time) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);

        elg_readcb_OMP_JOIN(lid, time, userdata);
        break;
      }

    case ELG_OMP_ALOCK :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 lkid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(lkid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        lkid   = ElgRec_read_ui4(rec);

        elg_readcb_OMP_ALOCK(lid, time, lkid, userdata);
        break;
      }

    case ELG_OMP_RLOCK :
      {
        elg_ui4 lid;
        elg_d8 time;
        elg_ui4 lkid;

        if ( length == sizeof(lid) + sizeof(time) + sizeof(lkid) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        lkid   = ElgRec_read_ui4(rec);

        elg_readcb_OMP_RLOCK(lid, time, lkid, userdata);
        break;
      }

    case ELG_OMP_COLLEXIT :
      {
        elg_ui4 lid;
        elg_d8 time;
        int i;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time)
                                   + (handle->metc * sizeof(elg_ui8)) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);

        elg_readcb_OMP_COLLEXIT(lid, time, handle->metc, handle->metv,
                   userdata);
        break;
      }

/* -- EPILOG Internal -- */

    case ELG_LOG_OFF :
      {
        elg_ui4 lid;
        elg_d8 time;
        int i;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time)
                                   + (handle->metc * sizeof(elg_ui8)) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);

        elg_readcb_LOG_OFF(lid, time, handle->metc, handle->metv, userdata);
        break;
      }

    case ELG_LOG_ON :
      {
        elg_ui4 lid;
        elg_d8 time;
        int i;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time)
                                   + (handle->metc * sizeof(elg_ui8)) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);

        elg_readcb_LOG_ON(lid, time, handle->metc, handle->metv, userdata);
        break;
      }

    case ELG_ENTER_TRACING :
      {
        elg_ui4 lid;
        elg_d8 time;
        int i;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time)
                                   + (handle->metc * sizeof(elg_ui8)) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);

        elg_readcb_ENTER_TRACING(lid, time, handle->metc, handle->metv,
                   userdata);
        break;
      }

    case ELG_EXIT_TRACING :
      {
        elg_ui4 lid;
        elg_d8 time;
        int i;

        if ( handle->metc == 255) {
          handle->metc = ( length - sizeof(time) )
                           / sizeof(elg_ui8);
          if (handle->metc > 0) {
            handle->metv = realloc(handle->metv, handle->metc * sizeof(elg_ui8));
            if (handle->metv == NULL)
              elg_error_msg("Can't allocate metric data buffer");
          }
        }
        if ( length == sizeof(lid) + sizeof(time)
                                   + (handle->metc * sizeof(elg_ui8)) )
          lid  = ElgRec_read_ui4(rec);
        else
          lid  = handle->single_lid;
        time   = ElgRec_read_d8(rec);
        for (i = 0; i < handle->metc; i++)
          handle->metv[i] = ElgRec_read_ui8(rec);

        elg_readcb_EXIT_TRACING(lid, time, handle->metc, handle->metv,
                   userdata);
        break;
      }
