Commit e33b9fa
src: fix GetCpuProfiler() deprecation warning
Replace `v8::Isolate::GetCpuProfiler()` with `v8::CpuProfiler::New()`
and cache the instance; creating and disposing an instance every loop
tick is too expensive.
Backport-PR-URL: #18959
PR-URL: #18534
Fixes: #18039
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>1 parent 484e06d commit e33b9faCopy full SHA for e33b9fa
Expand file treeCollapse file tree
2 files changed
+15
-3
lines changedOpen diff view settings
Collapse file
+11-3Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | | - |
4 | 3 | |
5 | 4 | |
6 | 5 | |
| ||
65 | 64 | |
66 | 65 | |
67 | 66 | |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
68 | 76 | |
69 | 77 | |
70 | 78 | |
| ||
150 | 158 | |
151 | 159 | |
152 | 160 | |
153 | | - |
| 161 | + |
154 | 162 | |
155 | 163 | |
156 | 164 | |
157 | 165 | |
158 | | - |
| 166 | + |
159 | 167 | |
160 | 168 | |
161 | 169 | |
|
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
33 | 33 | |
34 | 34 | |
35 | 35 | |
| 36 | + |
36 | 37 | |
37 | 38 | |
38 | 39 | |
| ||
338 | 339 | |
339 | 340 | |
340 | 341 | |
| 342 | + |
| 343 | + |
341 | 344 | |
342 | 345 | |
343 | 346 | |
| ||
353 | 356 | |
354 | 357 | |
355 | 358 | |
| 359 | + |
356 | 360 | |
357 | 361 | |
358 | 362 | |
|
0 commit comments