Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1010)

Issue 308193004: Pepper: Narrow locking at ld subprocess start. (Closed)

Created:
6 years, 6 months ago by teravest
Modified:
6 years, 6 months ago
Reviewers:
bbudge
CC:
chromium-reviews
Visibility:
Public.

Description

Pepper: Narrow locking at ld subprocess start. Currently, subprocess_mu_ is held the entire time the ld subprocess is starting. This blocks a larger refactor that I'd like to make as part of nexe loading. I'd like to change ServiceRuntime::LoadModule() to be asynchronous to simplify threading behavior on the plugin side when loading nexe modules. However, this requires that many methods are made asynchronous, including Plugin::LoadHelperNaClModule(). PnaclTranslateThread will need to use a pattern similar to WaitForSelLdrStart() to resume execution on a background thread. However, I don't like the idea of introducing another mutex and condvar to deal with while holding subprocess_mu_. This change narrows the time that subprocess_mu_ is held to make that refactor possible. This follows a similar change made for the llc subprocess. BUG=333950 R=bbudge@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274557

Patch Set 1 : #

Total comments: 2

Patch Set 2 : fixes for bbudge #

Patch Set 3 : build fix #

Patch Set 4 : Add DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -18 lines) Patch
M ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc View 1 2 3 1 chunk +27 lines, -18 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
teravest
6 years, 6 months ago (2014-06-02 14:29:52 UTC) #1
bbudge
https://codereview.chromium.org/308193004/diff/20001/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc File ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc (right): https://codereview.chromium.org/308193004/diff/20001/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc#newcode345 ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc:345: NaClSubprocess* ld_subprocess = plugin_->LoadHelperNaClModule( Why not make ld_subprocess a ...
6 years, 6 months ago (2014-06-02 16:58:04 UTC) #2
teravest
Sounds reasonable. On Mon, Jun 2, 2014 at 10:58 AM, <bbudge@chromium.org> wrote: > > https://codereview.chromium.org/308193004/diff/20001/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc ...
6 years, 6 months ago (2014-06-02 17:02:03 UTC) #3
bbudge
lgtm
6 years, 6 months ago (2014-06-03 15:57:46 UTC) #4
teravest
6 years, 6 months ago (2014-06-03 17:14:59 UTC) #5
Message was sent while issue was closed.
Committed patchset #4 manually as r274557 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698