From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../docs/user/memory/basic_operations/index.rst | 95 +++++++++++++++++++++ .../memory/basic_operations/memory-1-small.png | Bin 0 -> 12408 bytes .../memory/basic_operations/memory-2-small.png | Bin 0 -> 20870 bytes .../memory/basic_operations/memory-3-small.png | Bin 0 -> 20962 bytes .../memory/basic_operations/memory-4-small.png | Bin 0 -> 20940 bytes .../memory/basic_operations/memory-5-small.png | Bin 0 -> 21140 bytes .../memory/basic_operations/memory-6-small.png | Bin 0 -> 20922 bytes .../memory/basic_operations/memory-7-small.png | Bin 0 -> 20555 bytes 8 files changed, 95 insertions(+) create mode 100644 devtools/docs/user/memory/basic_operations/index.rst create mode 100644 devtools/docs/user/memory/basic_operations/memory-1-small.png create mode 100644 devtools/docs/user/memory/basic_operations/memory-2-small.png create mode 100644 devtools/docs/user/memory/basic_operations/memory-3-small.png create mode 100644 devtools/docs/user/memory/basic_operations/memory-4-small.png create mode 100644 devtools/docs/user/memory/basic_operations/memory-5-small.png create mode 100644 devtools/docs/user/memory/basic_operations/memory-6-small.png create mode 100644 devtools/docs/user/memory/basic_operations/memory-7-small.png (limited to 'devtools/docs/user/memory/basic_operations') diff --git a/devtools/docs/user/memory/basic_operations/index.rst b/devtools/docs/user/memory/basic_operations/index.rst new file mode 100644 index 0000000000..c8149ef344 --- /dev/null +++ b/devtools/docs/user/memory/basic_operations/index.rst @@ -0,0 +1,95 @@ +================ +Basic operations +================ + + +.. _memory-basic-operations-opening-the-memory-tool: + +Opening the Memory tool +*********************** + +Before Firefox 50, the Memory tool is not enabled by default. To enable it, open the developer tool settings, and check the "Memory" box under "Default Firefox Developer Tools". + +From Firefox 50 onwards, the Memory tool is enabled by default. + + +.. _memory-basic-operations-taking-a-heap-snapshot: + +Taking a heap snapshot +********************** + +To take a snapshot of the heap, click the "Take snapshot" button, or the camera icon on the left: + +.. image:: memory-1-small.png + :class: center + +The snapshot will occupy the large pane on the right-hand side. On the left, you'll see an entry for the new snapshot, including its timestamp, size, and controls to save or clear this snapshot: + +.. image:: memory-2-small.png + :class: center + + +.. _memory-basic-operations-clearing-a-snapshot: + +Clearing a snapshot +******************* + +To remove a snapshot, click the "X" icon: + +.. image:: memory-3-small.png + :class: center + + +.. _memory-basic-operations-saving-and-loading-snapshots: + +Saving and loading snapshots +**************************** + +If you close the Memory tool, all unsaved snapshots will be discarded. To save a snapshot click "Save": + +.. image:: memory-4-small.png + :class: center + +You'll be prompted for a name and location, and the file will be saved with an ``.fxsnapshot`` extension. + +To load a snapshot from an existing ``.fxsnapshot`` file, click the import button, which looks like a rectangle with an arrow rising from it (before Firefox 49, this button was labeled with the text "Import..."): + +.. image:: memory-5-small.png + :class: center + +You'll be prompted to find a snapshot file on disk. + + +.. _memory-basic-operations-comparing-snapshots: + +Comparing snapshots +******************* + +Starting in Firefox 45, you can diff two heap snapshots. The diff shows you where memory was allocated or freed between the two snapshots. + +To create a diff, click the button that looks like a Venn diagram next to the camera icon (before Firefox 47, this looked like a "+/-" icon): + +.. image:: memory-6-small.png + :class: center + +You'll be prompted to select the snapshot to use as a baseline, then the snapshot to compare. The tool then shows you the differences between the two snapshots: + +.. raw:: html + + +
+
+ +.. note:: + When you're looking at a comparison, you can't use the Dominators view or the Tree Map view. + + +.. _memory-basic-operations-recording-call-stacks: + +Recording call stacks +********************* + +The Memory tool can tell you exactly where in your code you are allocating memory. However, recording this information has a run-time cost, so you must ask the tool to record memory calls *before* the memory is allocated, if you want to see memory call sites in the snapshot. To do this, check "Record call stacks" (before Firefox 49 this was labeled "Record allocation stacks"): + +.. image:: memory-7-small.png + :class: center diff --git a/devtools/docs/user/memory/basic_operations/memory-1-small.png b/devtools/docs/user/memory/basic_operations/memory-1-small.png new file mode 100644 index 0000000000..a2076330b8 Binary files /dev/null and b/devtools/docs/user/memory/basic_operations/memory-1-small.png differ diff --git a/devtools/docs/user/memory/basic_operations/memory-2-small.png b/devtools/docs/user/memory/basic_operations/memory-2-small.png new file mode 100644 index 0000000000..569b0d9d66 Binary files /dev/null and b/devtools/docs/user/memory/basic_operations/memory-2-small.png differ diff --git a/devtools/docs/user/memory/basic_operations/memory-3-small.png b/devtools/docs/user/memory/basic_operations/memory-3-small.png new file mode 100644 index 0000000000..5d77bd7f60 Binary files /dev/null and b/devtools/docs/user/memory/basic_operations/memory-3-small.png differ diff --git a/devtools/docs/user/memory/basic_operations/memory-4-small.png b/devtools/docs/user/memory/basic_operations/memory-4-small.png new file mode 100644 index 0000000000..9a1e18da6f Binary files /dev/null and b/devtools/docs/user/memory/basic_operations/memory-4-small.png differ diff --git a/devtools/docs/user/memory/basic_operations/memory-5-small.png b/devtools/docs/user/memory/basic_operations/memory-5-small.png new file mode 100644 index 0000000000..e3277186dc Binary files /dev/null and b/devtools/docs/user/memory/basic_operations/memory-5-small.png differ diff --git a/devtools/docs/user/memory/basic_operations/memory-6-small.png b/devtools/docs/user/memory/basic_operations/memory-6-small.png new file mode 100644 index 0000000000..da69b93e51 Binary files /dev/null and b/devtools/docs/user/memory/basic_operations/memory-6-small.png differ diff --git a/devtools/docs/user/memory/basic_operations/memory-7-small.png b/devtools/docs/user/memory/basic_operations/memory-7-small.png new file mode 100644 index 0000000000..844565a8b4 Binary files /dev/null and b/devtools/docs/user/memory/basic_operations/memory-7-small.png differ -- cgit v1.2.3