diff options
author | Howard Chen <howardsoc@google.com> | 2019-08-05 16:21:00 +0800 |
---|---|---|
committer | Howard Chen <howardsoc@google.com> | 2019-09-18 15:52:15 +0800 |
commit | 5676d96164a2c33c512fc09c55b5492351c4a7a4 (patch) | |
tree | a8864e5c75dbb42e9dd3c6a75cbb137efecb8397 /gsi_service.h | |
parent | 25b18cc44a5fbe7e1578dc96ac200849ffa70183 (diff) | |
download | gsid-5676d96164a2c33c512fc09c55b5492351c4a7a4.tar.gz |
Use Ashmem to reduce buffer copies.
Replace
boolean commitGsiChunkFromMemory(in byte[] bytes);
with
boolean setAshmem(in ParcelFileDescriptor stream, long size);
boolean commitGsiChunkFromAshmem(long bytes);
to reduce copies between binder buffer and process memory.
Bug: 138976291
Test: adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d file:///storage/emulated/0/Download/system.raw.gz \
--el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
--el KEY_USERDATA_SIZE 8589934592
Change-Id: Ic9b14a3f531f61aa6544f9158b199f05cdec04ec
Merged-In: Ic9b14a3f531f61aa6544f9158b199f05cdec04ec
Diffstat (limited to 'gsi_service.h')
-rw-r--r-- | gsi_service.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gsi_service.h b/gsi_service.h index 00043dd..1df4aeb 100644 --- a/gsi_service.h +++ b/gsi_service.h @@ -61,8 +61,9 @@ class GsiService : public BinderService<GsiService>, public BnGsiService { binder::Status commitGsiChunkFromStream(const ::android::os::ParcelFileDescriptor& stream, int64_t bytes, bool* _aidl_return) override; binder::Status getInstallProgress(::android::gsi::GsiProgress* _aidl_return) override; - binder::Status commitGsiChunkFromMemory(const ::std::vector<uint8_t>& bytes, - bool* _aidl_return) override; + binder::Status setGsiAshmem(const ::android::os::ParcelFileDescriptor& ashmem, int64_t size, + bool* _aidl_return) override; + binder::Status commitGsiChunkFromAshmem(int64_t bytes, bool* _aidl_return) override; binder::Status cancelGsiInstall(bool* _aidl_return) override; binder::Status enableGsi(bool oneShot, int* _aidl_return) override; binder::Status isGsiEnabled(bool* _aidl_return) override; |