New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 597379 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[mojo-edk] Buffer API

Project Member Reported by amistry@chromium.org, Mar 23 2016

Issue description

An API to get/release buffers, and read/write messages from pipes. Should significantly cut down on the number of allocations/free and buffer copies.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15

commit 72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15
Author: rockot <rockot@chromium.org>
Date: Tue Apr 26 19:56:50 2016

[mojo-edk] Add explicit message object APIs

Adds several new system API methods:

  - MojoAllocMessage: Allocates a new message object
    for a fixed payload size and set of handles
  - MojoFreeMessage: Frees a message object
  - MojoGetMessageBuffer: Acquires a mutable buffer
    address to manipulate message object payload
  - MojoWriteMessageNew: Writes a message object to
    a message pipe, relinquishing ownership
  - MojoReadMessageNew: Reads a message object from a
    message pipe, taking ownership

Message objects themselves are respresented in the public
API by an opaque MojoMessageHandle.

The purpose of these APIs is to encapsulate ownership
transfer of message buffers, allowing us to avoid several
redundant copies that are forced by MojoWriteMessage()
and MojoReadMessage() design.

BUG= 597379 

Review URL: https://codereview.chromium.org/1880823005

Cr-Commit-Position: refs/heads/master@{#389859}

[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/embedder/entrypoints.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/js/core.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/js/tests/connection_tests.js
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/BUILD.gn
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/core.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/core.h
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/core_test_base.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/core_unittest.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/dispatcher.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/dispatcher.h
[add] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/message_for_transit.cc
[add] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/message_for_transit.h
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/message_pipe_dispatcher.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/message_pipe_dispatcher.h
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/message_pipe_unittest.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/edk/system/wait_set_dispatcher_unittest.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/mojo_edk.gyp
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/public/c/system/message_pipe.h
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/public/cpp/bindings/lib/connector.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/public/platform/native/system_thunks.cc
[modify] https://crrev.com/72d05a46b2636d9d8cbf9a75b1c5d2bc2d8abe15/mojo/public/platform/native/system_thunks.h

Owner: roc...@chromium.org

Comment 3 by roc...@chromium.org, Jul 22 2016

Status: Fixed (was: Assigned)
I think we've accomplished whatever we intended to accomplish with a buffer API.

Sign in to add a comment