Commit 3a4f387
process: support hrtime in the snapshot
Put the hrtime backing store in the process methods binding data
so that it can be integrated into the snapshot builder. For
now we simply discard the contents of the hrtime buffer during
serialization and create new buffers upon deserialization because
the contents are only useful in a synchronous call.
This also moves the helper function for creating V8 FastAPI methods
into `Environment::SetFastMethod()` for code reuse. The v8::CFunction
need to be created before the Environment is created so that we
have the CTypeInfo address available for external reference
registration.
PR-URL: #40649
Refs: #35711
Refs: #37476
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 88b57bc commit 3a4f387Copy full SHA for 3a4f387
File tree
Expand file treeCollapse file tree
10 files changed
+253
-179
lines changedOpen diff view settings
Filter options
- lib/internal
- bootstrap
- process
- src
Expand file treeCollapse file tree
10 files changed
+253
-179
lines changedOpen diff view settings
Collapse file
lib/internal/bootstrap/node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
162 | 162 | |
163 | 163 | |
164 | 164 | |
| 165 | + |
| 166 | + |
| 167 | + |
165 | 168 | |
166 | 169 | |
167 | 170 | |
|
Collapse file
lib/internal/bootstrap/pre_execution.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/pre_execution.js+1-10Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
82 | 82 | |
83 | 83 | |
84 | 84 | |
85 | | - |
86 | | - |
87 | | - |
88 | | - |
89 | | - |
90 | | - |
91 | | - |
92 | | - |
93 | | - |
94 | | - |
| 85 | + |
95 | 86 | |
96 | 87 | |
97 | 88 | |
|
Collapse file
lib/internal/process/per_thread.js
Copy file name to clipboardExpand all lines: lib/internal/process/per_thread.js+34-33Lines changed: 34 additions & 33 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
54 | 54 | |
55 | 55 | |
56 | 56 | |
57 | | - |
58 | | - |
59 | | - |
60 | | - |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
61 | 61 | |
| 62 | + |
62 | 63 | |
63 | 64 | |
64 | 65 | |
65 | | - |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
66 | 71 | |
67 | | - |
68 | | - |
| 72 | + |
| 73 | + |
69 | 74 | |
70 | | - |
71 | | - |
72 | | - |
73 | | - |
74 | | - |
| 75 | + |
| 76 | + |
75 | 77 | |
76 | | - |
77 | | - |
78 | | - |
79 | | - |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
80 | 82 | |
81 | 83 | |
82 | | - |
83 | | - |
84 | | - |
85 | | - |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
86 | 88 | |
87 | 89 | |
88 | | - |
89 | | - |
90 | | - |
91 | | - |
92 | | - |
93 | | - |
94 | | - |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
95 | 95 | |
96 | | - |
97 | | - |
98 | | - |
99 | | - |
| 96 | + |
| 97 | + |
| 98 | + |
100 | 99 | |
101 | 100 | |
102 | 101 | |
| ||
396 | 395 | |
397 | 396 | |
398 | 397 | |
399 | | - |
400 | 398 | |
401 | 399 | |
402 | | - |
| 400 | + |
| 401 | + |
| 402 | + |
| 403 | + |
403 | 404 | |
Collapse file
+36-9Lines changed: 36 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
| 32 | + |
| 33 | + |
32 | 34 | |
33 | 35 | |
| 36 | + |
34 | 37 | |
35 | | - |
36 | | - |
37 | 38 | |
38 | 39 | |
39 | 40 | |
| ||
1036 | 1037 | |
1037 | 1038 | |
1038 | 1039 | |
1039 | | - |
1040 | | - |
1041 | | - |
1042 | | - |
1043 | | - |
1044 | | - |
1045 | | - |
| 1040 | + |
| 1041 | + |
| 1042 | + |
| 1043 | + |
| 1044 | + |
| 1045 | + |
| 1046 | + |
| 1047 | + |
| 1048 | + |
| 1049 | + |
| 1050 | + |
| 1051 | + |
| 1052 | + |
| 1053 | + |
1046 | 1054 | |
1047 | 1055 | |
1048 | 1056 | |
| ||
1063 | 1071 | |
1064 | 1072 | |
1065 | 1073 | |
| 1074 | + |
| 1075 | + |
| 1076 | + |
| 1077 | + |
| 1078 | + |
| 1079 | + |
| 1080 | + |
| 1081 | + |
| 1082 | + |
| 1083 | + |
| 1084 | + |
| 1085 | + |
| 1086 | + |
| 1087 | + |
| 1088 | + |
| 1089 | + |
| 1090 | + |
| 1091 | + |
| 1092 | + |
1066 | 1093 | |
1067 | 1094 | |
1068 | 1095 | |
|
Collapse file
+12-8Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
34 | 34 | |
35 | 35 | |
36 | 36 | |
| 37 | + |
37 | 38 | |
38 | 39 | |
39 | 40 | |
| ||
1239 | 1240 | |
1240 | 1241 | |
1241 | 1242 | |
1242 | | - |
1243 | | - |
1244 | | - |
1245 | | - |
1246 | | - |
1247 | | - |
1248 | | - |
1249 | | - |
| 1243 | + |
| 1244 | + |
| 1245 | + |
| 1246 | + |
| 1247 | + |
| 1248 | + |
1250 | 1249 | |
1251 | 1250 | |
1252 | 1251 | |
1253 | 1252 | |
1254 | 1253 | |
1255 | 1254 | |
| 1255 | + |
| 1256 | + |
| 1257 | + |
| 1258 | + |
| 1259 | + |
1256 | 1260 | |
1257 | 1261 | |
1258 | 1262 | |
|
Collapse file
src/node_external_reference.h
Copy file name to clipboardExpand all lines: src/node_external_reference.h+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
5 | 5 | |
6 | 6 | |
7 | 7 | |
| 8 | + |
8 | 9 | |
9 | 10 | |
10 | 11 | |
11 | 12 | |
| 13 | + |
| 14 | + |
12 | 15 | |
13 | 16 | |
14 | 17 | |
15 | 18 | |
16 | 19 | |
17 | 20 | |
18 | 21 | |
| 22 | + |
| 23 | + |
19 | 24 | |
20 | 25 | |
21 | 26 | |
|
Collapse file
+54Lines changed: 54 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
| 7 | + |
6 | 8 | |
7 | 9 | |
8 | 10 | |
9 | 11 | |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
10 | 16 | |
11 | 17 | |
12 | 18 | |
| ||
38 | 44 | |
39 | 45 | |
40 | 46 | |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
41 | 95 | |
42 | 96 | |
43 | 97 | |
0 commit comments