add hooks to ASIO to allow building of dependency graphs in PHP
commite551d3918f8ac666ab8c0f8adaeb1a2e815a23d6
authorPhilippe Ajoux <pajoux@fb.com>
Fri, 26 Apr 2013 00:24:32 +0000 (25 17:24 -0700)
committerSara Golemon <sgolemon@fb.com>
Thu, 9 May 2013 18:33:20 +0000 (9 11:33 -0700)
tree2e09517895126a6e556544b12b717f31a9c6cb70
parent4fdec8b2a13a6129931df88579599f446a4f36fe
add hooks to ASIO to allow building of dependency graphs in PHP

In order to build a dependency graph of continuation execution and data-fetching in PHP-land, we need a few instrumentation points in the asio_ext HHVM extension. There are 4 additions required:
   1. Callback when a continuation finishes successfully.
   2. Callback when a continuation blocks on a wait_handle.
   3. Get array of WaitHandles a GenArrayWaitHandle is waiting on.
   4. Get WaitHandle that the SetResultToRefWaitHandle is waiting on.
I don't think this should really affect performance, as in the normal case, nothing has changed, but you never know... I'm also not sure who should be reviewing this, so I've just added @jan for now. If you could pile other people on, that would be cool.

sandcastle appears to be broken.
hphp/idl/asio.idl.json
hphp/runtime/ext/asio/asio_session.cpp
hphp/runtime/ext/asio/asio_session.h
hphp/runtime/ext/asio/continuation_wait_handle.cpp
hphp/runtime/ext/asio/gen_array_wait_handle.cpp
hphp/runtime/ext/asio/set_result_to_ref_wait_handle.cpp
hphp/runtime/ext/asio/wait_handle.cpp
hphp/runtime/ext/asio/waitable_wait_handle.cpp
hphp/runtime/ext/ext_asio.cpp
hphp/runtime/ext/ext_asio.h
hphp/system/class_map.cpp