Search in sources :

Example 1 with EventAttribute

use of com.ibm.tuningfork.tracegen.types.EventAttribute in project JikesRVM by JikesRVM.

the class EventTypeChunk method add.

@Interruptible
public boolean add(EventType et) {
    boolean success = false;
    int savedPosition = getPosition();
    try {
        if (!addInt(et.getIndex()))
            return false;
        if (!addStringInternal(getChars(et.getName())))
            return false;
        if (!addStringInternal(getChars(et.getDescription())))
            return false;
        if (!addInt(et.getNumberOfInts()))
            return false;
        if (!addInt(et.getNumberOfLongs()))
            return false;
        if (!addInt(et.getNumberOfDoubles()))
            return false;
        if (!addInt(et.getNumberOfStrings()))
            return false;
        for (int i = 0; i < et.getNumberOfAttributes(); i++) {
            EventAttribute ea = et.getAttribute(i);
            if (!addStringInternal(getChars(ea.getName())))
                return false;
            if (!addStringInternal(getChars(ea.getDescription())))
                return false;
        }
        success = true;
        numberOfEventTypes++;
        return true;
    } finally {
        if (!success) {
            seek(savedPosition);
        }
    }
}
Also used : EventAttribute(com.ibm.tuningfork.tracegen.types.EventAttribute) Interruptible(org.vmmagic.pragma.Interruptible)

Aggregations

EventAttribute (com.ibm.tuningfork.tracegen.types.EventAttribute)1 Interruptible (org.vmmagic.pragma.Interruptible)1