Search in sources :

Example 1 with MaskInfo

use of org.eclipse.linuxtools.internal.oprofile.core.daemon.OpUnitMask.MaskInfo in project linuxtools by eclipse.

the class OprofileTestingEventConfigTab method getOprofileCounter.

@Override
public OprofileCounter getOprofileCounter(int i) {
    // mock mask info
    MaskInfo maskInfo = new MaskInfo();
    // $NON-NLS-1$
    maskInfo.description = "mock mask info";
    maskInfo.value = 0;
    MaskInfo[] maskInfoDescriptions = { maskInfo };
    // mock mask
    OpUnitMask mask = new OpUnitMask();
    mask.setDefault(0);
    mask.setMaskDescriptions(maskInfoDescriptions);
    mask.setType(0);
    mask.setMaskFromIndex(0);
    mask.setMaskValue(0);
    // mock events
    OpEvent event = new OpEvent();
    event.setMinCount(1);
    // $NON-NLS-1$
    event.setText("mock-event");
    // $NON-NLS-1$
    event.setTextDescription("Mock Event");
    event.setUnitMask(mask);
    OpEvent[] events = { event };
    // mock counter
    OprofileCounter ctr = new OprofileCounter(i, events);
    ctr.setCount(1);
    ctr.setEvents(new OpEvent[] { event });
    return ctr;
}
Also used : MaskInfo(org.eclipse.linuxtools.internal.oprofile.core.daemon.OpUnitMask.MaskInfo) OprofileCounter(org.eclipse.linuxtools.internal.oprofile.launch.configuration.OprofileCounter) OpEvent(org.eclipse.linuxtools.internal.oprofile.core.daemon.OpEvent) OpUnitMask(org.eclipse.linuxtools.internal.oprofile.core.daemon.OpUnitMask)

Aggregations

OpEvent (org.eclipse.linuxtools.internal.oprofile.core.daemon.OpEvent)1 OpUnitMask (org.eclipse.linuxtools.internal.oprofile.core.daemon.OpUnitMask)1 MaskInfo (org.eclipse.linuxtools.internal.oprofile.core.daemon.OpUnitMask.MaskInfo)1 OprofileCounter (org.eclipse.linuxtools.internal.oprofile.launch.configuration.OprofileCounter)1