Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 00f56eeb 05-Oct-2016 Luke Drummond <[email protected]>

cleanup RSCoordinate handling and factor out coordinate parser

- This change updates the signature of
`RenderScriptRuntime::PlaceBreakpointOnKernel` to take a default
RSCoordinate pointer of nullptr

cleanup RSCoordinate handling and factor out coordinate parser

- This change updates the signature of
`RenderScriptRuntime::PlaceBreakpointOnKernel` to take a default
RSCoordinate pointer of nullptr. We use this as the predicate value for
the breakpoint coordinate rather than trying to fit a sentinel `-1` into
a signed version.

```
- void
- PlaceBreakpointOnKernel(Stream &strm, const char *name, const std::array<int, 3> coords, Error &error,
- lldb::TargetSP target);
```

```
+ bool
+ PlaceBreakpointOnKernel(lldb::TargetSP target, Stream &messages, const char *name,
+ const lldb_renderscript::RSCoordinate *coords = nullptr);
```
The above change makes the API for setting breakpoints on kernels
cleaner as it returns a failure value rather than modify a sentinel in
the caller. The optional arguments are now last and have a default
(falsey) value.

- RSCoordinate objects are now comparable with operator== and have
zero initializers which should make them easier to work on.
- Added a `FMT_COORD` macro for use in logging format strings which
should make format strings a little less verbose.

llvm-svn: 283320

show more ...


# 7f193d69 16-Sep-2016 Luke Drummond <[email protected]>

[RenderScript] Support tracking and dumping reduction kernels

Initial implementation of support for tracking
[RenderScript Reductions](https://developer.android.com/guide/topics/renderscript/compute

[RenderScript] Support tracking and dumping reduction kernels

Initial implementation of support for tracking
[RenderScript Reductions](https://developer.android.com/guide/topics/renderscript/compute.html#reduction-in-depth)

With this patch, `language renderscript module dump` properly lists reductions
that are part of loaded RenderScript modules as well the the consituent
functions and their roles, within the reduction.

This support required new tracking mechanisms for the `#pragma(reduce)`
mechanism, and extension of `RSModuleDescriptor::ParseRSInfo` to support
the metadata output by `bcc`. This work was also an opportunity to
refactor/improve parse code:

- `RSModuleDescriptor::ParseExportReduceCount` now has a complete
implementation and the debugger can correctly track reductions on
receipt of a module hook.
- `RSModuleDescriptor::Dump` now dumps Reductions as well as `ForEach`
kernels. Also, fixed indentation of the output, and made indentation
groupings in the source clearer.
- `RSModuleDescriptor::ParseRSInfo` now returns true if the `".rs.info"`
packet has nonzero linecount, rather than rejecting RenderScripts that
don't contain kernels (an unlikely situation, but possibly valid). This
was changed because scripts that only contained reductions were not
being tracked in `RenderScriptRuntime::LoadModule`.
- Refactor `RSModuleInfo::ParseRSInfo` and add reduction spec parser stub
- Prepared ParseRSInfo to more easily be able to add new parser types
- Use llvm::StringRef and llvm::StringMap helpers to make the parsing code cleaner
- factor out forEachCount, globalVarCount, and pragmaCount parsing block to their own methods
- Add ExportReduceCount Parser
- Use `llvm::StringRef` in `RSKernelDescriptor` constructor
- removed now superfluous `MAXLINE` macros as we've switched from `const
char *` to `llvm::StringRef`

llvm-svn: 281717

show more ...


# b9c1b51e 06-Sep-2016 Kate Stone <[email protected]>

*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has
*** two obvious implications:

Firstly, merging t

*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has
*** two obvious implications:

Firstly, merging this particular commit into a downstream fork may be a huge
effort. Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit. The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):

find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;

The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.

Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit. There are alternatives available that will attempt
to look through this change and find the appropriate prior commit. YMMV.

llvm-svn: 280751

show more ...


Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2
# 5d057637 03-Aug-2016 Luke Drummond <[email protected]>

[RenderScript] Always create a new allocation ID in CaptureAllocationInit hook

Due to internal reuse of buffers in the RenderScript runtime by the system allocator,
comparing pointers is not a safe

[RenderScript] Always create a new allocation ID in CaptureAllocationInit hook

Due to internal reuse of buffers in the RenderScript runtime by the system allocator,
comparing pointers is not a safe way to check whether an allocation is tracked by lldb.
This change updates the lldb RenderScript internal hook callback to properly
identify and remove old allocations that had have an address that is currently
being tracked.

This change also removes the need for `lldb_private::renderscript::LookupAllocation`
to take a `create` flag, as this is now always the case.

Original Author: <[email protected]>

Subscribers: lldb-commits
llvm-svn: 277613

show more ...


Revision tags: llvmorg-3.9.0-rc1
# 19459580 28-Jul-2016 Luke Drummond <[email protected]>

Add IR fixups for RenderScript ABI mismatch between ARMV7 frontend and x86 backend

Expression evaluation for function calls to certain public RenderScript
API functions in libRSCPURef can segfault.

Add IR fixups for RenderScript ABI mismatch between ARMV7 frontend and x86 backend

Expression evaluation for function calls to certain public RenderScript
API functions in libRSCPURef can segfault.

`slang`,
the compiler frontend for RenderScript embeds an ARM specific triple in
IR that is shipped in the app, after generating IR that has some
assumptions that an ARM device is the target.
As the IR is then compiled on a device of unknown (at time the IR was
generated at least) architecture, when calling RenderScript API function
as part of debugger expressions, we have to perform a fixup pass that
removes those assumptions right before the module is sent to be
generated by the llvm backend.

This issue is caused by multiple problems with the ARMv7-specific
assumptions encoded in the LLVM IR. x86 large value returns use a hidden
first argument (mapping to llvm::Attribute::StructRet), which can't be
picked up by the JIT due to the mismatch between IR generated by the
slang frontend and llvm backend. This means that code generated by bcc
did not necessarily match the default SysV Linux/Android ABI used by the
LLDB JIT

- Original Authors: Luke Drummond (@ldrumm), Function declarations fixed by Aidan Dodds (@ADodds)

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D18059

llvm-svn: 276976

show more ...


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1
# 5f57b6ee 05-May-2016 Enrico Granata <[email protected]>

Revert r268591

"Allow LanguageRuntimes to return an error if they fail in the course of dynamic type discovery

This is not meant to report that a value doesn't have a dynamic type - it is only mean

Revert r268591

"Allow LanguageRuntimes to return an error if they fail in the course of dynamic type discovery

This is not meant to report that a value doesn't have a dynamic type - it is only meant as a mechanism to propagate actual type discovery issues (e.g. malformed type metadata for languages that have such a notion)

This information is used by ValueObjectDynamic to set its own m_error, which is a fairly sharp and heavyweight tool to begin with

For the time being, this is an architectural improvement but a practical no-op as no existing runtimes are actually setting errors"

I need to think about what I want to do in this space more carefully - this attempt might be too heavy of a hammer for the nail I am trying to fix, and I don't want to leave it in while I ponder

llvm-svn: 268686

show more ...


# 5ee54086 05-May-2016 Enrico Granata <[email protected]>

Allow LanguageRuntimes to return an error if they fail in the course of dynamic type discovery

This is not meant to report that a value doesn't have a dynamic type - it is only meant as a mechanism

Allow LanguageRuntimes to return an error if they fail in the course of dynamic type discovery

This is not meant to report that a value doesn't have a dynamic type - it is only meant as a mechanism to propagate actual type discovery issues (e.g. malformed type metadata for languages that have such a notion)

This information is used by ValueObjectDynamic to set its own m_error, which is a fairly sharp and heavyweight tool to begin with

For the time being, this is an architectural improvement but a practical no-op as no existing runtimes are actually setting errors

llvm-svn: 268591

show more ...


# 1e05c3bc 24-Mar-2016 Greg Clayton <[email protected]>

Get rid of two global constructors by making things static variables in the only function that uses these variables.

llvm-svn: 264347


Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3
# f4786785 11-Feb-2016 Aidan Dodds <[email protected]>

[Renderscript] Refactor target argument reading code.

This patch reworks the function argument reading code, allowing us to annotate arguments with their types. The type/size information is needed

[Renderscript] Refactor target argument reading code.

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

show more ...


# 0d2bfcfb 04-Feb-2016 Ewan Crawford <[email protected]>

[RenderScript] Add command for recalculating allocation details

Patch replaces the --refresh flag removed in r258800 with it's own command, 'language renderscript allocation refresh'.
Since there is

[RenderScript] Add command for recalculating allocation details

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

show more ...


Revision tags: llvmorg-3.8.0-rc2
# 36175cc0 29-Jan-2016 Ewan Crawford <[email protected]>

[RenderScript] Remove unused RS command

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 us

[RenderScript] Remove unused RS command

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

show more ...


# b3f7f69d 28-Jan-2016 Aidan Dodds <[email protected]>

[Renderscript] Clang-format the renderscript plugin.

Run clang-format over the renderscript plugin and fix common formatting deviations.

llvm-svn: 259056


# b649b005 26-Jan-2016 Ewan Crawford <[email protected]>

[RenderScript] Provide option to specify a single allocation to print

Patch replaces the 'renderscript allocation list' command flag --refresh, with a new option --id <ID>.
This new option only prin

[RenderScript] Provide option to specify a single allocation to print

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

show more ...


# 4f8817c2 20-Jan-2016 Ewan Crawford <[email protected]>

[RenderScript] New command for viewing coordinate of current kernel invocation

Patch adds command 'language renderscript kernel coordinate' for printing the kernel index in (x,y,z) format.
This is d

[RenderScript] New command for viewing coordinate of current kernel invocation

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

show more ...


Revision tags: llvmorg-3.8.0-rc1
# 836d9651 18-Jan-2016 Ewan Crawford <[email protected]>

[RenderScript] Remove mips specific expressions

Reverts earlier commit r254910, which used function pointers for jitted expressions
to avoid a Mips64 compiler bug. Bug has since been fixed, and comp

[RenderScript] Remove mips specific expressions

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 <[email protected]>
llvm-svn: 258038

show more ...


# e09c44b6 14-Jan-2016 Aidan Dodds <[email protected]>

[RenderScript] Hook kernel invocation.

This patch adds a hook to track kernel invocations and to track all script and allocation objects used.

llvm-svn: 257772


# 9293fc41 07-Jan-2016 Siva Chandra <[email protected]>

Better scheme to lookup alternate mangled name when looking up function address.

Summary:
This change is relevant for inferiors compiled with GCC. GCC does not
emit complete debug info for std::basi

Better scheme to lookup alternate mangled name when looking up function address.

Summary:
This change is relevant for inferiors compiled with GCC. GCC does not
emit complete debug info for std::basic_string<...>, and consequently, Clang
(the LLDB compiler) does not generate correct mangled names for certain
functions.

This change removes the hard-coded alternate names in
ItaniumABILanguageRuntime.cpp.

Before the hard-coded names were put in ItaniumABILanguageRuntime.cpp, one could
not evaluate std::string methods (ex. std::string::length). After putting in
the hard-coded names, one could evaluate them. However, it did not still
enable one to call methods on, say for example, std::vector<string>.
This change makes that possible.

There is some amount of incompleteness in this change. Consider the
following example:

std::string hello("hello"), world("world");
std::map<std::string, std::string> m;
m[hello] = world;

One can still not evaluate the expression "m[hello]" in LLDB. Will
address this issue in another pass.

Reviewers: jingham, vharron, evgeny777, spyffe, dawn

Subscribers: clayborg, dawn, lldb-commits

Differential Revision: http://reviews.llvm.org/D12809

llvm-svn: 257113

show more ...


# 26e52a70 07-Jan-2016 Ewan Crawford <[email protected]>

[RenderScript] Improve file format for saving RS allocations

Updates the file format for storing RS allocations to a file, so that the format now supports struct element types.

The file header will

[RenderScript] Improve file format for saving RS allocations

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

show more ...


# e69df382 09-Dec-2015 Ewan Crawford <[email protected]>

[RenderScript] Add hook for destroyed allocations

New hook for rsdAllocationDestroy() which is called when allocations are deleted.
LLDB should be aware of this so we can remove the allocation from

[RenderScript] Add hook for destroyed allocations

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

show more ...


# b1651b8d 07-Dec-2015 Ewan Crawford <[email protected]>

[RenderScript] Mips64 allocations workaround

Workaround for Mips64 compiler bug by using function pointers to call
functions for expression evaluation. This avoids the emission of the JAL instructi

[RenderScript] Mips64 allocations workaround

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, [email protected]
llvm-svn: 254910

show more ...


Revision tags: llvmorg-3.7.1
# 8b244e21 30-Nov-2015 Ewan Crawford <[email protected]>

[RS] Support RenderScript struct allocations

This patch adds functionality for dumping allocations of struct elements. This involves:

+ Jitting the runtime for details on all the struct fields.

[RS] Support RenderScript struct allocations

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

show more ...


Revision tags: llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1
# 222b937c 27-Oct-2015 Eugene Zelenko <[email protected]>

Fix Clang-tidy modernize-use-override warnings in source/Plugins/LanguageRuntime and Platform; other minor fixes.

llvm-svn: 251374


# 018f5a7e 26-Oct-2015 Ewan Crawford <[email protected]>

[RenderScript] Add option to break on a specific kernel invocation


Adds option -c <x,y,z> to the 'language renderscript kernel breakpoint set' command.

Breaks only on the invocation of the kernel

[RenderScript] Add option to break on a specific kernel invocation


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

show more ...


# 55232f09 21-Oct-2015 Ewan Crawford <[email protected]>

[RenderScript] New commands to save/load RS allocations to file.

Patch adds command 'language renderscript allocation save' to store the contents of an allocation in a binary file.
And 'language ren

[RenderScript] New commands to save/load RS allocations to file.

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

show more ...


# a0f08674 16-Oct-2015 Ewan Crawford <[email protected]>

Resubmit: RenderScript command for printing allocation contents

Previous commit r250281 broke TestDataFormatterSmartArray.py
Resolved in in this patch by adding the new enum eFormatVectorOfFloat16

Resubmit: RenderScript command for printing allocation contents

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

show more ...


123