summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
AgeCommit message (Collapse)Author
2016-02-23RenderScript: silence some -Wmissing-brace warningsSaleem Abdulrasool
Silence some -Wmissing-brace warnings on Linux with clang 3.7. llvm-svn: 261612
2016-02-18[Renderscript] Refactor .rs.info parser.Aidan Dodds
This patch refactors the .rs.info table parser so that its more in line with the current language runtime code. llvm-svn: 261202
2016-02-15Silence some clang warningsSaleem Abdulrasool
Silences -Wmissing-brace and -Wformat-pedantic warnings from clang on Linux. NFC. llvm-svn: 260914
2016-02-11[Renderscript] Fix typo in mips64 argument reading code.Aidan Dodds
A typo in the mips64 argument reading code would cause register passed arguments to be truncated to 32bits. llvm-svn: 260546
2016-02-11[Renderscript] Refactor target argument reading code.Aidan Dodds
This patch reworks the function argument reading code, allowing us to annotate arguments with their types. The type/size information is needed to correctly parse arguments passed on the stack. llvm-svn: 260525
2016-02-10[RenderScript] Refactor allocation expressions Ewan Crawford
Patch refractors RS plugin code specifying how format strings are used to JIT the runtime. Author: Dean De Leo <dean@codeplay.com> llvm-svn: 260372
2016-02-06Fix an issue where certain CommandObjects (or Options thereof) were being ↵Enrico Granata
created once, bound to a specific CommandInterpreter (and hence a specific Debugger), and then cached for reuse across different Debugger instances Obviously, if the original Debugger goes away, those commands are holding on to now stale memory, which has the potential to cause crashes Fixes rdar://24460882 llvm-svn: 259964
2016-02-04[RenderScript] Add command for recalculating allocation detailsEwan Crawford
Patch replaces the --refresh flag removed in r258800 with it's own command, 'language renderscript allocation refresh'. Since there is no reason this functionality should be tied to another command as an option. The command itself simply re-JITs all our cached information about allocations. llvm-svn: 259773
2016-01-29[RenderScript] Remove unused RS commandEwan Crawford
Patch deletes the 'language renderscript module probe' command. This command was present in the initial commit to help debug the plugin. However we haven't used it recently and it's functionality is unclear, so can be removed entirely. Also add back 'kernel coordinate' command, removed by accident in clang format patch r259056. llvm-svn: 259181
2016-01-28[Renderscript] Clang-format the renderscript plugin.Aidan Dodds
Run clang-format over the renderscript plugin and fix common formatting deviations. llvm-svn: 259056
2016-01-26[RenderScript] Provide option to specify a single allocation to printEwan Crawford
Patch replaces the 'renderscript allocation list' command flag --refresh, with a new option --id <ID>. This new option only prints the details of a single allocation with a given id, rather than printing all the allocations. Functionality from the removed '--refresh' flag will be moved into its own command in a subsequent commit. llvm-svn: 258800
2016-01-20Fix clang warning in RenderScriptRuntimePavel Labath
std::array should have "the same semantics as a struct holding a C-style array T[N] as its only non-static data member", so the initialization should have one more level of braces. Hopefully, no compiler will object to that. llvm-svn: 258306
2016-01-20[RenderScript] New command for viewing coordinate of current kernel invocationEwan Crawford
Patch adds command 'language renderscript kernel coordinate' for printing the kernel index in (x,y,z) format. This is done by walking the call stack and looking for a function with suffix '.expand', as well as the frame variables containing the coordinate data. llvm-svn: 258303
2016-01-18[RenderScript] Remove mips specific expressionsEwan Crawford
Reverts earlier commit r254910, which used function pointers for jitted expressions to avoid a Mips64 compiler bug. Bug has since been fixed, and compiler longer issues the problem instruction. Author: Dean De Leo <dean@codeplay.com> llvm-svn: 258038
2016-01-14[RenderScript] Hook kernel invocation.Aidan Dodds
This patch adds a hook to track kernel invocations and to track all script and allocation objects used. llvm-svn: 257772
2016-01-07[RenderScript] Improve file format for saving RS allocationsEwan Crawford
Updates the file format for storing RS allocations to a file, so that the format now supports struct element types. The file header will now contain a subheader for every RS element and it's descendants. Where an element subheader contains element type details and offsets to the subheaders of that elements fields. Patch also improves robustness when loading incorrect files. llvm-svn: 257045
2016-01-06[Renderscript] Fix stack argument inspection.Aidan Dodds
Function arguments that were spilled and passed on the stack were incorrectly read. The value was written back into the output pointer rather then the memory being pointed to. llvm-svn: 256941
2016-01-05Revert r256769Ewan Crawford
Reverts "Use correct format identifiers to print something meaningful." Original format specifiers were correct. Instead use void* casts to remove warnings, since this is what the %p specifier expects. llvm-svn: 256833
2016-01-04Use correct format identifiers to print something meaningful.Davide Italiano
llvm-svn: 256769
2015-12-17[RenderScript] Support all RS allocation types Ewan Crawford
Currently we can just inspect the details of the most common allocation types. This patch allows us to support all the types defined by the RS runtime in its `RsDataType` enum. Including handlers, matrices and packed graphical data. llvm-svn: 255904
2015-12-11[RenderScript] Support for amd64 RS hooksEwan Crawford
Adds support for reading a maximum of six integer arguments from a renderscript hook on X86_64. Author: Luke Drummond <luke.drummond@codeplay.com> llvm-svn: 255338
2015-12-10[RenderScript] Refactor condition deciding when to JIT RS runtimeEwan Crawford
Patch creates a member function that decides when to JIT all the details about an allocation. By checking for zero pointers we can avoid the situation where we store uninitialised data from previously inspecting the allocation during creation. llvm-svn: 255238
2015-12-09[RenderScript] Add hook for destroyed allocationsEwan Crawford
New hook for rsdAllocationDestroy() which is called when allocations are deleted. LLDB should be aware of this so we can remove the allocation from our internal list. llvm-svn: 255121
2015-12-07[RenderScript] Mips64 allocations workaroundEwan Crawford
Workaround for Mips64 compiler bug by using function pointers to call functions for expression evaluation. This avoids the emission of the JAL instruction, which can only jump within a particular range of the PC. Author: Dean De Leo, dean@codeplay.com llvm-svn: 254910
2015-11-30Fix hang in global static initializationAdrian McCarthy
Differential Revision: http://reviews.llvm.org/D15092 llvm-svn: 254338
2015-11-30[RS] Support RenderScript struct allocationsEwan Crawford
This patch adds functionality for dumping allocations of struct elements. This involves: + Jitting the runtime for details on all the struct fields. + Finding the name of the struct type by looking for a global variable of the same type, which will have been reflected back to the java host code. + Using this struct type name to pass into expression evaluation for pretty printing the data for the dump command. llvm-svn: 254294
2015-11-12Allow renderscript runtime to read MIPS target arguments.Aidan Dodds
llvm-svn: 252914
2015-10-29Explicitly cast size_t var to (uint64_t) when printf format is PRIx64.Jason Molenda
llvm-svn: 251585
2015-10-27Fix Clang-tidy modernize-use-override warnings in ↵Eugene Zelenko
source/Plugins/LanguageRuntime and Platform; other minor fixes. llvm-svn: 251374
2015-10-26[RenderScript] Add option to break on a specific kernel invocationEwan Crawford
Adds option -c <x,y,z> to the 'language renderscript kernel breakpoint set' command. Breaks only on the invocation of the kernel with specified coordinate. Implemented by adding a callback to the kernel breakpoint which checks the coordinates of every invocation. llvm-svn: 251293
2015-10-26Fix a build issue on Debian unstable. The compiler rejected the convertion ↵Sylvestre Ledru
to ‘bool’ from ‘std::nullptr_t’ llvm-svn: 251276
2015-10-22[RenderScript] Support for mips64 runtime hookEwan Crawford
Previously we could not hook the RS runtime on mips64 architectures. Patch implements ABI specific code for inspecting function arguments. Author: Dean De Leo, dean@codeplay.com llvm-svn: 251003
2015-10-21[RenderScript] Fix out of bounds warning.Ewan Crawford
llvm-svn: 250891
2015-10-21[RenderScript] New commands to save/load RS allocations to file.Ewan Crawford
Patch adds command 'language renderscript allocation save' to store the contents of an allocation in a binary file. And 'language renderscript allocation load' to restore an allocation with the saved data from a binary file. Binary file format contains a header FileHeader with meta information preceding the raw data. Reviewed by: jingham, clayborg Subscribers: lldb-commits, domipheus Differential Revision: http://reviews.llvm.org/D13903 llvm-svn: 250886
2015-10-16Resubmit: RenderScript command for printing allocation contents Ewan Crawford
Previous commit r250281 broke TestDataFormatterSmartArray.py Resolved in in this patch by adding the new enum eFormatVectorOfFloat16 to FormatManager. Differential Revision: http://reviews.llvm.org/D13730 llvm-svn: 250499
2015-10-14Revert "RenderScript command for printing allocation contents"Pavel Labath
This commit breaks TestDataFormatterSmartArray on all buildbots. llvm-svn: 250290
2015-10-14RenderScript command for printing allocation contentsEwan Crawford
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
2015-10-06RenderScript command for printing allocation information Ewan Crawford
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
2015-09-22On second thought, amend the previous patch to pass itself the ValueObject& ↵Enrico Granata
for the static value instead of just its type llvm-svn: 248316
2015-09-22Move the logic to post-process dynamic types for ValueObject purposes from ↵Enrico Granata
the ValueObjects to the LanguageRuntime plugins This is meant to cover cases such as the obvious Base *base = new Derived(); where GetDynamicTypeAndAddress(base) would return the type "Derived", not "Derived *" llvm-svn: 248315
2015-09-22RenderScript lookup bug fixEwan Crawford
After the std::move operation the unique pointer is null. So this statement always returns a null pointer. Also remove unnecessary call to Module::ParseAllDebugSymbols(), which spews errors due to how it incorrectly tries to parse DWARF DIE types. llvm-svn: 248274
2015-09-21Groundwork for better tracking of renderscript allocations and scriptsEwan Crawford
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
2015-09-18Differential Revision: http://reviews.llvm.org/D12966Aidan Dodds
On behalf of Dean De Leo llvm-svn: 248003
2015-09-17Make LanguageRuntime::GetDynamicTypeAndAddress return a ValueTypeEnrico Granata
For C++ and ObjC, dynamic values are always (at least somewhat) pointer-like in nature, so a ValueType of scalar is actually good enough that it could originally be hardcoded as the right choice Other languages, might have broader notions of things that are dynamic (e.g. a language where a value type can be dynamic). In those cases, it might actually be the case that a dynamic value is a pointer-to the data, or even a host address if dynamic expression results entirely in host space are being talked about This patch enables the language runtime to make that decision, and makes ValueObjectDynamicValue comply with it llvm-svn: 247957
2015-09-16Add names to RenderScript kernel breakpoints.Ewan Crawford
Use Breakpoint::AddName to mark all RenderScript kernel breakpoints with the name 'RenderScriptKernel'. Also update logging channels to include LIBLLDB_LOG_BREAKPOINT where appropriate. llvm-svn: 247782
2015-09-10New RenderScript command to break on all kernelsEwan Crawford
Patch adds a command to RenderScript plugin allowing users to automatically set breakpoints on every RS kernel. Command syntax is 'language renderscript kernel breakpoint all <enable/disable>.' Enable sets breakpoints on all currently loaded kernels, and any kernels which will be loaded in future. Disable results in breakpoints no longer being set on loaded kernels, but doesn't affect existing breakpoints. Current command 'language renderscript kernel breakpoint' is changed to 'language renderscript kernel breakpoint set' Reviewed by: clayborg, jingham Subscribers: lldb-commits, ADodds, domipheus Differential Revision: http://reviews.llvm.org/D12728 llvm-svn: 247262
2015-09-04RenderScript pending kernel breakpoints.Ewan Crawford
Currently the RS breakpoint command can only find a kernel if it's in an already loaded RS module. This patch allows users to set pending breakpoints on RenderScript kernels which will be loaded in the future. Implemented by creating a RS breakpoint resolver, to limit search scope to only RS modules. Reviewed by: clayborg, jingham Subscribers: lldb-commits, ADodds, domipheus Differential Revision: http://reviews.llvm.org/D12360 llvm-svn: 246842
2015-09-01Simplify find_first_of & find_last_of on single char.Bruce Mitchener
Summary: When calling find_first_of and find_last_of on a single character, we can instead just call find / rfind and make our intent more clear. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12518 llvm-svn: 246609
2015-07-24Initialize variable to prevent garbage values (RenderScriptRuntime)Ewan Crawford
The kernels_found variable is not initialized, so if it is not assigned true on line 823, then it will be a garbage value in the branch condition on line 828. This patch initializes the variable to false. Patch by neilparikh. Reviewers: domipheus Differential Revision: http://reviews.llvm.org/D11323 llvm-svn: 243104
2015-06-25Resubmitting 240466 after fixing the linux test suite failures.Greg Clayton
A few extras were fixed - Symbol::GetAddress() now returns an Address object, not a reference. There were places where people were accessing the address of a symbol when the symbol's value wasn't an address symbol. On MacOSX, undefined symbols have a value zero and some places where using the symbol's address and getting an absolute address of zero (since an Address object with no section and an m_offset whose value isn't LLDB_INVALID_ADDRESS is considered an absolute address). So fixing this required some changes to make sure people were getting what they expected. - Since some places want to access the address as a reference, I added a few new functions to symbol: Address &Symbol::GetAddressRef(); const Address &Symbol::GetAddressRef() const; Linux test suite passes just fine now. <rdar://problem/21494354> llvm-svn: 240702