in core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/internal/parser/v1/ChunkMetadata.java [326:381]
void resolveAnnotation(String typeIdentifier, Map<String, String> values) throws InvalidJfrFileException {
switch (typeIdentifier) {
case ANNOTATION_UNSIGNED:
unsigned = true;
return;
case ANNOTATION_MEMORY_AMOUNT:
case ANNOTATION_DATA_AMOUNT:
unit = UnitLookup.BYTE;
return;
case ANNOTATION_PERCENTAGE:
unit = UnitLookup.PERCENT_UNITY;
return;
case ANNOTATION_MEMORY_ADDRESS:
unit = UnitLookup.ADDRESS_UNITY;
return;
case ANNOTATION_TIMESPAN: {
String unitId = values.get(VALUE);
switch (unitId) {
case UNIT_TICKS:
ticksUnitKind = UnitLookup.TIMESPAN;
return;
case UNIT_NS:
unit = UnitLookup.NANOSECOND;
return;
case UNIT_MS:
unit = UnitLookup.MILLISECOND;
return;
case UNIT_S:
unit = UnitLookup.SECOND;
return;
}
return;
}
case ANNOTATION_TIMESTAMP: {
String unitId = values.get(VALUE);
switch (unitId) {
case UNIT_TICKS:
ticksUnitKind = UnitLookup.TIMESTAMP;
return;
case UNIT_NS_SINCE_EPOCH:
unit = UnitLookup.EPOCH_NS;
return;
case UNIT_MS_SINCE_EPOCH:
unit = UnitLookup.EPOCH_MS;
return;
case UNIT_S_SINCE_EPOCH:
unit = UnitLookup.EPOCH_S;
return;
}
return;
}
default:
super.resolveAnnotation(typeIdentifier, values);
return;
}
}