This is an archive of the discontinued LLVM Phabricator instance.

Groundwork for better tracking of renderscript allocations and scripts.
ClosedPublic

Authored by ADodds on Sep 17 2015, 7:55 AM.

Details

Summary

This patch adds some of the groundwork required for tracking the lifetime of scripts and allocations and collecting data associated with them during execution.

Diff Detail

Repository
rL LLVM

Event Timeline

ADodds updated this revision to Diff 34996.Sep 17 2015, 7:55 AM
ADodds retitled this revision from to Groundwork for better tracking of renderscript allocations and scripts..
ADodds updated this object.
ADodds added reviewers: clayborg, jingham.
ADodds set the repository for this revision to rL LLVM.
ADodds added a subscriber: lldb-commits.
clayborg accepted this revision.Sep 17 2015, 9:44 AM
clayborg edited edge metadata.

A few suggestions to move things over into RenderScriptRuntime.cpp and to possibly use std::unique_ptr, but they are just suggestions.

source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
258–259 ↗(On Diff #34996)

Are you actually handing out shared pointers to anyone? If you are just using std::shared_ptr so you can put things into the vector, you can probably just use std::unique_ptr.

298 ↗(On Diff #34996)

If you only need memory management you could say that "m_scripts" owns the objects (if they start using std::unique_ptr) and hand out a raw pointer here. Not sure on your memory management needs though.

304 ↗(On Diff #34996)

Ditto above comment.

307–417 ↗(On Diff #34996)

Does anyone really need to see these objects outside of RenderScriptRuntime.cpp? If not, move these into RenderScriptRuntime.cpp.

This revision is now accepted and ready to land.Sep 17 2015, 9:44 AM
This revision was automatically updated to reflect the committed changes.