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

Issue 8786005: Move command line processing out of coordinator (Closed)

Created:
9 years ago by sehr (please use chromium)
Modified:
9 years ago
CC:
chromium-reviews
Visibility:
Public.

Description

This CL moves all command line processing out of the coordinator. Key other features required by this change: 1) object and nexe are now passed by ppapi temporary files 2) native library and .o loading is done purely on demand 3) the command lines baked into llc and ld are used exclusively One minor change that fit with the CL is that the coordinator now creates only one helper thread that runs both llc and ld. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2440 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114473

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 20

Patch Set 4 : '' #

Total comments: 51

Patch Set 5 : '' #

Total comments: 24

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+746 lines, -681 lines) Patch
M ppapi/native_client/src/trusted/plugin/plugin.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ppapi/native_client/src/trusted/plugin/plugin.cc View 1 2 3 4 3 chunks +6 lines, -4 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h View 1 2 3 4 5 1 chunk +234 lines, -99 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc View 1 2 3 4 5 1 chunk +462 lines, -495 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/pnacl_resources.h View 1 2 3 4 2 chunks +28 lines, -28 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/pnacl_resources.cc View 1 2 3 4 3 chunks +7 lines, -54 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/srpc_client.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/srpc_client.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
sehr (please use chromium)
There are still a couple of incremental improvements I can envision, but would like to ...
9 years ago (2011-12-12 15:11:09 UTC) #1
robertm
mostly a cry for more documentation/comments obviously the classes are not used as commonly as ...
9 years ago (2011-12-12 16:23:29 UTC) #2
sehr (please use chromium)
Thanks for the review and excellent suggestions. Drastically revised CL uploaded. PTAL. http://codereview.chromium.org/8786005/diff/9002/ppapi/native_client/src/trusted/plugin/plugin.cc File ppapi/native_client/src/trusted/plugin/plugin.cc ...
9 years ago (2011-12-13 00:12:45 UTC) #3
jvoung - send to chromium...
partial review http://codereview.chromium.org/8786005/diff/6007/ppapi/native_client/src/trusted/plugin/plugin.h File ppapi/native_client/src/trusted/plugin/plugin.h (right): http://codereview.chromium.org/8786005/diff/6007/ppapi/native_client/src/trusted/plugin/plugin.h#newcode491 ppapi/native_client/src/trusted/plugin/plugin.h:491: PnaclCoordinator* pnacl_; Does this ever get deleted? ...
9 years ago (2011-12-13 03:14:33 UTC) #4
robertm
another batch comments including commenting requests for pnacl_resources.* which is pre-exising. sorry, that you having ...
9 years ago (2011-12-13 17:06:39 UTC) #5
sehr (please use chromium)
Thanks for the reviews. PTAL. http://codereview.chromium.org/8786005/diff/6007/ppapi/native_client/src/trusted/plugin/plugin.cc File ppapi/native_client/src/trusted/plugin/plugin.cc (right): http://codereview.chromium.org/8786005/diff/6007/ppapi/native_client/src/trusted/plugin/plugin.cc#newcode1623 ppapi/native_client/src/trusted/plugin/plugin.cc:1623: // Will always call ...
9 years ago (2011-12-13 20:05:04 UTC) #6
jvoung - send to chromium...
LGTM w.r.t. my comments http://codereview.chromium.org/8786005/diff/6007/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc File ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc (right): http://codereview.chromium.org/8786005/diff/6007/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc#newcode35 ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:35: // Fake filename for the ...
9 years ago (2011-12-13 21:35:49 UTC) #7
robertm
mostly a bunch of request to be more noisy when there is an error. please ...
9 years ago (2011-12-13 22:12:51 UTC) #8
sehr (please use chromium)
Thanks again for the reviews. PTAL. http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc File ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc (right): http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc#newcode244 ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:244: file_system_.reset( On 2011/12/13 ...
9 years ago (2011-12-14 16:34:19 UTC) #9
robertm
LGTM Thanks, for hanging in there On 2011/12/14 16:34:19, sehr wrote: > Thanks again for ...
9 years ago (2011-12-14 17:43:42 UTC) #10
sehr (please use chromium)
On 2011/12/14 17:43:42, robertm wrote: > LGTM > > Thanks, for hanging in there > ...
9 years ago (2011-12-14 18:21:29 UTC) #11
sehr (please use chromium)
9 years ago (2011-12-14 19:32:56 UTC) #12
Thanks again.  Committed as r114473.

On 2011/12/14 18:21:29, sehr wrote:
> On 2011/12/14 17:43:42, robertm wrote:
> > LGTM
> > 
> > Thanks, for hanging in there
> > 
> > On 2011/12/14 16:34:19, sehr wrote:
> > > Thanks again for the reviews.  PTAL.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > File ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc (right):
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:244:
> > > file_system_.reset(
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > add this to the ":" section and you wont need the reset (I think)
> > > 
> > > Done.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:297: void
> > > PnaclCoordinator::PnaclFailed(const nacl::string& error_string) {
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > rename to translateFailed or similar
> > > > add comment: must be called from within the translatethread
> > > 
> > > Name changed.  Comment is in header.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:388:
> > > callback_factory_.NewCallback(&PnaclCoordinator::PnaclDidFinish);
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > PnaclDidFinish is not a good name, TranslateFinished would be better
> > > 
> > > Done.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:394: const
> int32_t
> > > kArbitraryStackSize = 128 << 10;
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > 128 * 1024 is less "clever".
> > > 
> > > Done.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:403:
> > NaClSubprocess*
> > > PnaclCoordinator::StartSubprocess(const nacl::string& url) {
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > maybe rename url -> url_for_nexe
> > > 
> > > Done.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:408: return
> NULL;
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > error message?
> > > 
> > > Added a PLUGIN_PRINTF.  Caller will invoke ReportPpapiError.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:415: Plugin*
> > plugin
> > > = coordinator->plugin_;
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > 
> > > > I the long it would probably best to move this thread into its own
class.
> > > > 
> > > > Besides a constructor, the class would have a simple interface like
> > > > launch_thread()
> > > > virtual lookup_file(...);
> > > > virtual error(...)
> > > > virtual complete(...)
> > > > 
> > > > the class would  not know about the coordinator
> > > > 
> > > > the coordinator would subclass it and implement the virtual functions.
> > > 
> > > As we discussed on the phone, I completely agree, but will take a TODO for
> > this
> > > CL.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:439:
> > > NaClThreadExit(1);
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > maybe printf
> > > 
> > > Done.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:468: if
> > > (coordinator->SubprocessesShouldDie()) {
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > add a PLUGIN_PRINTF
> > > 
> > > Done.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc:511: return;
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > maybe also a add a PLUGIN_PRINTF here to make the error case stand out
> > > 
> > > Done.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > File ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h (right):
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h:214: // Signal
> that
> > > Pnacl translation failed.
> > > On 2011/12/13 21:35:49, jvoung wrote:
> > > > "from the translation thread" only?
> > > 
> > > Done.
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > File ppapi/native_client/src/trusted/plugin/pnacl_resources.cc (right):
> > > 
> > >
> >
>
http://codereview.chromium.org/8786005/diff/16001/ppapi/native_client/src/tru...
> > > ppapi/native_client/src/trusted/plugin/pnacl_resources.cc:70:
> > > coordinator_->ReportPpapiError(pp_error,
> > > On 2011/12/13 22:12:51, robertm wrote:
> > > > maybe also add a PLUGIN_PRINTF() since the error code above might be
> > > overlooked
> > > 
> > > I added a print to the ReportPpapiError method so that all errors get
> reported
> > > this way.
> 
> Thanks for the excellent review and for hanging in there with me also :-). 
> Waiting for trybots.

Powered by Google App Engine
This is Rietveld 408576698