Commit 966546c
process: simplify the setup of async hooks trace events
- Remove `trace_category_state` from `Environment` - since this is
only accessed in the bootstrap process and later in the
trace category update handler, we could just pass the initial
values into JS land via the trace_events binding, and pass
the dynamic values directly to the handler later, instead of
accessing them out-of-band via the AliasedBuffer.
- Instead of creating the hooks directly in
`trace_events_async_hooks.js`, export the hook factory and
create the hooks in trace category state toggle.
PR-URL: #26062
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 5cc2574 commit 966546cCopy full SHA for 966546c
File tree
Expand file treeCollapse file tree
6 files changed
+35
-38
lines changedOpen diff view settings
Filter options
- lib/internal
- bootstrap
- src
Expand file treeCollapse file tree
6 files changed
+35
-38
lines changedOpen diff view settings
Collapse file
lib/internal/bootstrap/pre_execution.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/pre_execution.js+18-20Lines changed: 18 additions & 20 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
| 4 | + |
| 5 | + |
| 6 | + |
4 | 7 | |
5 | 8 | |
6 | 9 | |
| ||
27 | 30 | |
28 | 31 | |
29 | 32 | |
30 | | - |
| 33 | + |
31 | 34 | |
32 | 35 | |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | 36 | |
52 | | - |
| 37 | + |
53 | 38 | |
54 | 39 | |
55 | 40 | |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
56 | 54 | |
57 | 55 | |
58 | 56 | |
|
Collapse file
lib/internal/trace_events_async_hooks.js
Copy file name to clipboardExpand all lines: lib/internal/trace_events_async_hooks.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
83 | 83 | |
84 | 84 | |
85 | 85 | |
86 | | - |
| 86 | + |
Collapse file
-5Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
455 | 455 | |
456 | 456 | |
457 | 457 | |
458 | | - |
459 | | - |
460 | | - |
461 | | - |
462 | | - |
463 | 458 | |
464 | 459 | |
465 | 460 | |
|
Collapse file
+6-6Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
| 24 | + |
24 | 25 | |
25 | 26 | |
26 | 27 | |
| ||
152 | 153 | |
153 | 154 | |
154 | 155 | |
155 | | - |
156 | | - |
157 | | - |
| 156 | + |
| 157 | + |
158 | 158 | |
159 | 159 | |
160 | 160 | |
| ||
163 | 163 | |
164 | 164 | |
165 | 165 | |
166 | | - |
167 | | - |
| 166 | + |
| 167 | + |
| 168 | + |
168 | 169 | |
169 | 170 | |
170 | 171 | |
| ||
183 | 184 | |
184 | 185 | |
185 | 186 | |
186 | | - |
187 | 187 | |
188 | 188 | |
189 | 189 | |
|
Collapse file
-3Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
705 | 705 | |
706 | 706 | |
707 | 707 | |
708 | | - |
709 | 708 | |
710 | 709 | |
711 | 710 | |
| ||
1026 | 1025 | |
1027 | 1026 | |
1028 | 1027 | |
1029 | | - |
1030 | | - |
1031 | 1028 | |
1032 | 1029 | |
1033 | 1030 | |
|
Collapse file
+10-3Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
| 4 | + |
4 | 5 | |
5 | 6 | |
6 | 7 | |
| ||
10 | 11 | |
11 | 12 | |
12 | 13 | |
| 14 | + |
13 | 15 | |
14 | 16 | |
15 | 17 | |
| ||
148 | 150 | |
149 | 151 | |
150 | 152 | |
151 | | - |
152 | | - |
153 | | - |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
154 | 161 | |
155 | 162 | |
156 | 163 | |
|
0 commit comments