diff options
| author | Ewan Crawford <ewan@codeplay.com> | 2015-10-14 09:02:20 +0000 |
|---|---|---|
| committer | Ewan Crawford <ewan@codeplay.com> | 2015-10-14 09:02:20 +0000 |
| commit | 838e7bbf1f6aede97d49eedeb8a0c909e4715a2d (patch) | |
| tree | 2e497369e10fa355f9c19bf6dae71ed58d069fb4 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h | |
| parent | 6934ef31e8d98513c14247a852cc9b49bcca3dd6 (diff) | |
| download | bcm5719-llvm-838e7bbf1f6aede97d49eedeb8a0c909e4715a2d.tar.gz bcm5719-llvm-838e7bbf1f6aede97d49eedeb8a0c909e4715a2d.zip | |
RenderScript command for printing allocation contents
This patch adds the command 'language renderscript allocation dump <ID>' for printing the contents of a RS allocation.
Displaying the coordinate of each element as well as its formatted value
e.g (lldb) language renderscript allocation dump 1
Data (X, Y, Z):
(0, 0, 0) = {0 1}
(1, 0, 0) = {2 3}
(2, 0, 0) = {4 5}
A --file <filename> option is also included, since for large allocations it may be more helpful to view this text as a file.
Reviewed by: jingham, clayborg
Subscribers: lldb-commits, ADodds, domipheus, brucem
Differential Revision: http://reviews.llvm.org/D13699
llvm-svn: 250281
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h')
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h index ab4e8b1e85d..740ab32ed14 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; + bool DumpAllocation(Stream &strm, StackFrame* frame_ptr, const uint32_t id); + void ListAllocations(Stream &strm, StackFrame* frame_ptr, bool recompute); void AttemptBreakpointAtKernelName(Stream &strm, const char *name, Error &error, lldb::TargetSP target); @@ -298,6 +300,8 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime void CaptureAllocationInit1(RuntimeHook* hook_info, ExecutionContext& context); void CaptureSetGlobalVar1(RuntimeHook* hook_info, ExecutionContext& context); + AllocationDetails* FindAllocByID(Stream &strm, const uint32_t alloc_id); + // // Helper functions for jitting the runtime // @@ -310,6 +314,10 @@ class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime bool JITElementPacked(AllocationDetails* allocation, StackFrame* frame_ptr); + bool JITAllocationSize(AllocationDetails* allocation, StackFrame* frame_ptr, const uint32_t elem_size); + + bool JITAllocationStride(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, |

