[lldb-dev] Module Cache improvements - RFC

Pavel Labath via lldb-dev lldb-dev at lists.llvm.org
Thu Feb 25 05:50:01 PST 2016


Thanks for the feedback, and sorry about the slow response.

After some internal discussions, it looks like we are not going to go
forward with this approach at the moment.

cheers,
pl



On 24 February 2016 at 11:16, Tamas Berghammer via lldb-dev
<lldb-dev at lists.llvm.org> wrote:
> I completely agree with you that we shouldn't change LLDB too much just to
> speed up the startup time at the first use.
>
> For android we already have a host side disk cache in place similar to what
> you described for iOS and we already using ADB (an android specific
> interface) to download the files from the device but unfortunately its speed
> is only ~4-5MB/s on most device.
>
> On Tue, Feb 23, 2016 at 9:23 PM Greg Clayton <gclayton at apple.com> wrote:
>>
>> > On Feb 23, 2016, at 10:31 AM, Nico Weber <thakis at chromium.org> wrote:
>> >
>> > On Tue, Feb 23, 2016 at 1:21 PM, Tamas Berghammer via lldb-dev
>> > <lldb-dev at lists.llvm.org> wrote:
>> > Yes we already have a disk cache on the host. I agree with you that
>> > waiting 30s at the first startup shouldn't be an issue in general (Pavel
>> > isn't sharing my opinion). The only catch is that in case of iOS there are
>> > only a few different builds released so if you downloaded the modules once
>> > then I think you won't have to download them the next time when you try to
>> > use a different device. In case of Android we have to download the symbols
>> > from each device you are using and at that point 30s might be an issue (I
>> > still don't think it is).
>> >
>> > With my app developer hat on, if some program makes me wait 30s for
>> > something then I won't like that program.
>>
>> I agree, but if the first time you hook your phone up Android Studio pops
>> up a dialog box saying "This is the first time you have connected this
>> device, hold on while I cache the shared libraries for this device..." then
>> it wouldn't be too bad. It is primarily the fact that the 30 seconds is
>> happening without feedback during first launch or attach. Also, you can
>> probably use something faster than the lldb-platform to download all of the
>> files. In Xcode, we download all symbols into the users home directory in a
>> known location:
>>
>> ~/Library/Developer/Xcode/iOS DeviceSupport
>>
>> This folder contains the exact OS version and a build number:
>>
>> (lldb) platform select remote-ios
>>   Platform: remote-ios
>>  Connected: no
>>  SDK Roots: [ 0] "~/Library/Developer/Xcode/iOS DeviceSupport/9.0 (WWWWW)"
>>  SDK Roots: [ 1] "~/Library/Developer/Xcode/iOS DeviceSupport/9.1 (XXXXX)"
>>  SDK Roots: [ 2] "~/Library/Developer/Xcode/iOS DeviceSupport/9.2 (YYYYY)"
>>
>> Where WWWWW, XXXXX, YYYYY are build numbers. We know we can look in these
>> folders for any files that are from the device. They get populated and these
>> SDK directories get searched by LLDB's PlatformRemoteiOS so they get found
>> (we don't use the file cache that the PlatformAndroid currently uses).
>>
>> So with a little work, I would add some functionality to your Android
>> Studio, have something that knows how to copy files from device as quickly
>> as possible (using lldb-platform is sloooowww and that is the way it is
>> currently done I believe) into some such directory, all while showing a
>> progress dialog to the user on first device connect, and then debugging will
>> always be quick. And you can probably make it quicker than 30 seconds.
>>
>> Greg Clayton
>>
>>
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>


More information about the lldb-dev mailing list