diff options
author | Mike Kaufman <mike.kaufman@microsoft.com> | 2017-08-25 22:45:00 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-09-20 19:32:39 +0300 |
commit | a32c8a566ef1996d786e49e9bb0e672f5864e5ba (patch) | |
tree | ec5fafb5aec5408cb3005df6fc59928dbeaef166 /node.gyp | |
parent | b0f5b2a38c36c5634c6c07cb27958755300b055d (diff) |
http2,async-wrap: introduce AliasedBuffer class
This change introduces an AliasedBuffer class and updates asytnc-wrap
and http2 to use this class.
A common technique to optimize performance is to create a native buffer
and then map that native buffer to user space via JS array. The runtime
can efficiently write to the native buffer without having to route
though JS, and the values being written are accessible from user space.
While efficient, this technique allows modifications to user
space memory w/out going through JS type system APIs, effectively
bypassing any monitoring the JS VM has in place to track program state
modifications. The result is that monitors have an incorrect view
of prorgram state.
The AliasedBuffer class provides a future placeholder where this
technique can be used, but writes can still be observed. To achieve
this, the node-chakra-core fork will add in appropriate tracking logic
in the AliasedBuffer's SetValue() method. Going forward, this class can
evolve to support more sophisticated mechanisms if necessary.
PR-URL: https://github.com/nodejs/node/pull/15077
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'node.gyp')
-rw-r--r-- | node.gyp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -228,6 +228,7 @@ 'src/util.cc', 'src/uv.cc', # headers to make for a more pleasant IDE experience + 'src/aliased_buffer.h', 'src/async-wrap.h', 'src/async-wrap-inl.h', 'src/base-object.h', @@ -246,6 +247,7 @@ 'src/node_constants.h', 'src/node_debug_options.h', 'src/node_http2.h', + 'src/node_http2_state.h', 'src/node_internals.h', 'src/node_javascript.h', 'src/node_mutex.h', @@ -650,6 +652,8 @@ 'sources': [ 'src/node_platform.cc', 'src/node_platform.h', + 'test/cctest/node_test_fixture.cc', + 'test/cctest/test_aliased_buffer.cc', 'test/cctest/test_base64.cc', 'test/cctest/test_environment.cc', 'test/cctest/test_util.cc', |