This is an archive of the discontinued LLVM Phabricator instance.

Add Modulecache::GetAndPut method which wraps sequence of Get and Put (if module wasn't found in cache) calls.
ClosedPublic

Authored by ovyalov on Apr 14 2015, 4:57 AM.

Details

Reviewers
clayborg
Summary

Now module cache isn't thread/process-safe and cannot be properly used with concurrent remote test execution - there is no synchronization between module's downloading and Put calls.
This CL puts together module's downloading and insertion into cache and prepares ground for synchronization.
With a follow-up CL I'm planning to add file-based locking per each module which is in the middle of GetAndPut call - so, it will be safe to use module cache in multi-threaded/process environment.

Diff Detail

Event Timeline

ovyalov updated this revision to Diff 23726.Apr 14 2015, 4:57 AM
ovyalov retitled this revision from to Add Modulecache::GetAndPut method which wraps sequence of Get and Put (if module wasn't found in cache) calls..
ovyalov updated this object.
ovyalov edited the test plan for this revision. (Show Details)
ovyalov added a reviewer: clayborg.
ovyalov added a subscriber: Unknown Object (MLST).
clayborg accepted this revision.Apr 14 2015, 10:43 AM
clayborg edited edge metadata.
This revision is now accepted and ready to land.Apr 14 2015, 10:43 AM
ovyalov closed this revision.Apr 15 2015, 7:40 AM

AFFECTED FILES

/lldb/trunk/source/Target/Platform.cpp
/lldb/trunk/source/Utility/ModuleCache.cpp
/lldb/trunk/source/Utility/ModuleCache.h

USERS

ovyalov (Author)

http://reviews.llvm.org/rL235011