Skip to content
Commit 8eebdbe4 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Interface to dynamically generate DropBox data.

The existing DropBoxManager APIs require that data be entirely
pre-cooked before it can be added.  This adds significant overhead
to Log.wtf() style messages which collect logcat data, since we
need to copy that log data through a pipe to an in-memory buffer.

To avoid that overhead, this change introduces an EntrySource
interface which can either be pre-cooked data or dynamically
generated data written directly to an open FD on disk.  Future
changes will adjust the Log.wtf() logic to use this new interface
to have logcat write directly into an FD.

In addition, this interface paves the way for leveraging a newer
F2FS feature which transparently compresses and decompresses data in
the kernel, instead of forcing us to use DEFLATE in userspace.

This change drops periodic quota checking while recording new
entries, and instead adjusts to pre-flight the quota checks before
writing starts.  It also drops the expensive fsync(), since these
logs are collected on a best-effort basis.

Bug: 176843501
Test: atest CtsDropBoxManagerTestCases
Test: atest FrameworksServicesTests:com.android.server.DropBoxTest
Change-Id: Ic78e99a32cfaf4edac066a73a6864c9c9e9fdeef
parent 47e8e593
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment