public final class EdgeCounts extends Object implements Callbacks.ExitMonitor
Modifier and Type | Field and Description |
---|---|
private static int[][] |
data
Array of edge count data.
|
static int |
NOT_TAKEN
Adjustment to offset in data from the bytecode index for not
taken branch counts
|
private static boolean |
registered
For a non-adaptive system, have we registered the exit call back yet?
|
static int |
TAKEN
Adjustment to offset in data from the bytecode index for taken
branch counts
|
Constructor and Description |
---|
EdgeCounts() |
Modifier and Type | Method and Description |
---|---|
private static void |
allocateCounters(int id,
int numEntries) |
static void |
allocateCounters(NormalMethod m,
int numEntries) |
static void |
dumpCounts()
Dump all the profile data to the file BaselineCompiler.options.PROFILE_EDGE_COUNTER_FILE
|
static void |
dumpCounts(String fn)
Dump all profile data to the given file
|
static BranchProfiles |
getBranchProfiles(NormalMethod m) |
static void |
loadCountsFromFileIfAvailable(String inputFileName)
Attempt to use edge counts from an input file.
|
void |
notifyExit(int value)
Notify the monitor that the VM is about to exit.
|
static void |
readCounts(String fn) |
public static final int TAKEN
public static final int NOT_TAKEN
private static boolean registered
private static int[][] data
public EdgeCounts()
public void notifyExit(int value)
Callbacks.ExitMonitor
notifyExit
in interface Callbacks.ExitMonitor
value
- the exit valuepublic static void loadCountsFromFileIfAvailable(String inputFileName)
null
, then clear any existing counts and read in new
counts from the file provided.inputFileName
- The name of the edge count file (possibly null)public static void allocateCounters(NormalMethod m, int numEntries)
private static void allocateCounters(int id, int numEntries)
public static BranchProfiles getBranchProfiles(NormalMethod m)
public static void dumpCounts()
public static void dumpCounts(String fn)
fn
- output file namepublic static void readCounts(String fn)