Commit 690a837
deps: V8: cherry-pick 3d59a3c2c164
Original commit message:
Add option to report discarded allocations in sampling heap profiler
A couple of customers have asked about using devtools to get information
about temporary allocations, with the goal of reducing GC time and/or
peak memory usage. Currently, the sampling heap profiler reports only
objects which are still alive at the end of the profiling session. In
this change, I propose adding configuration options when starting the
sampling heap profiler so that it can optionally include information
about objects which were discarded by the GC before the end of the
profiling session. A user could run the sampling heap profiler in
several different modes depending on their goals:
1. To find memory leaks or determine which functions contribute most to
steady-state memory consumption, the current default mode is best.
2. To find functions which cause large temporary memory spikes or large
GC pauses, the user can request data about both live objects and
those collected by major GC.
3. To tune for minimal GC activity in latency-sensitive applications
like real-time audio processing, the user can request data about
every allocation, including objects collected by major or minor GC.
4. I'm not sure why anybody would want data about objects collected by
minor GC and not objects collected by major GC, but it's also a valid
flags combination.
Change-Id: If55d5965a1de04fed3ae640a02ca369723f64fdf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868522
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#83202}
Refs: v8/v8@3d59a3c
PR-URL: #44958
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>1 parent bab8b3a commit 690a837Copy full SHA for 690a837
File tree
Expand file treeCollapse file tree
10 files changed
+135
-9
lines changedOpen diff view settings
Filter options
- deps/v8
- include
- src
- heap
- inspector
- profiler
- test/inspector/heap-profiler
Expand file treeCollapse file tree
10 files changed
+135
-9
lines changedOpen diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
36 | 36 | |
37 | 37 | |
38 | 38 | |
39 | | - |
| 39 | + |
40 | 40 | |
41 | 41 | |
42 | 42 | |
|
Collapse file
deps/v8/include/js_protocol.pdl
Copy file name to clipboardExpand all lines: deps/v8/include/js_protocol.pdl+16Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
766 | 766 | |
767 | 767 | |
768 | 768 | |
| 769 | + |
| 770 | + |
| 771 | + |
| 772 | + |
| 773 | + |
| 774 | + |
| 775 | + |
| 776 | + |
| 777 | + |
| 778 | + |
| 779 | + |
| 780 | + |
| 781 | + |
| 782 | + |
| 783 | + |
| 784 | + |
769 | 785 | |
770 | 786 | |
771 | 787 | |
|
Collapse file
deps/v8/include/v8-profiler.h
Copy file name to clipboardExpand all lines: deps/v8/include/v8-profiler.h+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
903 | 903 | |
904 | 904 | |
905 | 905 | |
| 906 | + |
| 907 | + |
906 | 908 | |
907 | 909 | |
908 | 910 | |
| ||
1097 | 1099 | |
1098 | 1100 | |
1099 | 1101 | |
1100 | | - |
1101 | | - |
1102 | | - |
1103 | | - |
| 1102 | + |
| 1103 | + |
1104 | 1104 | |
1105 | 1105 | |
1106 | 1106 | |
|
Collapse file
+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1819 | 1819 | |
1820 | 1820 | |
1821 | 1821 | |
| 1822 | + |
| 1823 | + |
1822 | 1824 | |
1823 | 1825 | |
1824 | 1826 | |
|
Collapse file
+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1455 | 1455 | |
1456 | 1456 | |
1457 | 1457 | |
| 1458 | + |
| 1459 | + |
| 1460 | + |
| 1461 | + |
1458 | 1462 | |
1459 | 1463 | |
1460 | 1464 | |
| ||
2389 | 2393 | |
2390 | 2394 | |
2391 | 2395 | |
| 2396 | + |
| 2397 | + |
2392 | 2398 | |
2393 | 2399 | |
2394 | 2400 | |
|
Collapse file
deps/v8/src/inspector/v8-heap-profiler-agent-impl.cc
Copy file name to clipboardExpand all lines: deps/v8/src/inspector/v8-heap-profiler-agent-impl.cc+23-3Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
| 32 | + |
32 | 33 | |
33 | 34 | |
34 | 35 | |
| ||
208 | 209 | |
209 | 210 | |
210 | 211 | |
211 | | - |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
212 | 222 | |
213 | 223 | |
214 | 224 | |
| ||
387 | 397 | |
388 | 398 | |
389 | 399 | |
390 | | - |
| 400 | + |
| 401 | + |
| 402 | + |
391 | 403 | |
392 | 404 | |
393 | 405 | |
| ||
400 | 412 | |
401 | 413 | |
402 | 414 | |
| 415 | + |
| 416 | + |
| 417 | + |
| 418 | + |
| 419 | + |
| 420 | + |
| 421 | + |
| 422 | + |
403 | 423 | |
404 | 424 | |
405 | | - |
| 425 | + |
406 | 426 | |
407 | 427 | |
408 | 428 | |
|
Collapse file
deps/v8/src/inspector/v8-heap-profiler-agent-impl.h
Copy file name to clipboardExpand all lines: deps/v8/src/inspector/v8-heap-profiler-agent-impl.h+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
56 | 56 | |
57 | 57 | |
58 | 58 | |
59 | | - |
| 59 | + |
| 60 | + |
| 61 | + |
60 | 62 | |
61 | 63 | |
62 | 64 | |
|
Collapse file
deps/v8/src/profiler/sampling-heap-profiler.cc
Copy file name to clipboardExpand all lines: deps/v8/src/profiler/sampling-heap-profiler.cc+13Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
95 | 95 | |
96 | 96 | |
97 | 97 | |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
98 | 111 | |
99 | 112 | |
100 | 113 | |
|
Collapse file
deps/v8/test/inspector/heap-profiler/sampling-heap-profiler-flags-expected.txt
Copy file name to clipboard+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
Collapse file
deps/v8/test/inspector/heap-profiler/sampling-heap-profiler-flags.js
Copy file name to clipboard+61Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
0 commit comments