class VmDebugCompressor

Defined at line 24 of file ../../zircon/kernel/vm/include/vm/debug_compressor.h

A debug compressor that can be given references to pages in VMOs and will randomly compress a

subset of them. The compression will be performed in a difference Zircon thread, so the pages

can be given with arbitrary locks held.

Public Methods

void ~VmDebugCompressor ()

Defined at line 20 of file ../../zircon/kernel/vm/debug_compressor.cc

void VmDebugCompressor ()

Defined at line 26 of file ../../zircon/kernel/vm/include/vm/debug_compressor.h

zx_status_t Init ()

Initializes the debug compressor. This method may acquire Mutexes, and so must not be called

with any spinlocks held. Other methods should not be called before |Init| is called and returns

ZX_OK.

Defined at line 133 of file ../../zircon/kernel/vm/debug_compressor.cc

void Add (vm_page_t * page, VmCowPages * object, uint64_t offset)

Adds the specified |page| at |offset| in |object| to the debug compressor as a candidate for

compression. The |page| and |object| must remain valid until |Add| returns. This implies that

|object| lock must be held, however this cannot be stated with an TA_REQ statement since

VmCowPages is not declared yet.

Defined at line 37 of file ../../zircon/kernel/vm/debug_compressor.cc

void Pause ()

Pauses the debug compressor such that all future |Add| calls will be ignored. It is an error to

call |Pause| twice without calling |Resume| in between. Pause might acquire arbitrary VMO and

other locks and should not be called with other locks held.

Defined at line 97 of file ../../zircon/kernel/vm/debug_compressor.cc

void Resume ()

Resumes from a |Pause|, causing calls to |Add| to no longer be ignored. It is an error to call

|Resume| except after having called |Pause|.

Defined at line 112 of file ../../zircon/kernel/vm/debug_compressor.cc