Class ModificationLog
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.db.ModificationLog
Records a record of every modification to the database, in a circular buffer of fixed size. Whenever anything writes
to the database, the log records the address and size of the write, along with a call stack describing what was going
on at the time of the write. The actual bytes written to the database are not recorded. In addition to writes, it
also records every invocation of malloc and free.
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.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Contains a log of events related to a specific range of database addresses, in reverse chronological order.static class
Represents a single entry in aModificationLog.MemoryAccessLog
.static class
Used to attach messages to events in the log. -
Field Summary
Modifier and TypeFieldDescriptionstatic byte
static byte
static byte
static byte
static byte
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
static ModificationLog.Tag
boolean
enabled()
void
end(ModificationLog.Tag tag)
int
getReportFor(long address, int size)
Returns information about the last write to the given address rangelong
static void
indent(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)
-
Field Details
-
PUSH_OPERATION
public static final byte PUSH_OPERATION- See Also:
- Constant Field Values
-
POP_OPERATION
public static final byte POP_OPERATION- See Also:
- Constant Field Values
-
WRITE_OPERATION
public static final byte WRITE_OPERATION- See Also:
- Constant Field Values
-
MALLOC_OPERATION
public static final byte MALLOC_OPERATION- See Also:
- Constant Field Values
-
FREE_OPERATION
public static final byte FREE_OPERATION- See Also:
- Constant Field Values
-
-
Constructor Details
-
ModificationLog
public ModificationLog(int size)
-
-
Method Details
-
clear
public void clear() -
getBufferEntries
public int getBufferEntries() -
setBufferSize
public void setBufferSize(int megs) -
indent
-
enabled
public boolean enabled() -
start
-
end
-
recordWrite
public void recordWrite(long address, int size) -
recordMalloc
public void recordMalloc(long address, int size) -
recordFree
public void recordFree(long address, int size) -
printLog
public void printLog(int count) -
getWriteCount
public long getWriteCount() -
getReportFor
Returns information about the last write to the given address range -
createTag
-