public class ModificationLog
extends java.lang.Object
Given a memory address range, we can trace the log backwards to find everything that ever happened to that address range since the start of the log.
"call stacks" don't use java call stacks. They use explicit tags that are pushed and popped at the start and end of operations related to modifying the database.| Modifier and Type | Class and Description |
|---|---|
static class |
ModificationLog.MemoryAccessLog
Contains a log of events related to a specific range of database addresses, in reverse chronological order.
|
static class |
ModificationLog.MemoryOperation
Represents a single entry in a
ModificationLog.MemoryAccessLog. |
static class |
ModificationLog.Tag
Used to attach messages to events in the log.
|
| Modifier and Type | Field and Description |
|---|---|
static byte |
FREE_OPERATION |
static byte |
MALLOC_OPERATION |
static byte |
POP_OPERATION |
static byte |
PUSH_OPERATION |
static byte |
WRITE_OPERATION |
| Constructor and Description |
|---|
ModificationLog(int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
static ModificationLog.Tag |
createTag(java.lang.String tagName) |
boolean |
enabled() |
void |
end(ModificationLog.Tag tag) |
int |
getBufferEntries() |
ModificationLog.MemoryAccessLog |
getReportFor(long address,
int size)
Returns information about the last write to the given address range
|
long |
getWriteCount() |
static void |
indent(java.lang.StringBuilder builder,
int indent) |
void |
printLog(int count) |
void |
recordFree(long address,
int size) |
void |
recordMalloc(long address,
int size) |
void |
recordWrite(long address,
int size) |
void |
setBufferSize(int megs) |
void |
start(ModificationLog.Tag tag) |
public static final byte PUSH_OPERATION
public static final byte POP_OPERATION
public static final byte WRITE_OPERATION
public static final byte MALLOC_OPERATION
public static final byte FREE_OPERATION
public void clear()
public int getBufferEntries()
public void setBufferSize(int megs)
public static void indent(java.lang.StringBuilder builder,
int indent)
public boolean enabled()
public void start(ModificationLog.Tag tag)
public void end(ModificationLog.Tag tag)
public void recordWrite(long address,
int size)
public void recordMalloc(long address,
int size)
public void recordFree(long address,
int size)
public void printLog(int count)
public long getWriteCount()
public ModificationLog.MemoryAccessLog getReportFor(long address, int size)
public static ModificationLog.Tag createTag(java.lang.String tagName)