diff options
author | Mike Kaufman <mike.kaufman@microsoft.com> | 2017-08-25 12:45:00 -0700 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-09-13 17:44:24 +0200 |
commit | 35a526c1d4702d54c464510f448879f096a97321 (patch) | |
tree | d5147ecaf5e86bc429af38f01d994d4b2edd5fdf /node.gyp | |
parent | 2ac7b433b42dd44b319e1113e045dda8df20a4f8 (diff) | |
download | node-new-35a526c1d4702d54c464510f448879f096a97321.tar.gz |
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', |