[Lldb-commits] [PATCH] Add ModulesDidLoad to LanguageRuntime

Greg Clayton clayborg at gmail.com
Mon Apr 20 09:40:49 PDT 2015


Right now we have all LanguageRuntime's be on demand where only if someone asks for a language runtime plug-in, we will create it lazily.

Then we need to think about if there is ever anything a language runtime plug-in should be able to do without being asked. Jim and I talked about having the Process::ModulesDidLoad() run through all language runtime plug-ins and try to load them each time modules are loaded. I would like to avoid this if possible and do things lazily as these kinds of things have a tendency to slow things down for everyone all the time, just so we can load a plug-in that nobody might use. Many of these language runtime plug-ins will need to look through the sections or look for symbols with specific names and that can be costly (going through 150 shared libraries and parsing all of their symbol tables and making the by name lookup accelerator tables).

So let me know if you truly have the need for your language runtime plug-in to be always created and why before we move on making any changes.

Greg

> On Apr 20, 2015, at 7:43 AM, Colin Riley <colin at codeplay.com> wrote:
> 
> In http://reviews.llvm.org/D9002#157126, @clayborg wrote:
> 
>> It goes a bit further and moves logic down into Process::ModulesDidLoad instead of doing the logic in Target::ModulesDidLoad. Let me know if my patch doesn't solve your problems. Test suite ran clean on MacOSX with this patch, and since only the Objective C runtime is affected, it shouldn't affect anyone else.
> 
> 
> Hi Greg,
> 
> This looks good. There is one issue to solve, and that is the first initialization of a given Language Runtime. ObjC Has a special case in that it's already initialized by various calls to GetLanguageRuntime. Another language runtime, especially one that only 'activates' mid-process, needs some way of launching so it exists in the m_language_runtimes collection.
> 
> Colin
> 
> 
> REPOSITORY
>  rL LLVM
> 
> http://reviews.llvm.org/D9002
> 
> EMAIL PREFERENCES
>  http://reviews.llvm.org/settings/panel/emailpreferences/
> 
> 





More information about the lldb-commits mailing list