in core/src/main/java/org/adoptopenjdk/jitwatch/jarscan/JarScan.java [325:425]
private static IJarScanOperation getJarScanOperation(String[] args)
{
IJarScanOperation operation = null;
String mode = getParamString(args, ARG_MODE);
if (mode != null)
{
String modeParam = mode.toLowerCase();
switch (modeParam)
{
case "maxmethodsize":
{
int paramValue = getParam(args, ARG_LIMIT, true);
if (paramValue > 0)
{
operation = new FreqInlineSizeOperation(paramValue);
}
break;
}
case "sequencecount":
{
int paramValue = getParam(args, ARG_LENGTH, true);
if (paramValue > 0)
{
operation = new SequenceCountOperation(paramValue);
}
break;
}
case "invokecount":
{
int paramValue = getParam(args, ARG_LIMIT, false);
if (paramValue >= 0)
{
operation = new InvokeCountOperation(paramValue);
}
break;
}
case "nextinstructionfreq":
{
int paramValue = getParam(args, ARG_LIMIT, false);
if (paramValue >= 0)
{
operation = new NextInstructionOperation(paramValue);
}
}
break;
case "allocationcount":
{
int paramValue = getParam(args, ARG_LIMIT, false);
if (paramValue >= 0)
{
operation = new AllocationCountOperation(paramValue);
}
break;
}
case "instructioncount":
{
int paramValue = getParam(args, ARG_LIMIT, false);
if (paramValue >= 0)
{
operation = new InstructionCountOperation(paramValue);
}
break;
}
case "sequencesearch":
{
String sequence = getParamString(args, ARG_SEQUENCE);
if (sequence != null)
{
operation = new SequenceSearchOperation(sequence);
}
break;
}
case "methodsizehisto":
{
operation = new MethodSizeHistoOperation();
break;
}
case "methodlength":
{
int paramValue = getParam(args, ARG_LENGTH, true);
if (paramValue > 0)
{
operation = new MethodLengthOperation(paramValue);
}
break;
}
}
}
return operation;
}