This is an archive of the discontinued LLVM Phabricator instance.

Improve ADB utilization within Android platform
ClosedPublic

Authored by ovyalov on Jun 27 2016, 2:55 PM.

Details

Summary
  • Extract sync commands like push/pull file and stat into SyncService so ADB connection that's switched in sync mode can be reused for multiple sync commands. Improves a few aspects:
    1. No ADB re-connection on every file push/pull
      1. host:transport: and sync commands are called only once per connection.
  • Reuse the same ADB connection for all shell commands fired by PlatformAndroid. Improves following aspects:
    1. No ADB re-connection on every shell command
      1. host:transport: is called only once per connection.

Diff Detail

Event Timeline

ovyalov updated this revision to Diff 62017.Jun 27 2016, 2:55 PM
ovyalov retitled this revision from to Improve ADB utilization within Android platform.
ovyalov updated this object.
ovyalov added reviewers: labath, tberghammer.
ovyalov added a subscriber: lldb-commits.
labath edited edge metadata.Jun 29 2016, 4:37 AM

Is AdbClient getting big enough to deserve a couple of unit tests? All it would take is to add the ability to specify the address to connect to and make a small mock server that listens at that address?

Is AdbClient getting big enough to deserve a couple of unit tests? All it would take is to add the ability to specify the address to connect to and make a small mock server that listens at that address?

It makes sense to do - presumably it might be a non-trivial change but worth doing as a long-term investment.

If you okay with that I'd like to submit this CL as-is and come up with unit test with a separate change list.

labath accepted this revision.Jun 30 2016, 7:52 AM
labath edited edge metadata.

ok, sounds good.

This revision is now accepted and ready to land.Jun 30 2016, 7:52 AM
ovyalov closed this revision.Jun 30 2016, 11:18 AM

Files:

/lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp
/lldb/trunk/source/Plugins/Platform/Android/AdbClient.h
/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp
/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h
/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp

Users:

ovyalov (Author)

http://reviews.llvm.org/rL274256