summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
diff options
context:
space:
mode:
authorEwan Crawford <ewan@codeplay.com>2015-10-06 08:42:32 +0000
committerEwan Crawford <ewan@codeplay.com>2015-10-06 08:42:32 +0000
commit15f2bd9549247a7b8f3e651e7f51497aaaea50bd (patch)
tree5384886ea2706e9cf67988116cb6f1af9266f77a /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
parent2f00005cd748e76fc7fa74eb9982ee1f58e5a3bc (diff)
RenderScript command for printing allocation information
This patch adds a new command 'language renderscript allocation list' for printing the details of all loaded RS allocations. In order to work out this information lldb JITs the runtime for the data it wants. This has a penalty of a couple seconds latency, so is only done once for each allocation and the results cached. If the user later wants to recalculate this information however, they can force lldb to do so with the --refresh flag. Reviewed by: jingham, clayborg Subscribers: lldb-commits, ADodds, domipheus, dean, tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D13247 llvm-svn: 249380
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
index 9f91fb955b74..ab4e8b1e85dd 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -202,6 +202,8 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime
void DumpKernels(Stream &strm) const;
+ void ListAllocations(Stream &strm, StackFrame* frame_ptr, bool recompute);
+
void AttemptBreakpointAtKernelName(Stream &strm, const char *name, Error &error, lldb::TargetSP target);
void SetBreakAllKernels(bool do_break, lldb::TargetSP target);
@@ -220,6 +222,9 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime
protected:
+ struct ScriptDetails;
+ struct AllocationDetails;
+
void InitSearchFilter(lldb::TargetSP target)
{
if (!m_filtersp)
@@ -230,6 +235,10 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime
void LoadRuntimeHooks(lldb::ModuleSP module, ModuleKind kind);
+ bool RefreshAllocation(AllocationDetails* allocation, StackFrame* frame_ptr);
+
+ bool EvalRSExpression(const char* expression, StackFrame* frame_ptr, uint64_t* result);
+
lldb::BreakpointSP CreateKernelBreakpoint(const ConstString& name);
void BreakOnModuleKernels(const lldb_renderscript::RSModuleDescriptorSP rsmodule_sp);
@@ -256,9 +265,6 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime
typedef std::shared_ptr<RuntimeHook> RuntimeHookSP;
- struct ScriptDetails;
- struct AllocationDetails;
-
lldb::ModuleSP m_libRS;
lldb::ModuleSP m_libRSDriver;
lldb::ModuleSP m_libRSCpuRef;
@@ -292,6 +298,18 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime
void CaptureAllocationInit1(RuntimeHook* hook_info, ExecutionContext& context);
void CaptureSetGlobalVar1(RuntimeHook* hook_info, ExecutionContext& context);
+ //
+ // Helper functions for jitting the runtime
+ //
+ bool JITDataPointer(AllocationDetails* allocation, StackFrame* frame_ptr,
+ unsigned int x = 0, unsigned int y = 0, unsigned int z = 0);
+
+ bool JITTypePointer(AllocationDetails* allocation, StackFrame* frame_ptr);
+
+ bool JITTypePacked(AllocationDetails* allocation, StackFrame* frame_ptr);
+
+ bool JITElementPacked(AllocationDetails* allocation, StackFrame* frame_ptr);
+
// 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,