diff options
author | Ewan Crawford <ewan@codeplay.com> | 2015-09-21 10:53:18 +0000 |
---|---|---|
committer | Ewan Crawford <ewan@codeplay.com> | 2015-09-21 10:53:18 +0000 |
commit | 78f339d19c2493b27931f7577fa9d2654a4180b7 (patch) | |
tree | 61e5fc98be0da727cf129915673756764b8f23fa /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h | |
parent | 1bacb9220aac69577d92f16bbf179ab703793083 (diff) | |
download | bcm5719-llvm-78f339d19c2493b27931f7577fa9d2654a4180b7.tar.gz bcm5719-llvm-78f339d19c2493b27931f7577fa9d2654a4180b7.zip |
Groundwork for better tracking of renderscript allocations and scripts
This patch adds some of the groundwork required for tracking the lifetime of scripts and allocations and collecting data associated with them during execution.
Committed on behalf of Aidan Dodds.
Authored by: ADodds
Reviewed by: clayborg, jingham
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12936
llvm-svn: 248149
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h')
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h index c2998de78bb..1f35f10b5ef 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h @@ -150,8 +150,7 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime eModuleKindKernelObj }; - - ~RenderScriptRuntime() {} + ~RenderScriptRuntime(); //------------------------------------------------------------------ // Static Functions @@ -253,20 +252,16 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime typedef std::shared_ptr<RuntimeHook> RuntimeHookSP; - struct ScriptDetails - { - std::string resname; - std::string scriptDyLib; - std::string cachedir; - lldb::addr_t context; - lldb::addr_t script; - }; + struct ScriptDetails; + struct AllocationDetails; lldb::ModuleSP m_libRS; lldb::ModuleSP m_libRSDriver; lldb::ModuleSP m_libRSCpuRef; std::vector<lldb_renderscript::RSModuleDescriptorSP> m_rsmodules; - std::vector<ScriptDetails> m_scripts; + + std::vector<std::unique_ptr<ScriptDetails>> m_scripts; + std::vector<std::unique_ptr<AllocationDetails>> m_allocations; std::map<lldb::addr_t, lldb_renderscript::RSModuleDescriptorSP> m_scriptMappings; std::map<lldb::addr_t, RuntimeHookSP> m_runtimeHooks; @@ -293,6 +288,17 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime void CaptureAllocationInit1(RuntimeHook* hook_info, ExecutionContext& context); void CaptureSetGlobalVar1(RuntimeHook* hook_info, ExecutionContext& context); + // Search for a script detail object using a target address. + // If a script does not currently exist this function will return nullptr. + // If 'create' is true and there is no previous script with this address, + // then a new Script detail object will be created for this address and returned. + ScriptDetails* LookUpScript(lldb::addr_t address, bool create); + + // Search for a previously saved allocation detail object using a target address. + // If an allocation does not exist for this address then nullptr will be returned. + // If 'create' is true and there is no previous allocation then a new allocation + // detail object will be created for this address and returned. + AllocationDetails* LookUpAllocation(lldb::addr_t address, bool create); }; } // namespace lldb_private |