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

Issue 1499853004: Adds a special case for sending an int over a port with the native API. (Closed)

Created:
5 years ago by zra
Modified:
5 years ago
Reviewers:
turnidge, Ivan Posva
CC:
reviews_dartlang.org, turnidge, rmacnak, Cutch, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Adds a special case for sending an int over a port with the native API. This improves dart <=> C++ IPC round-trip-times for Mojo by 10-20%. BUG= Committed: https://github.com/dart-lang/sdk/commit/a0970835f0571a3c5d67813476715dcb7ea06c05

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Total comments: 7

Patch Set 5 : #

Total comments: 7

Patch Set 6 : Address comments #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 18

Patch Set 9 : Address comments #

Total comments: 5

Patch Set 10 : #

Patch Set 11 : Cleanup #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+406 lines, -67 lines) Patch
M runtime/include/dart_native_api.h View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M runtime/lib/isolate.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +14 lines, -9 lines 0 comments Download
M runtime/observatory/tests/service/get_stack_rpc_test.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -1 line 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 3 4 5 6 2 chunks +189 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_message.h View 1 2 3 4 5 6 7 8 9 2 chunks +45 lines, -0 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 4 5 6 7 8 9 8 chunks +30 lines, -33 lines 0 comments Download
M runtime/vm/json_stream.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -10 lines 0 comments Download
M runtime/vm/message.h View 1 2 3 4 5 2 chunks +33 lines, -3 lines 0 comments Download
M runtime/vm/native_api_impl.cc View 1 2 3 4 5 1 chunk +12 lines, -0 lines 2 comments Download
M runtime/vm/native_message_handler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +16 lines, -3 lines 0 comments Download
M runtime/vm/port_test.cc View 1 2 3 4 5 6 7 8 1 chunk +28 lines, -0 lines 0 comments Download
M runtime/vm/service.cc View 1 2 3 1 chunk +8 lines, -4 lines 0 comments Download
M runtime/vm/service_test.cc View 1 2 3 4 5 6 1 chunk +8 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (2 generated)
zra
5 years ago (2015-12-05 04:15:57 UTC) #2
Ivan Posva
https://codereview.chromium.org/1499853004/diff/40001/runtime/vm/message.h File runtime/vm/message.h (right): https://codereview.chromium.org/1499853004/diff/40001/runtime/vm/message.h#newcode122 runtime/vm/message.h:122: intptr_t integer; // Active when type_ == kIntegerType. Let's ...
5 years ago (2015-12-08 08:25:55 UTC) #3
zra
As discussed, generalized by storing a RawObject pointer in the Message's data_ field when len_ ...
5 years ago (2015-12-08 21:56:36 UTC) #4
zra
ptal
5 years ago (2015-12-09 22:27:33 UTC) #5
Ivan Posva
I had a couple Drafts still on my machine. Not sure whether these still apply... ...
5 years ago (2015-12-09 22:35:29 UTC) #6
Ivan Posva
-Ivan https://codereview.chromium.org/1499853004/diff/80001/runtime/include/dart_native_api.h File runtime/include/dart_native_api.h (right): https://codereview.chromium.org/1499853004/diff/80001/runtime/include/dart_native_api.h#newcode115 runtime/include/dart_native_api.h:115: DART_EXPORT bool Dart_PostSimpleObject(Dart_Port port_id, Dart_Handle message); Please remove ...
5 years ago (2015-12-09 22:45:28 UTC) #7
zra
https://codereview.chromium.org/1499853004/diff/60001/runtime/vm/message.h File runtime/vm/message.h (right): https://codereview.chromium.org/1499853004/diff/60001/runtime/vm/message.h#newcode71 runtime/vm/message.h:71: ASSERT((priority == kNormalPriority) || On 2015/12/09 22:35:29, Ivan Posva ...
5 years ago (2015-12-10 00:07:29 UTC) #8
zra
https://codereview.chromium.org/1499853004/diff/80001/runtime/vm/native_message_handler.cc File runtime/vm/native_message_handler.cc (right): https://codereview.chromium.org/1499853004/diff/80001/runtime/vm/native_message_handler.cc#newcode41 runtime/vm/native_message_handler.cc:41: ASSERT(message->len() > 0); On 2015/12/09 22:45:28, Ivan Posva wrote: ...
5 years ago (2015-12-10 20:51:33 UTC) #9
Ivan Posva
LGTMwC Thanks, -Ivan https://codereview.chromium.org/1499853004/diff/140001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/1499853004/diff/140001/runtime/vm/dart_api_impl.cc#newcode1592 runtime/vm/dart_api_impl.cc:1592: RawObject* raw_obj = Api::UnwrapHandle(handle); Please make ...
5 years ago (2015-12-11 21:02:39 UTC) #10
zra
https://codereview.chromium.org/1499853004/diff/140001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://codereview.chromium.org/1499853004/diff/140001/runtime/vm/dart_api_impl.cc#newcode1592 runtime/vm/dart_api_impl.cc:1592: RawObject* raw_obj = Api::UnwrapHandle(handle); On 2015/12/11 21:02:38, Ivan Posva ...
5 years ago (2015-12-11 22:01:31 UTC) #11
turnidge
https://codereview.chromium.org/1499853004/diff/160001/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/1499853004/diff/160001/runtime/vm/isolate.cc#newcode138 runtime/vm/isolate.cc:138: static Message* SerializeMessage( Instead of having this helper function, ...
5 years ago (2015-12-11 22:30:48 UTC) #12
Ivan Posva
https://codereview.chromium.org/1499853004/diff/160001/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/1499853004/diff/160001/runtime/vm/isolate.cc#newcode138 runtime/vm/isolate.cc:138: static Message* SerializeMessage( On 2015/12/11 22:30:48, turnidge wrote: > ...
5 years ago (2015-12-11 22:53:39 UTC) #13
zra
https://codereview.chromium.org/1499853004/diff/160001/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/1499853004/diff/160001/runtime/vm/isolate.cc#newcode138 runtime/vm/isolate.cc:138: static Message* SerializeMessage( On 2015/12/11 22:53:39, Ivan Posva wrote: ...
5 years ago (2015-12-11 23:44:32 UTC) #14
zra
Committed patchset #11 (id:200001) manually as a0970835f0571a3c5d67813476715dcb7ea06c05 (presubmit successful).
5 years ago (2015-12-12 00:07:20 UTC) #16
Ivan Posva
This is leading to the build failure on Mac at least. -Ivan https://codereview.chromium.org/1499853004/diff/200001/runtime/vm/native_api_impl.cc File runtime/vm/native_api_impl.cc ...
5 years ago (2015-12-12 01:10:55 UTC) #17
zra
5 years ago (2015-12-12 01:50:50 UTC) #18
Message was sent while issue was closed.
https://codereview.chromium.org/1499853004/diff/200001/runtime/vm/native_api_...
File runtime/vm/native_api_impl.cc (right):

https://codereview.chromium.org/1499853004/diff/200001/runtime/vm/native_api_...
runtime/vm/native_api_impl.cc:67: return Dart_PostCObject(port_id, &cobj);
On 2015/12/12 01:10:55, Ivan Posva wrote:
> I noticed that you are calling Dart_PostCObject here, but you need to move the
> code out into a shared static and call it from both entry points.
Unfortunately
> I did not save the comment, sorry!

I won't be able to submit a fix for a couple hours.

Powered by Google App Engine
This is Rietveld 408576698