Class ModificationLog

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.db.ModificationLog

public class ModificationLog extends Object
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.
  • Field Details

  • Constructor Details

    • ModificationLog

      public ModificationLog(int size)
  • Method Details

    • clear

      public void clear()
    • getBufferEntries

      public int getBufferEntries()
    • setBufferSize

      public void setBufferSize(int megs)
    • indent

      public static void indent(StringBuilder builder, int indent)
    • enabled

      public boolean enabled()
    • start

      public void start(ModificationLog.Tag tag)
    • end

      public void end(ModificationLog.Tag tag)
    • 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

      public ModificationLog.MemoryAccessLog getReportFor(long address, int size)
      Returns information about the last write to the given address range
    • createTag

      public static ModificationLog.Tag createTag(String tagName)