|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uka.ipd.sdq.ByCounter.execution.CountingResult
public final class CountingResult
Class that holds the results of an (instrumented) method run. TODO test serialisation? test O/R-mapper? test XML serialisation? TODO in the long term, "section counts" should accept entire method as sections, and method call counts as well as opcodeCounts should become redundant TODO all setter method should return the old value of the set/overwritten variable
Field Summary | |
---|---|
long |
forcedInlining_earliestStartOfInlinedMethod
If this counting result describes "forced inlining", this field describes the earliest start of any of the inlined methods. |
static int |
MAX_OPCODE
The highest possible number of a Java bytecode opcode. |
Fields inherited from interface de.uka.ipd.sdq.ByCounter.execution.ISimpleCountingResult |
---|
NO_COUNT_AVAILABLE |
Constructor Summary | |
---|---|
CountingResult(java.lang.String qualifyingMethodName,
long methodInvocationBeginning,
long methodReportingTime,
long[] opcodeCounts,
java.util.SortedMap<java.lang.String,java.lang.Long> methodCallCounts)
|
|
CountingResult(java.util.UUID requestID,
java.util.UUID ownID,
java.util.UUID callerID,
java.lang.String ID,
java.lang.String qualifyingMethodName,
int fileType,
long inputCharacterisation,
long outputCharacterisation,
long methodInvocationBeginning,
long methodReportingTime,
long[] opcodeCounts,
java.util.SortedMap<java.lang.String,java.lang.Long> methodCallCounts,
long[] arrayCreationCounts,
int[] arrayCreationDimensions,
java.lang.String[] arrayCreationTypeInfo)
This constructor passes the arguments to the corresponding fields; the five fields that do not appear (this.characterisations, this.characterisationTitles, this.characterisationTypes and this.totalCountExclInvokes / this.totalCountInclInvokes) are initialised to empty collections (the first three) or set to 0 (the last two). |
Method Summary | |
---|---|
void |
add_methodsInstructionsOnly(CountingResult toBeAdded)
Adds the counts of this CountingResult instance to
the counting results
of the CountingResult instance given as parameter |
void |
add(CountingResult toBeAdded)
Adds the counts of this CountingResult instance to
the counting results
of the CountingResult instance given as parameter |
static CountingResult |
add(CountingResult left,
CountingResult right)
The returned CountingResult is completely different from the summands w.r.t. the method name, etc. |
void |
addCharacterisation(java.lang.String characterisationTitle,
java.lang.Integer characterisationType,
java.lang.Object characterisationValue)
TODO document |
static CountingResult |
addMethodsAndInstructionsOnly(CountingResult left,
CountingResult right)
The returned CountingResult is completely different from the summands w.r.t. the method name, etc. |
CountingResult |
clone()
|
int |
compareTo(IFullCountingResult o)
Compares getMethodInvocationBeginning() . |
long[] |
getArrayCreationCounts()
TODO |
int[] |
getArrayCreationDimensions()
TODO |
java.lang.String[] |
getArrayCreationTypeInfo()
TODO |
java.util.UUID |
getCallerID()
|
java.util.List<java.lang.Object> |
getCharacterisations()
TODO |
java.util.List<java.lang.String> |
getCharacterisationTitles()
TODO |
java.util.List<java.lang.Integer> |
getCharacterisationTypes()
TODO |
int |
getFileType()
(non-Javadoc) |
long |
getForcedInlining_earliestStartOfInlinedMethod()
|
java.lang.String |
getID()
|
int |
getIndexOfRangeBlock()
|
long |
getInputCharacterisation()
(non-Javadoc) |
java.util.SortedMap<java.lang.String,java.lang.Long> |
getMethodCallCounts()
Simple getter for method call counts. |
java.lang.Long |
getMethodCount(java.lang.String methodName)
(non-Javadoc) |
java.lang.Long |
getMethodCountByString(java.lang.String methodName)
(non-Javadoc) |
long |
getMethodInvocationBeginning()
(non-Javadoc) |
long |
getMethodReportingTime()
(non-Javadoc) |
long[] |
getNewArrayCounts()
Simple getter |
int[] |
getNewArrayDim()
Simple getter for the dimension of the new array if applicable; -1 else. |
java.lang.String[] |
getNewArrayTypes()
Simple getter for the types of the new arrays. |
java.lang.Long |
getOpcodeCount(int opcode)
(non-Javadoc) |
java.lang.Long |
getOpcodeCount(java.lang.String opcode)
(non-Javadoc) |
java.lang.Long |
getOpcodeCountByInteger(int opcode)
(non-Javadoc) |
java.lang.Long |
getOpcodeCountByString(java.lang.String opcode)
(non-Javadoc) |
long[] |
getOpcodeCounts()
(non-Javadoc) |
long |
getOutputCharacterisation()
(non-Javadoc) |
java.util.UUID |
getOwnID()
|
java.lang.String |
getQualifyingMethodName()
(non-Javadoc) |
java.util.UUID |
getRequestID()
|
int |
getSPECjvm2008_compress_fileType()
|
java.lang.Long |
getTotalCount(boolean includeInvokeOpcodes)
(non-Javadoc) |
java.lang.Long |
getTotalCountExclInvokes()
|
java.lang.Long |
getTotalCountInclInvokes()
|
boolean |
isInvariantMethodsAreInlined()
|
boolean |
isTotalCountsAlreadyComputed()
|
java.lang.String |
logResult(boolean printZeros,
boolean vertically)
Print a log message that reports the result, listing all counts and data that was collected. |
java.lang.String |
logResult(boolean printZeros,
boolean vertically,
java.util.logging.Level loggingLevel)
Print a log message that reports the result, listing all counts and data that was collected. |
static void |
main(java.lang.String[] args)
|
java.lang.Long |
methodCountSum()
Returns the total number of method invocations |
java.util.SortedMap<java.lang.String,java.lang.Long> |
overwriteMethodCallCounts(java.util.SortedMap<java.lang.String,java.lang.Long> methodCounts)
Does not perform any plausibility checks |
long[] |
overwriteOpcodeCounts(long[] newOpcodeCounts)
Does not perform any plausibility checks |
void |
resetMethodAndInstructionCounts()
Does not affect parametric counts, etc. |
java.util.UUID |
setCallerID(java.util.UUID callerID)
|
java.util.List<java.lang.Object> |
setCharacterisations(java.util.List<java.lang.Object> characterisations)
|
java.util.List<java.lang.String> |
setCharacterisationTitles(java.util.List<java.lang.String> characterisationTitles)
|
void |
setCharacterisationTypes(java.util.List<java.lang.Integer> characterisationTypes)
|
void |
setFileType(int fileType)
|
void |
setID(java.lang.String newID)
|
void |
setIndexOfRangeBlock(int indexOfRangeBlock)
|
void |
setInputCharacterisation(long inputCharacterisation)
|
void |
setInvariantMethodsAreInlined(boolean invariantMethodsAreInlined)
Flag indicating whether called methods are inlined (already part of bytecode counts) |
void |
setMethodInvocationBeginning(long methodInvocationBeginning)
|
void |
setMethodReportingTime(long methodReportingTime)
TODO consider adding a logger to CountingResult; |
void |
setOpcodeCount(int opcode,
java.lang.Long count)
(non-Javadoc) |
void |
setOutputCharacterisation(long outputCharacterisation)
|
void |
setOwnID(java.util.UUID ownID)
|
void |
setRequestID(java.util.UUID requestID)
|
void |
setTotalCountExclInvokes(java.lang.Long totalCountExclInvokes)
|
void |
setTotalCountInclInvokes(java.lang.Long totalCountInclInvokes)
|
boolean |
shallowEquals(CountingResult vr)
TODO replace return type to indicate precise location of difference (using the sum 1+2+4+8+16+etc.) |
java.lang.String |
toString()
(non-Javadoc) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_OPCODE
public long forcedInlining_earliestStartOfInlinedMethod
Constructor Detail |
---|
public CountingResult(java.lang.String qualifyingMethodName, long methodInvocationBeginning, long methodReportingTime, long[] opcodeCounts, java.util.SortedMap<java.lang.String,java.lang.Long> methodCallCounts)
public CountingResult(java.util.UUID requestID, java.util.UUID ownID, java.util.UUID callerID, java.lang.String ID, java.lang.String qualifyingMethodName, int fileType, long inputCharacterisation, long outputCharacterisation, long methodInvocationBeginning, long methodReportingTime, long[] opcodeCounts, java.util.SortedMap<java.lang.String,java.lang.Long> methodCallCounts, long[] arrayCreationCounts, int[] arrayCreationDimensions, java.lang.String[] arrayCreationTypeInfo)
requestID
- ownID
- callerID
- ID
- qualifyingMethodName
- fileType
- inputCharacterisation
- outputCharacterisation
- methodInvocationBeginning
- methodReportingTime
- opcodeCounts
- methodCallCounts
- arrayCreationCounts
- arrayCreationDimensions
- arrayCreationTypeInfo
- Method Detail |
---|
public static CountingResult add(CountingResult left, CountingResult right)
CountingResult
s.
Calling this method is quite expensive.
left
- the first summandright
- the second summand
CountingResult
where only counts are initialisedpublic static CountingResult addMethodsAndInstructionsOnly(CountingResult left, CountingResult right)
CountingResult
s.
Calling this method is quite expensive.
left
- the first summandright
- the second summand
CountingResult
where only counts are initialisedpublic static void main(java.lang.String[] args)
public void add(CountingResult toBeAdded)
CountingResult
instance to
the counting results
of the CountingResult
instance given as parameter
toBeAdded
- CountingResult
instance whose counts are to be addedpublic void add_methodsInstructionsOnly(CountingResult toBeAdded)
CountingResult
instance to
the counting results
of the CountingResult
instance given as parameter
toBeAdded
- CountingResult
instance whose counts are to be addedpublic void addCharacterisation(java.lang.String characterisationTitle, java.lang.Integer characterisationType, java.lang.Object characterisationValue)
characterisationTitle
- characterisationType
- characterisationValue
- public CountingResult clone()
clone
in class java.lang.Object
public long[] getArrayCreationCounts()
public int[] getArrayCreationDimensions()
public java.lang.String[] getArrayCreationTypeInfo()
public java.util.UUID getCallerID()
public java.util.List<java.lang.Object> getCharacterisations()
public java.util.List<java.lang.String> getCharacterisationTitles()
public java.util.List<java.lang.Integer> getCharacterisationTypes()
public int getFileType()
getFileType
in interface ISimpleCountingResult
ISimpleCountingResult.getFileType()
public java.lang.String getID()
public long getInputCharacterisation()
getInputCharacterisation
in interface ISimpleCountingResult
ISimpleCountingResult.getInputCharacterisation()
public java.util.SortedMap<java.lang.String,java.lang.Long> getMethodCallCounts()
getMethodCallCounts
in interface IFullCountingResult
HashMap
were the method name is mapped to the number
of calls of that method.public java.lang.Long getMethodCount(java.lang.String methodName)
getMethodCount
in interface ISimpleCountingResult
ISimpleCountingResult.getMethodCount(java.lang.String)
public java.lang.Long getMethodCountByString(java.lang.String methodName)
getMethodCountByString
in interface IFullCountingResult
IFullCountingResult.getMethodCountByString(java.lang.String)
public long getMethodInvocationBeginning()
getMethodInvocationBeginning
in interface IFullCountingResult
IFullCountingResult.getMethodInvocationBeginning()
public long getMethodReportingTime()
getMethodReportingTime
in interface IFullCountingResult
IFullCountingResult.getMethodReportingTime()
public long[] getNewArrayCounts()
null
else.public int[] getNewArrayDim()
public java.lang.String[] getNewArrayTypes()
public java.lang.Long getOpcodeCount(int opcode)
getOpcodeCount
in interface ISimpleCountingResult
ISimpleCountingResult.getOpcodeCount(int)
public java.lang.Long getOpcodeCount(java.lang.String opcode)
getOpcodeCount
in interface ISimpleCountingResult
ISimpleCountingResult.getOpcodeCount(java.lang.String)
public java.lang.Long getOpcodeCountByInteger(int opcode)
getOpcodeCountByInteger
in interface IFullCountingResult
IFullCountingResult.getOpcodeCountByInteger(int)
public java.lang.Long getOpcodeCountByString(java.lang.String opcode)
getOpcodeCountByString
in interface IFullCountingResult
IFullCountingResult.getOpcodeCountByString(java.lang.String)
public long[] getOpcodeCounts()
getOpcodeCounts
in interface IFullCountingResult
IFullCountingResult.getOpcodeCounts()
public long getOutputCharacterisation()
getOutputCharacterisation
in interface ISimpleCountingResult
ISimpleCountingResult.getOutputCharacterisation()
public java.util.UUID getOwnID()
public java.lang.String getQualifyingMethodName()
getQualifyingMethodName
in interface IFullCountingResult
IFullCountingResult.getQualifyingMethodName()
public java.util.UUID getRequestID()
getRequestID
in interface IFullCountingResult
public java.lang.Long getTotalCount(boolean includeInvokeOpcodes)
getTotalCount
in interface ISimpleCountingResult
ISimpleCountingResult.getTotalCount(boolean)
public java.lang.Long getTotalCountExclInvokes()
public java.lang.Long getTotalCountInclInvokes()
public boolean isInvariantMethodsAreInlined()
public java.lang.Long methodCountSum()
public java.util.SortedMap<java.lang.String,java.lang.Long> overwriteMethodCallCounts(java.util.SortedMap<java.lang.String,java.lang.Long> methodCounts)
methodCounts
-
public long[] overwriteOpcodeCounts(long[] newOpcodeCounts)
newOpcodeCounts
-
public void resetMethodAndInstructionCounts()
public java.util.UUID setCallerID(java.util.UUID callerID)
callerID
- the callerID to set
public java.util.List<java.lang.Object> setCharacterisations(java.util.List<java.lang.Object> characterisations)
characterisations
-
public java.util.List<java.lang.String> setCharacterisationTitles(java.util.List<java.lang.String> characterisationTitles)
characterisationTitles
-
public void setCharacterisationTypes(java.util.List<java.lang.Integer> characterisationTypes)
characterisationTypes
- public void setFileType(int fileType)
fileType
- public void setID(java.lang.String newID)
newID
- public void setInputCharacterisation(long inputCharacterisation)
public void setInvariantMethodsAreInlined(boolean invariantMethodsAreInlined)
invariantMethodsAreInlined
- public void setMethodInvocationBeginning(long methodInvocationBeginning)
methodInvocationBeginning
- public void setMethodReportingTime(long methodReportingTime)
methodReportingTime
- public void setOpcodeCount(int opcode, java.lang.Long count)
setOpcodeCount
in interface ISimpleCountingResult
ISimpleCountingResult.setOpcodeCount(int, java.lang.Long)
public void setOutputCharacterisation(long outputCharacterisation)
public void setOwnID(java.util.UUID ownID)
ownID
- the ownID to setpublic void setRequestID(java.util.UUID requestID)
requestID
- the requestID to setpublic void setTotalCountExclInvokes(java.lang.Long totalCountExclInvokes)
public void setTotalCountInclInvokes(java.lang.Long totalCountInclInvokes)
public boolean shallowEquals(CountingResult vr)
vr
-
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public void setIndexOfRangeBlock(int indexOfRangeBlock)
indexOfRangeBlock
- the indexOfRangeBlock to setpublic int getIndexOfRangeBlock()
getQualifyingMethodName()
).
Otherwise this is -1;public int getSPECjvm2008_compress_fileType()
public long getForcedInlining_earliestStartOfInlinedMethod()
public boolean isTotalCountsAlreadyComputed()
public java.lang.String logResult(boolean printZeros, boolean vertically)
printZeros
- When true, opcodes with an execution count of 0 are printed.vertically
- When true, print as one opcode/method count per line.
public java.lang.String logResult(boolean printZeros, boolean vertically, java.util.logging.Level loggingLevel)
printZeros
- When true, opcodes with an execution count of 0 are printed.vertically
- When true, print as one opcode/method count per line.loggingLevel
- Level
used to log the message.
public int compareTo(IFullCountingResult o)
getMethodInvocationBeginning()
.
compareTo
in interface java.lang.Comparable<IFullCountingResult>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |