Instrumentation and memory flushing.

Change-Id: I9aa1a6242228a624bf002ce55948d13ce176b669
Beginning of disk storage.

Change-Id: Ic2f353b48a7bc58700ba62bb6115bd1726060142