Java Code Examples for jdk.jfr.ValueDescriptor#getFields()

The following examples show how to use jdk.jfr.ValueDescriptor#getFields() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RecordedObject.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
private Object[] structifyArray(ValueDescriptor v, Object[] array, int dimension) {
    if (array == null) {
        return null;
    }
    Object[] structArray = new Object[array.length];
    for (int i = 0; i < structArray.length; i++) {
        Object arrayElement = array[i];
        if (dimension == 0) {
            // Hack, no general way to handle structarrays
            // without invoking ObjectFarctory for every instance.
            if ((Type.ORACLE_TYPE_PREFIX + "StackFrame").equals(v.getTypeName())) {
                structArray[i] = new RecordedFrame(v.getFields(), (Object[]) arrayElement, timeConverter);
            } else {
                structArray[i] = new RecordedObject(v.getFields(), (Object[]) arrayElement, timeConverter);
            }
        } else {
            structArray[i] = structifyArray(v, (Object[]) arrayElement, dimension - 1);
        }
    }
    return structArray;
}
 
Example 2
Source File: RecordedObject.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private Object[] structifyArray(ValueDescriptor v, Object[] array, int dimension) {
    if (array == null) {
        return null;
    }
    Object[] structArray = new Object[array.length];
    for (int i = 0; i < structArray.length; i++) {
        Object arrayElement = array[i];
        if (dimension == 0) {
            // No general way to handle structarrays
            // without invoking ObjectFactory for every instance (which may require id)
            if (isStackFrameType(v.getTypeName())) {
                structArray[i] = new RecordedFrame(v.getFields(), (Object[]) arrayElement, timeConverter);
            } else {
                structArray[i] = new RecordedObject(v.getFields(), (Object[]) arrayElement, timeConverter);
            }
        } else {
            structArray[i] = structifyArray(v, (Object[]) arrayElement, dimension - 1);
        }
    }
    return structArray;
}
 
Example 3
Source File: RecordedObject.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private Object[] structifyArray(ValueDescriptor v, Object[] array, int dimension) {
    if (array == null) {
        return null;
    }
    Object[] structArray = new Object[array.length];
    for (int i = 0; i < structArray.length; i++) {
        Object arrayElement = array[i];
        if (dimension == 0) {
            // No general way to handle structarrays
            // without invoking ObjectFactory for every instance (which may require id)
            if (isStackFrameType(v.getTypeName())) {
                structArray[i] = new RecordedFrame(v.getFields(), (Object[]) arrayElement, timeConverter);
            } else {
                structArray[i] = new RecordedObject(v.getFields(), (Object[]) arrayElement, timeConverter);
            }
        } else {
            structArray[i] = structifyArray(v, (Object[]) arrayElement, dimension - 1);
        }
    }
    return structArray;
}