public final class OptMachineCodeMap extends Object
The supported functions are:
Note: This file contains two types of methods
Modifier and Type | Field and Description |
---|---|
private static int |
BCI_MASK |
private static int |
BCI_SHIFT |
private static int |
BIG_BCI_IDX_ADJ |
private static int |
BIG_BCI_MASK |
private static int |
BIG_BCI_SHIFT |
private static int |
BIG_CALL_IDX_ADJ |
private static int |
BIG_CALL_MASK |
private static int |
BIG_CALL_SHIFT |
private static int |
BIG_GCI_IDX_ADJ |
private static int |
BIG_GCI_MASK |
private static int |
BIG_GCI_SHIFT |
private static int |
BIG_IEI_IDX_ADJ |
private static int |
BIG_IEI_MASK |
private static int |
BIG_IEI_SHIFT |
private static int |
BIG_INVALID_BCI |
private static int |
BIG_INVALID_GCI |
private static int |
BIG_INVALID_IEI |
private static int |
BIG_OFFSET_IDX_ADJ |
private static int |
BIG_OFFSET_MASK |
private static int |
BIG_OFFSET_SHIFT |
private static int |
CALL_MASK |
private static int |
CALL_SHIFT |
private static OptMachineCodeMap |
emptyMachineCodeMap
A machine code map when no information is present
|
private static int |
GCI_MASK |
private static int |
GCI_SHIFT |
private int[] |
gcMaps
array of GC maps as defined by OptGCMap
|
private static int |
HUGE_BCI_IDX_ADJ |
private static int |
HUGE_BCI_MASK |
private static int |
HUGE_BCI_SHIFT |
private static int |
HUGE_CALL_IDX_ADJ |
private static int |
HUGE_CALL_MASK |
private static int |
HUGE_CALL_SHIFT |
private static int |
HUGE_GCI_IDX_ADJ |
private static int |
HUGE_GCI_MASK |
private static int |
HUGE_GCI_SHIFT |
private static int |
HUGE_IEI_IDX_ADJ |
private static int |
HUGE_IEI_MASK |
private static int |
HUGE_IEI_SHIFT |
private static int |
HUGE_INVALID_BCI |
private static int |
HUGE_INVALID_GCI |
private static int |
HUGE_INVALID_IEI |
private static int |
HUGE_OFFSET_IDX_ADJ |
private static int |
HUGE_OFFSET_MASK |
private static int |
HUGE_OFFSET_SHIFT |
private static int |
IEI_MASK |
private static int |
IEI_SHIFT |
int[] |
inlineEncoding
encoded data as defined by OptEncodedCallSiteTree.
|
private static int |
INVALID_BCI |
private static int |
INVALID_GCI |
private static int |
INVALID_IEI |
private static int |
IS_GUARDED_CALL |
private static int |
IS_UNGUARDED_CALL |
private int[] |
MCInformation
Hold entries as defined by the constants above.
|
private static int |
OFFSET_MASK |
private static int |
OFFSET_SHIFT |
private static int |
SIZEOF_BIG_ENTRY |
private static int |
SIZEOF_ENTRY |
private static int |
SIZEOF_HUGE_ENTRY |
private static int |
START_BITS |
private static int |
START_OF_BIG_ENTRY |
private static int |
START_OF_ENTRY |
private static int |
START_OF_HUGE_ENTRY |
private static int |
totalMapSize |
private static int |
totalMCSize
Running totals for the size of machine code and maps
|
private static TypeReference |
TYPE |
Modifier | Constructor and Description |
---|---|
private |
OptMachineCodeMap(int[] _MCInformation,
int[] _gcMaps,
int[] _inlineEncoding) |
Modifier and Type | Method and Description |
---|---|
(package private) static OptMachineCodeMap |
create(IR ir,
int machineCodeSize)
Creates the map, called during compilation
|
void |
dumpMCInformation(boolean DUMP_MAPS) |
private static void |
ensureCorrectMapConstruction(MachineCodeOffsets mcOffsets,
Instruction instr)
Ensures correct map construction by either correcting oddities or failing
immediately in case of errors.
|
int |
findGCMapIndex(Offset MCOffset)
This method searches for the GC map corresponding to the
passed machine code offset.
|
private int |
findMCEntry(Offset MCOffset)
Does a binary search of the machine code maps to find the index
in MCInformation where the entry for the argument machine code
offset starts.
|
int |
gcMapInformation(int index) |
private static OptMachineCodeMap |
generateMCInformation(GCIRMap irMap,
boolean DUMP_MAPS,
MachineCodeOffsets mcOffsets)
This method walks the IR map, and for each entry it creates
the machine code mapping information for the entry.
|
private int |
getBytecodeIndex(int entry)
Returns the Bytecode index for the entry passed
|
int |
getBytecodeIndexForMCOffset(Offset MCOffset)
Get the bytecode index for a machine instruction offset.
|
private int |
getCallInfo(int entry)
Returns the call info for the entry passed.
|
private int |
getGCMapIndex(int entry)
Returns the GC map index for the entry passed
|
int |
getInlineEncodingForMCOffset(Offset MCOffset)
Return the inlining encoding index for the machine instruction offset.
|
private int |
getInlineEncodingIndex(int entry)
Returns the inline encoding index for the entry passed.
|
private int |
getMCOffset(int entry)
Returns the MCOffset for the entry passed
|
NormalMethod |
getMethodForMCOffset(Offset MCOffset)
Get the RVMMethod for a machine instruction offset.
|
ArrayList<CallSite> |
getNonInlinedCallSites() |
boolean |
hasInlinedEdge(RVMMethod caller,
int bcIndex,
RVMMethod callee)
This method searches the machine code maps and determines if
the given call edge is definitely inlined into the method.
|
private boolean |
isBigEntry(int entry) |
private boolean |
isHugeEntry(int entry) |
private int |
nextEntry(int entry) |
int |
nextLocation(int currentIndex) |
private void |
printMCInformationEntry(int entry,
boolean DUMP_MAPS) |
private void |
recordStats(RVMMethod method,
int mapSize,
int machineCodeSize,
boolean DUMP_MAP_SIZES) |
boolean |
registerIsSet(int entry,
int registerNumber) |
(package private) int |
size() |
private static final int START_OF_ENTRY
private static final int START_OF_BIG_ENTRY
private static final int START_OF_HUGE_ENTRY
private static final int START_BITS
private static final int CALL_MASK
private static final int CALL_SHIFT
private static final int BCI_MASK
private static final int BCI_SHIFT
private static final int IEI_MASK
private static final int IEI_SHIFT
private static final int GCI_MASK
private static final int GCI_SHIFT
private static final int OFFSET_MASK
private static final int OFFSET_SHIFT
private static final int INVALID_GCI
private static final int INVALID_BCI
private static final int INVALID_IEI
private static final int SIZEOF_ENTRY
private static final int BIG_CALL_MASK
private static final int BIG_CALL_SHIFT
private static final int BIG_CALL_IDX_ADJ
private static final int BIG_BCI_MASK
private static final int BIG_BCI_SHIFT
private static final int BIG_BCI_IDX_ADJ
private static final int BIG_IEI_MASK
private static final int BIG_IEI_SHIFT
private static final int BIG_IEI_IDX_ADJ
private static final int BIG_GCI_MASK
private static final int BIG_GCI_SHIFT
private static final int BIG_GCI_IDX_ADJ
private static final int BIG_OFFSET_MASK
private static final int BIG_OFFSET_SHIFT
private static final int BIG_OFFSET_IDX_ADJ
private static final int BIG_INVALID_GCI
private static final int BIG_INVALID_BCI
private static final int BIG_INVALID_IEI
private static final int SIZEOF_BIG_ENTRY
private static final int HUGE_CALL_MASK
private static final int HUGE_CALL_SHIFT
private static final int HUGE_CALL_IDX_ADJ
private static final int HUGE_BCI_MASK
private static final int HUGE_BCI_SHIFT
private static final int HUGE_BCI_IDX_ADJ
private static final int HUGE_IEI_MASK
private static final int HUGE_IEI_SHIFT
private static final int HUGE_IEI_IDX_ADJ
private static final int HUGE_GCI_MASK
private static final int HUGE_GCI_SHIFT
private static final int HUGE_GCI_IDX_ADJ
private static final int HUGE_OFFSET_MASK
private static final int HUGE_OFFSET_SHIFT
private static final int HUGE_OFFSET_IDX_ADJ
private static final int HUGE_INVALID_GCI
private static final int HUGE_INVALID_BCI
private static final int HUGE_INVALID_IEI
private static final int SIZEOF_HUGE_ENTRY
private static final int IS_UNGUARDED_CALL
private static final int IS_GUARDED_CALL
private final int[] MCInformation
private final int[] gcMaps
public final int[] inlineEncoding
private static int totalMCSize
private static int totalMapSize
private static final OptMachineCodeMap emptyMachineCodeMap
private static final TypeReference TYPE
private OptMachineCodeMap(int[] _MCInformation, int[] _gcMaps, int[] _inlineEncoding)
static OptMachineCodeMap create(IR ir, int machineCodeSize)
ir
- the ir object for this methodmachineCodeSize
- the number of machine code instructions generated.public int getBytecodeIndexForMCOffset(Offset MCOffset)
MCOffset
- the machine code offset of interestpublic NormalMethod getMethodForMCOffset(Offset MCOffset)
MCOffset
- the machine code offset of interestnull
if unknownpublic int getInlineEncodingForMCOffset(Offset MCOffset)
MCOffset
- the machine code offset of interestpublic int findGCMapIndex(Offset MCOffset)
MCOffset
- the machine code offset to look forpublic ArrayList<CallSite> getNonInlinedCallSites()
public boolean hasInlinedEdge(RVMMethod caller, int bcIndex, RVMMethod callee)
caller
- caller RVMMethodbcIndex
- bytecode index of the caller methodcallee
- callee RVMMethodtrue
if the call edge is definitely inlined in this compiled method.public int gcMapInformation(int index)
public boolean registerIsSet(int entry, int registerNumber)
public int nextLocation(int currentIndex)
currentIndex
- index for current locationprivate int findMCEntry(Offset MCOffset)
MCOffset
- the machine code offset of interestprivate int nextEntry(int entry)
private static OptMachineCodeMap generateMCInformation(GCIRMap irMap, boolean DUMP_MAPS, MachineCodeOffsets mcOffsets)
irMap
- the irmap to translate fromDUMP_MAPS
- dump while we workmcOffsets
- machine code offset informationprivate static void ensureCorrectMapConstruction(MachineCodeOffsets mcOffsets, Instruction instr)
mcOffsets
- machine code offset informationinstr
- the instruction to be processedprivate int getMCOffset(int entry)
entry
- the index of the start of the entryprivate int getGCMapIndex(int entry)
entry
- the index of the start of the entryprivate int getBytecodeIndex(int entry)
entry
- the index of the start of the entryprivate int getInlineEncodingIndex(int entry)
entry
- the index of the start of the entryprivate int getCallInfo(int entry)
entry
- the index of the start of the entryprivate boolean isBigEntry(int entry)
entry
- the entry's indexprivate boolean isHugeEntry(int entry)
entry
- the entry's indexpublic void dumpMCInformation(boolean DUMP_MAPS)
private void printMCInformationEntry(int entry, boolean DUMP_MAPS)
private void recordStats(RVMMethod method, int mapSize, int machineCodeSize, boolean DUMP_MAP_SIZES)
int size()