V8js
V8 JS Attributes
Describes V8 JS Engine Runtime related attributes.
Attributes:
| Key | Stability | Value Type | Description | Example Values |
|---|---|---|---|---|
v8js.gc.type | string | The type of garbage collection. | major; minor; incremental (see more) | |
v8js.heap.space.name | string | The name of the space type of heap memory. [1] | new_space; old_space; code_space (see more) | |
v8js.resource.type | string | The type of resource keeping the event loop active. | Immediate; TCPServerWrap; TCPWrap (see more) |
[1] v8js.heap.space.name: Value can be retrieved from value space_name of v8.getHeapSpaceStatistics().
The set of reported spaces depends on the V8 version the runtime embeds.
v8js.gc.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
incremental | Incremental (Incremental Marking). | |
major | Major (Mark Sweep Compact). | |
minor | Minor (Scavenge). | |
weakcb | Weak Callbacks (Process Weak Callbacks). |
v8js.heap.space.name has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
code_large_object_space | Large object space for code objects. | |
code_space | Code memory space. | |
large_object_space | Large object memory space. | |
map_space | Map memory space. [2] | |
new_large_object_space | Large object space for young-generation objects. | |
new_space | New memory space. | |
old_space | Old memory space. | |
read_only_space | Read-only memory space, holding immutable objects created at startup. | |
shared_large_object_space | Large object space for shared objects. | |
shared_space | Memory space for objects shared across isolates (e.g. shared strings and structs). | |
shared_trusted_large_object_space | Large object space for shared trusted objects. | |
shared_trusted_space | Shared variant of the trusted memory space. | |
trusted_large_object_space | Large object space for trusted objects. | |
trusted_space | Memory space for trusted objects kept outside the V8 sandbox (e.g. bytecode). |
[2]: Only reported by Node.js <= 19; V8 merged the map space into the old space in V8 11.x.
v8js.resource.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
Immediate | Active setImmediate callbacks. | |
TCPServerWrap | Active TCP Servers. | |
TCPWrap | Active TCP connections. | |
Timeout | Active setTimeout or setInterval timers. | |
TTYWrap | Active Terminal I/O (stdin/stdout). |
Feedback
Was this page helpful?
Thank you. Your feedback is appreciated!
Please let us know how we can improve this page. Your feedback is appreciated!