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
Nested ClassesModifier and TypeClassDescriptionstatic classContains a log of events related to a specific range of database addresses, in reverse chronological order.static classRepresents a single entry in aModificationLog.MemoryAccessLog.static classUsed to attach messages to events in the log. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic bytestatic bytestatic bytestatic bytestatic byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()static ModificationLog.Tagbooleanenabled()voidend(ModificationLog.Tag tag)intgetReportFor(long address, int size)Returns information about the last write to the given address rangelongstatic voidindent(StringBuilder builder, int indent)voidprintLog(int count)voidrecordFree(long address, int size)voidrecordMalloc(long address, int size)voidrecordWrite(long address, int size)voidsetBufferSize(int megs)voidstart(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
-