This change adds serialization and deserialization functionality to
BlobCache, conforming to the Flattenable interface.
Change-Id: Ibc99cb1c3d015f363d57d0713eabccec07ff975e
This change removes the mutex from the BlobCache class. The caller must
be responsible for thread synchronization in order to properly implement
the Flattenable interface, which is coming soon. Otherwise would be the
potential for the cache contents to change between the call to the
getFlattenedSize and flatten methods. Because the caller must do this
synchronization anyway there's no reason to also some synchronization
inside BlobCache.
Change-Id: Ie1f4f6f82b78744f46a41ce863cac0cad276a20e
This fixes the build on Linux when RefBase is compiled with reference tracking
enabled.
Change-Id: I3e931e0b463ce836f6fdb30c37068d77144631a3
Signed-off-by: Iliyan Malchev <malchev@google.com>
Updated the command name lists, and masked off the additional bits in
the command word when doing the name lookup.
Made descriptor values easier to grep for and consistent with kernel
output (i.e. decimal rather than hex). Attempt to show transaction
descriptors as such (they're in a union with a pointer).
Also, the writeLines() function in Static was using a no-op
logging call to write an iovec. It looks like all callers are using
N=1, so I just added a log for the first string.
Bug 5155269
Change-Id: I417b8d77da3eb6ee1d2069ba94047210f75738bc
we would leak a weakref_impl if a RefBase was never incWeak()'ed.
there was also a dangling pointer that would cause memory corruption
and double-delete when a custom destroyer was used to delay the
execution of ~RefBase.
it turns out that the custom destroyer feature caused most of the
problems, so it's now gone. The only client was SurfaceFlinger
who now handles things on its own.
RefBase is essentially back its "gingerbread" state, but the
code was slightly cleaned-up.
Bug: 5151207, 5084978
Change-Id: Id6ef1d707f96d96366f75068f77b30e0ce2722a5
The built-in ZipFile class was quite a long time to find an unpack
libraries. Move everything to using the libutils ZipFileRO class that
goes quite a bit faster. Initial measurements are 6 times faster than
the Java code.
Also, read files off the disk and compare their CRC against the APK's
CRC to see if we need to write the new file to disk. This also cuts down
the bootup time by up to a second per APK that has native files.
Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
Fixed a potential bug where calling replaceAt with a reference to
an existing element in the vector at the same index would cause
the element to be destroyed while being copied to itself.
Refactored the conditions in _grow and _shrink for clarity.
The computations are exactly the same but I think it reads better
this way. In particular, the ssize_t variable 's' is gone: it didn't
need to be signed anyways because its value could never be negative.
Change-Id: If087841c15e6a87160eee874720c4a77eb0e99a6
On review of the code, _grow and _shrink are checking for conditions
that cannot happen and that don't even really make sense. For
example, if _shrink is called with where + amount > mCount then
this is really bad, however the check only considered the case
when where >= mCount and then it would arbitrarily choose a new
value for where. Huh?
As it happens, the callers are correctly validating the
arguments before passing them down to these methods so we can
get rid of this code.
Change-Id: I921852dba8997065bb0e9cac733e82028d14afcd
Zlib compression, with a full flush between each application's
data. Encryption will be performed on the already-compressed data
once that's implemented.
On restore, the streamed data is similarly uncompressed on the fly.
Change-Id: I19b65c88e759a66527d10913d18fffa9df0bc011
This API is intended for applications that need to read a thread's
scheduling group, while using the higher-level (C++) family of thread APIs.
Change-Id: I5e58017f74c3989b20b5b1cc2bc4483c95720520
This new API will be used by applications that previously used the
lower-level pthread APIs (including pthread_join). Centralizing on the
Thread class instead of pthread will permit additional functionality to
be added later in only one location.
Change-Id: I8460169ac9c61ac9f85752405ed54c94651058d7
The version of MinGW we use doesn't have nrand48() which is really lame,
but we need to use libutils in the Windows SDK.
Change-Id: If854c03dbf02bc29e79f49e4539f08c2bf057517