0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
nodejs/test/cctest
Joyee Cheung 92fa0fcdb7
src: name EmbededderGraph edges and use class names for nodes
This patch:

- Refactors the `MemoryRetainer` API so that the impementer no longer
  calls `TrackThis()` that sets the size of node on the top of the
  stack, which may be hard to understand. Instead now they implements
  `SelfSize()` to provide their self sizes. Also documents
  the API in the header.
- Refactors `MemoryTracker` so it calls `MemoryInfoName()` and
  `SelfSize()` of `MemoryRetainer` to retrieve info about them, and
  separate `node_names` and `edge_names` so the edges can be properly
  named with reference names and the nodes can be named with class
  names. (Previously the nodes are named with reference names while the
  edges are all indexed and appear as array elements).
- Adds `SET_MEMORY_INFO_NAME()`, `SET_SELF_SIZE()` and
  `SET_NO_MEMORY_INFO()` convenience macros
- Fixes a few `MemoryInfo` calls in some `MemoryRetainers` to track
  their references properly.
- Refactors the heapdump tests to check both node names and edge names,
  distinguishing between wrapped JS nodes (without prefixes)
  and embedder wrappers (prefixed with `Node / `).

PR-URL: https://github.com/nodejs/node/pull/23072
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-04 15:32:30 +02:00
..
node_test_fixture.cc test: use aliases for smart pointers in fixture 2018-06-27 05:19:56 +02:00
node_test_fixture.h src: add InitializeV8Platform function 2018-09-07 21:07:29 +02:00
test_aliased_buffer.cc
test_base64.cc
test_environment.cc src: refactor Environment::GetCurrent() usage 2018-09-17 17:20:27 +02:00
test_inspector_socket_server.cc inspector: split main thread interface from transport 2018-07-13 23:42:50 +02:00
test_inspector_socket.cc
test_node_postmortem_metadata.cc src: name EmbededderGraph edges and use class names for nodes 2018-10-04 15:32:30 +02:00
test_platform.cc
test_traced_value.cc trace_events: add traced_value.cc/traced_value.h 2018-07-12 10:32:26 -07:00
test_url.cc inspector: implemented V8InspectorClient::resourceNameToUrl 2018-09-14 08:32:08 -07:00
test_util.cc