From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- toolkit/components/aboutmemory/tests/chrome.toml | 42 ++ .../aboutmemory/tests/crash-dump-diff1.json | 18 + .../aboutmemory/tests/crash-dump-diff2.json | 18 + .../aboutmemory/tests/crash-dump-good.json | 42 ++ .../components/aboutmemory/tests/fiss-diff1.json | 59 ++ .../components/aboutmemory/tests/fiss-diff2.json | 59 ++ .../aboutmemory/tests/memory-reports-bad.json | 3 + .../aboutmemory/tests/memory-reports-diff1.json | 272 ++++++++++ .../aboutmemory/tests/memory-reports-diff2.json | 265 +++++++++ .../aboutmemory/tests/memory-reports-good.json | 146 +++++ toolkit/components/aboutmemory/tests/remote.xhtml | 12 + .../aboutmemory/tests/test_aboutmemory.xhtml | 599 +++++++++++++++++++++ .../aboutmemory/tests/test_aboutmemory2.xhtml | 420 +++++++++++++++ .../aboutmemory/tests/test_aboutmemory3.xhtml | 558 +++++++++++++++++++ .../aboutmemory/tests/test_aboutmemory4.xhtml | 176 ++++++ .../aboutmemory/tests/test_aboutmemory5.xhtml | 169 ++++++ .../aboutmemory/tests/test_aboutmemory6.xhtml | 85 +++ .../aboutmemory/tests/test_aboutmemory7.xhtml | 215 ++++++++ .../tests/test_dumpGCAndCCLogsToFile.xhtml | 90 ++++ .../aboutmemory/tests/test_memoryReporters.xhtml | 433 +++++++++++++++ .../aboutmemory/tests/test_memoryReporters2.xhtml | 116 ++++ .../tests/test_sqliteMultiReporter.xhtml | 46 ++ .../aboutmemory/tests/xpcshell/test_gpuprocess.js | 39 ++ .../aboutmemory/tests/xpcshell/xpcshell.toml | 5 + 24 files changed, 3887 insertions(+) create mode 100644 toolkit/components/aboutmemory/tests/chrome.toml create mode 100644 toolkit/components/aboutmemory/tests/crash-dump-diff1.json create mode 100644 toolkit/components/aboutmemory/tests/crash-dump-diff2.json create mode 100644 toolkit/components/aboutmemory/tests/crash-dump-good.json create mode 100644 toolkit/components/aboutmemory/tests/fiss-diff1.json create mode 100644 toolkit/components/aboutmemory/tests/fiss-diff2.json create mode 100644 toolkit/components/aboutmemory/tests/memory-reports-bad.json create mode 100644 toolkit/components/aboutmemory/tests/memory-reports-diff1.json create mode 100644 toolkit/components/aboutmemory/tests/memory-reports-diff2.json create mode 100644 toolkit/components/aboutmemory/tests/memory-reports-good.json create mode 100644 toolkit/components/aboutmemory/tests/remote.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory2.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory3.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory4.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory6.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_aboutmemory7.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_memoryReporters.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_memoryReporters2.xhtml create mode 100644 toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xhtml create mode 100644 toolkit/components/aboutmemory/tests/xpcshell/test_gpuprocess.js create mode 100644 toolkit/components/aboutmemory/tests/xpcshell/xpcshell.toml (limited to 'toolkit/components/aboutmemory/tests') diff --git a/toolkit/components/aboutmemory/tests/chrome.toml b/toolkit/components/aboutmemory/tests/chrome.toml new file mode 100644 index 0000000000..7bc72d7730 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/chrome.toml @@ -0,0 +1,42 @@ +[DEFAULT] +skip-if = ["os == 'android'"] +support-files = [ + "crash-dump-diff1.json", + "crash-dump-diff2.json", + "crash-dump-good.json", + "fiss-diff1.json", + "fiss-diff2.json", + "memory-reports-bad.json", + "memory-reports-diff1.json", + "memory-reports-diff2.json", + "memory-reports-good.json", + "remote.xhtml", +] + +["test_aboutmemory.xhtml"] + +["test_aboutmemory2.xhtml"] + +["test_aboutmemory3.xhtml"] + +["test_aboutmemory4.xhtml"] +skip-if = ["os == 'linux' && bits == 64 && debug"] # Bug 1683002 + +["test_aboutmemory5.xhtml"] +skip-if = [ + "asan", # Bug 1116230 + "os == 'linux' && bits == 64 && debug", # Bug 1683002 +] + +["test_aboutmemory6.xhtml"] + +["test_aboutmemory7.xhtml"] + +["test_dumpGCAndCCLogsToFile.xhtml"] +skip-if = ["(verify && debug && (os == 'mac'))"] + +["test_memoryReporters.xhtml"] + +["test_memoryReporters2.xhtml"] + +["test_sqliteMultiReporter.xhtml"] diff --git a/toolkit/components/aboutmemory/tests/crash-dump-diff1.json b/toolkit/components/aboutmemory/tests/crash-dump-diff1.json new file mode 100644 index 0000000000..2b9c6921a8 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/crash-dump-diff1.json @@ -0,0 +1,18 @@ +{ + "foo": 1, + "blah": 2, + "memory_report": { + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + { + "process": "Main Process (pid NNN)", + "path": "heap-allocated", + "kind": 2, + "units": 0, + "amount": 262144000, + "description": "Heap allocated." + } + ] + } +} diff --git a/toolkit/components/aboutmemory/tests/crash-dump-diff2.json b/toolkit/components/aboutmemory/tests/crash-dump-diff2.json new file mode 100644 index 0000000000..15ddf2831c --- /dev/null +++ b/toolkit/components/aboutmemory/tests/crash-dump-diff2.json @@ -0,0 +1,18 @@ +{ + "foo": 3, + "blah": 4, + "memory_report": { + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + { + "process": "Main Process (pid NNN)", + "path": "heap-allocated", + "kind": 2, + "units": 0, + "amount": 262144001, + "description": "Heap allocated." + } + ] + } +} diff --git a/toolkit/components/aboutmemory/tests/crash-dump-good.json b/toolkit/components/aboutmemory/tests/crash-dump-good.json new file mode 100644 index 0000000000..7865369dc3 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/crash-dump-good.json @@ -0,0 +1,42 @@ +{ + "foo": 1, + "blah": 2, + "memory_report": { + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + { + "process": "Main Process (pid NNN)", + "path": "heap-allocated", + "kind": 2, + "units": 0, + "amount": 262144000, + "description": "Heap allocated." + }, + { + "process": "Main Process (pid NNN)", + "path": "other/b", + "kind": 2, + "units": 0, + "amount": 104857, + "description": "Other b." + }, + { + "process": "Main Process (pid NNN)", + "path": "other/a", + "kind": 2, + "units": 0, + "amount": 209715, + "description": "Other a." + }, + { + "process": "Main Process (pid NNN)", + "path": "explicit/a/b", + "kind": 1, + "units": 0, + "amount": 52428800, + "description": "A b." + } + ] + } +} diff --git a/toolkit/components/aboutmemory/tests/fiss-diff1.json b/toolkit/components/aboutmemory/tests/fiss-diff1.json new file mode 100644 index 0000000000..abd06bb508 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/fiss-diff1.json @@ -0,0 +1,59 @@ +{ + "foo": 1, + "blah": 2, + "memory_report": { + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + { + "process": "P (pid 12345)", + "path": "explicit/foobar", + "kind": 1, + "units": 0, + "amount": 100, + "description": "Desc." + }, + { + "process": "P (pid 12345)", + "path": "explicit/zero1", + "kind": 1, + "units": 0, + "amount": 0, + "description": "Desc." + }, + { + "process": "P (pid 12345)", + "path": "heap-allocated", + "kind": 2, + "units": 0, + "amount": 10000000, + "description": "Heap allocated." + }, + + { + "process": "web (pid 12345)", + "path": "explicit/a/b", + "kind": 1, + "units": 0, + "amount": 2000000, + "description": "Desc." + }, + { + "process": "web (pid 12345)", + "path": "explicit/a/c/d", + "kind": 1, + "units": 0, + "amount": 2000000, + "description": "Desc." + }, + { + "process": "web (pid 12345)", + "path": "heap-allocated", + "kind": 2, + "units": 0, + "amount": 10000000, + "description": "Heap allocated." + } + ] + } +} diff --git a/toolkit/components/aboutmemory/tests/fiss-diff2.json b/toolkit/components/aboutmemory/tests/fiss-diff2.json new file mode 100644 index 0000000000..286d2dd8ec --- /dev/null +++ b/toolkit/components/aboutmemory/tests/fiss-diff2.json @@ -0,0 +1,59 @@ +{ + "foo": 1, + "blah": 2, + "memory_report": { + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + { + "process": "P (pid 12345)", + "path": "explicit/foobar", + "kind": 1, + "units": 0, + "amount": 400, + "description": "Desc." + }, + { + "process": "P (pid 12345)", + "path": "explicit/zero1", + "kind": 1, + "units": 0, + "amount": 0, + "description": "Desc." + }, + { + "process": "P (pid 12345)", + "path": "heap-allocated", + "kind": 2, + "units": 0, + "amount": 13000000, + "description": "Heap allocated." + }, + + { + "process": "webIsolated=https://example.com (pid 12345)", + "path": "explicit/a/b", + "kind": 1, + "units": 0, + "amount": 2000000, + "description": "Desc." + }, + { + "process": "webIsolated=https://example.com (pid 12345)", + "path": "explicit/a/c/d", + "kind": 1, + "units": 0, + "amount": 3000000, + "description": "Desc." + }, + { + "process": "webIsolated=https://example.com (pid 12345)", + "path": "heap-allocated", + "kind": 2, + "units": 0, + "amount": 12000000, + "description": "Heap allocated." + } + ] + } +} diff --git a/toolkit/components/aboutmemory/tests/memory-reports-bad.json b/toolkit/components/aboutmemory/tests/memory-reports-bad.json new file mode 100644 index 0000000000..61a2092b1b --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-bad.json @@ -0,0 +1,3 @@ +{ + "version": 1 +} diff --git a/toolkit/components/aboutmemory/tests/memory-reports-diff1.json b/toolkit/components/aboutmemory/tests/memory-reports-diff1.json new file mode 100644 index 0000000000..bdc0eda14b --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-diff1.json @@ -0,0 +1,272 @@ +{ + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + { + "process": "P", + "path": "explicit/xpcom/category-manager", + "kind": 1, + "units": 0, + "amount": 56848, + "description": "Desc." + }, + { + "process": "P", + "path": "explicit/storage/prefixset/goog-phish-shavar", + "kind": 1, + "units": 0, + "amount": 680000, + "description": "Desc." + }, + + { + "process": "P", + "path": "explicit/spell-check", + "kind": 1, + "units": 0, + "amount": 4, + "description": "Desc." + }, + { + "process": "P", + "path": "explicit/spell-check", + "kind": 1, + "units": 0, + "amount": 5, + "description": "Desc." + }, + + { + "process": "P", + "path": "page-faults-soft", + "kind": 2, + "units": 2, + "amount": 61013, + "description": "Desc." + }, + + { + "process": "P", + "path": "foobar", + "kind": 2, + "units": 0, + "amount": 100, + "description": "Desc." + }, + { + "process": "P", + "path": "zero1", + "kind": 2, + "units": 0, + "amount": 0, + "description": "Desc." + }, + + { + "process": "P", + "path": "a/b", + "kind": 2, + "units": 0, + "amount": 1000000, + "description": "Desc." + }, + { + "process": "P", + "path": "a/c/d", + "kind": 2, + "units": 0, + "amount": 2000000, + "description": "Desc." + }, + { + "process": "P", + "path": "a/c/e", + "kind": 2, + "units": 0, + "amount": 2000000, + "description": "Desc." + }, + { + "process": "P", + "path": "a/c/f", + "kind": 2, + "units": 0, + "amount": 3000000, + "description": "Desc." + }, + { + "process": "P", + "path": "a/c/g", + "kind": 2, + "units": 0, + "amount": 3000000, + "description": "Desc." + }, + { + "process": "P", + "path": "a/h", + "kind": 2, + "units": 0, + "amount": 1000, + "description": "Desc." + }, + + { + "process": "P2 (pid 22)", + "path": "p1 (pid 123)", + "kind": 2, + "units": 0, + "amount": 33, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p2 (blah, pid=123)", + "kind": 2, + "units": 0, + "amount": 33, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p3/zone(0x1234)/p3", + "kind": 2, + "units": 0, + "amount": 33, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p4/js-zone(0x1234)/p4", + "kind": 2, + "units": 0, + "amount": 33, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p5/worker(foo.com, 0x1234)/p5", + "kind": 2, + "units": 0, + "amount": 33, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "explicit/window-objects/top(bar.com, id=123)/...", + "kind": 0, + "units": 0, + "amount": 33, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p6/z-moz-nullprincipal:{85e250f3-57ae-46c4-a11e-4176dd39d9c5}/p6", + "kind": 2, + "units": 0, + "amount": 33, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p7/js-main-runtime-compartments/system/jar:file:\\\\\\temp_xyz\\firefox\\omni.ja!/p7", + "kind": 2, + "units": 0, + "amount": 33, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "explicit/js-non-window/runtime/script-sources/source(scripts=1011, )/misc", + "kind": 2, + "units": 0, + "amount": 33, + "description": "Desc." + }, + + { + "process": "P3", + "path": "p3", + "kind": 2, + "units": 0, + "amount": 55, + "description": "Desc." + }, + + { + "process": "P5", + "path": "p5", + "kind": 2, + "units": 0, + "amount": 0, + "description": "Desc." + }, + + { + "process": "P7", + "path": "p7", + "kind": 2, + "units": 0, + "amount": 5, + "description": "Desc." + }, + + { + "process": "P8", + "path": "p8/a/b/c/d", + "kind": 2, + "units": 0, + "amount": 3, + "description": "Desc." + }, + { + "process": "P8", + "path": "p8/a/b/c/e", + "kind": 2, + "units": 0, + "amount": 4, + "description": "Desc." + }, + { + "process": "P8", + "path": "p8/a/b/f", + "kind": 2, + "units": 0, + "amount": 5, + "description": "Desc." + }, + { + "process": "P8", + "path": "p8/a/g/h", + "kind": 2, + "units": 0, + "amount": 6, + "description": "Desc." + }, + { + "process": "P8", + "path": "p8/a/g/i", + "kind": 2, + "units": 0, + "amount": 7, + "description": "Desc." + }, + + { + "process": "P9", + "path": "explicit/threads/stacks/DNS Resolver #1 (tid=11)", + "kind": 0, + "units": 0, + "amount": 2000, + "description": "Desc." + }, + { + "process": "P9", + "path": "explicit/threads/stacks/DNS Resolver #2 (tid=22)", + "kind": 0, + "units": 0, + "amount": 4000, + "description": "Desc." + } + ] +} diff --git a/toolkit/components/aboutmemory/tests/memory-reports-diff2.json b/toolkit/components/aboutmemory/tests/memory-reports-diff2.json new file mode 100644 index 0000000000..d6cd988988 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-diff2.json @@ -0,0 +1,265 @@ +{ + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + { + "process": "P", + "path": "explicit/xpcom/category-manager", + "kind": 1, + "units": 0, + "amount": 56849, + "description": "Desc." + }, + { + "process": "P", + "path": "explicit/storage/prefixset/goog-phish-shavar", + "kind": 1, + "units": 0, + "amount": 670000, + "description": "Desc." + }, + + { + "process": "P", + "path": "explicit/spell-check", + "kind": 1, + "units": 0, + "amount": 3, + "description": "Desc." + }, + + { + "process": "P", + "path": "page-faults-soft", + "kind": 2, + "units": 2, + "amount": 61013, + "description": "Desc." + }, + + { + "process": "P", + "path": "canvas-2d-pixel-bytes", + "kind": 2, + "units": 0, + "amount": 1000, + "description": "Desc." + }, + { + "process": "P", + "path": "canvas-2d-pixel-bytes", + "kind": 2, + "units": 0, + "amount": 2000, + "description": "Desc." + }, + + { + "process": "P", + "path": "foobaz", + "kind": 2, + "units": 0, + "amount": 0, + "description": "Desc." + }, + + { + "process": "P", + "path": "a/b", + "kind": 2, + "units": 0, + "amount": 2000000, + "description": "Desc." + }, + { + "process": "P", + "path": "a/c/d", + "kind": 2, + "units": 0, + "amount": 2998000, + "description": "Desc." + }, + { + "process": "P", + "path": "a/c/e", + "kind": 2, + "units": 0, + "amount": 1001000, + "description": "Desc." + }, + { + "process": "P", + "path": "a/c/f", + "kind": 2, + "units": 0, + "amount": 3001000, + "description": "Desc." + }, + { + "process": "P", + "path": "a/c/g", + "kind": 2, + "units": 0, + "amount": 3001000, + "description": "Desc." + }, + { + "process": "P", + "path": "a/h", + "kind": 2, + "units": 0, + "amount": 2000, + "description": "Desc." + }, + + { + "process": "P2 (pid 22)", + "path": "p1 (pid 456)", + "kind": 2, + "units": 0, + "amount": 44, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p2 (blah, pid=456)", + "kind": 2, + "units": 0, + "amount": 44, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p3/zone(0x5678)/p3", + "kind": 2, + "units": 0, + "amount": 44, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p4/js-zone(0x5678)/p4", + "kind": 2, + "units": 0, + "amount": 44, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p5/worker(foo.com, 0x5678)/p5", + "kind": 2, + "units": 0, + "amount": 44, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "explicit/window-objects/top(bar.com, id=456)/...", + "kind": 0, + "units": 0, + "amount": 44, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p6/z-moz-nullprincipal:{161effaa-c1f7-4010-a08e-e7c9aea01aed}/p6", + "kind": 2, + "units": 0, + "amount": 44, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "p7/js-main-runtime-compartments/system/jar:file:\\\\\\temp_abc\\firefox\\omni.ja!/p7", + "kind": 2, + "units": 0, + "amount": 44, + "description": "Desc." + }, + { + "process": "P2 (pid 22)", + "path": "explicit/js-non-window/runtime/script-sources/source(scripts=1, )/misc", + "kind": 2, + "units": 0, + "amount": 33, + "description": "Desc." + }, + + { + "process": "P4", + "path": "p4", + "kind": 2, + "units": 0, + "amount": 66, + "description": "Desc." + }, + + { + "process": "P6", + "path": "p6", + "kind": 2, + "units": 0, + "amount": 0, + "description": "Desc." + }, + + { + "process": "P7", + "path": "p7/b", + "kind": 2, + "units": 0, + "amount": 3, + "description": "Desc." + }, + { + "process": "P7", + "path": "p7/c", + "kind": 2, + "units": 0, + "amount": 4, + "description": "Desc." + }, + + { + "process": "P8", + "path": "p8/a/b", + "kind": 2, + "units": 0, + "amount": 1, + "description": "Desc." + }, + { + "process": "P8", + "path": "p8/a/g", + "kind": 2, + "units": 0, + "amount": 2, + "description": "Desc." + }, + + { + "process": "P9", + "path": "explicit/threads/stacks/DNS Resolver #1 (tid=33)", + "kind": 0, + "units": 0, + "amount": 2000, + "description": "Desc." + }, + { + "process": "P9", + "path": "explicit/threads/stacks/DNS Resolver #2 (tid=44)", + "kind": 0, + "units": 0, + "amount": 4000, + "description": "Desc." + }, + { + "process": "P9", + "path": "explicit/threads/stacks/DNS Resolver #3 (tid=45)", + "kind": 0, + "units": 0, + "amount": 5000, + "description": "Desc." + } + ] +} diff --git a/toolkit/components/aboutmemory/tests/memory-reports-good.json b/toolkit/components/aboutmemory/tests/memory-reports-good.json new file mode 100644 index 0000000000..21b6d5b0aa --- /dev/null +++ b/toolkit/components/aboutmemory/tests/memory-reports-good.json @@ -0,0 +1,146 @@ +{ + "version": 1, + "hasMozMallocUsableSize": true, + "reports": [ + { + "process": "Main Process (pid NNN)", + "path": "heap-allocated", + "kind": 2, + "units": 0, + "amount": 262144000, + "description": "Heap allocated." + }, + { + "process": "Main Process (pid NNN)", + "path": "other/b", + "kind": 2, + "units": 0, + "amount": 104857, + "description": "Other b." + }, + { + "process": "Main Process (pid NNN)", + "path": "other/a", + "kind": 2, + "units": 0, + "amount": 209715, + "description": "Other a." + }, + { + "process": "Main Process (pid NNN)", + "path": "explicit/a/b", + "kind": 1, + "units": 0, + "amount": 52428800, + "description": "A b." + }, + + { + "process": "Main Process (pid NNN)", + "path": "size/a", + "kind": 1, + "units": 0, + "amount": 1024, + "description": "non-sentence" + }, + { + "process": "Main Process (pid NNN)", + "path": "rss/a", + "kind": 1, + "units": 0, + "amount": 1024, + "description": "non-sentence" + }, + { + "process": "Main Process (pid NNN)", + "path": "pss/a", + "kind": 1, + "units": 0, + "amount": 1024, + "description": "non-sentence" + }, + { + "process": "Main Process (pid NNN)", + "path": "swap/a", + "kind": 1, + "units": 0, + "amount": 1024, + "description": "non-sentence" + }, + { + "process": "Main Process (pid NNN)", + "path": "compartments/system/a", + "kind": 1, + "units": 0, + "amount": 1024, + "description": "" + }, + { + "process": "Main Process (pid NNN)", + "path": "ghost-windows/a", + "kind": 1, + "units": 0, + "amount": 1024, + "description": "" + }, + + { + "process": "Heap-unclassified process", + "path": "heap-allocated", + "kind": 2, + "units": 0, + "amount": 262144000, + "description": "Heap allocated." + }, + { + "process": "Heap-unclassified process", + "path": "explicit/a/b", + "kind": 1, + "units": 0, + "amount": 52428800, + "description": "A b." + }, + { + "process": "Heap-unclassified process", + "path": "explicit/heap-unclassified", + "kind": 1, + "units": 0, + "amount": 209715200, + "description": "Heap unclassified" + }, + + { + "process": "Explicit-only process", + "path": "explicit/a/b", + "kind": 1, + "units": 0, + "amount": 100000, + "description": "A b." + }, + + { + "process": "Other-only process", + "path": "a/b", + "kind": 1, + "units": 0, + "amount": 100000, + "description": "A b." + }, + { + "process": "Other-only process", + "path": "a/c", + "kind": 1, + "units": 0, + "amount": 100000, + "description": "A c." + }, + { + "process": "Other-only process", + "path": "heap-allocated", + "kind": 1, + "units": 0, + "amount": 500000, + "description": "D." + } + ] +} diff --git a/toolkit/components/aboutmemory/tests/remote.xhtml b/toolkit/components/aboutmemory/tests/remote.xhtml new file mode 100644 index 0000000000..7d69101305 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/remote.xhtml @@ -0,0 +1,12 @@ + + + + + + +

Remote browser

+ + +
diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory.xhtml new file mode 100644 index 0000000000..4617a019ad --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory.xhtml @@ -0,0 +1,599 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory2.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory2.xhtml new file mode 100644 index 0000000000..28c8f7fa4f --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory2.xhtml @@ -0,0 +1,420 @@ + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory3.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory3.xhtml new file mode 100644 index 0000000000..1391af38b7 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory3.xhtml @@ -0,0 +1,558 @@ + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory4.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory4.xhtml new file mode 100644 index 0000000000..9d9db694f2 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory4.xhtml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml new file mode 100644 index 0000000000..7b63179767 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory6.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory6.xhtml new file mode 100644 index 0000000000..a3a76532e7 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory6.xhtml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory7.xhtml b/toolkit/components/aboutmemory/tests/test_aboutmemory7.xhtml new file mode 100644 index 0000000000..28872cd516 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_aboutmemory7.xhtml @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xhtml b/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xhtml new file mode 100644 index 0000000000..9f3cdfe774 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xhtml @@ -0,0 +1,90 @@ + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_memoryReporters.xhtml b/toolkit/components/aboutmemory/tests/test_memoryReporters.xhtml new file mode 100644 index 0000000000..c97981258e --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_memoryReporters.xhtml @@ -0,0 +1,433 @@ + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_memoryReporters2.xhtml b/toolkit/components/aboutmemory/tests/test_memoryReporters2.xhtml new file mode 100644 index 0000000000..b7251c4e62 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_memoryReporters2.xhtml @@ -0,0 +1,116 @@ + + + + + + diff --git a/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xhtml b/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xhtml new file mode 100644 index 0000000000..206cee5434 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xhtml @@ -0,0 +1,46 @@ + + + + + + + + + + + + diff --git a/toolkit/components/aboutmemory/tests/xpcshell/test_gpuprocess.js b/toolkit/components/aboutmemory/tests/xpcshell/test_gpuprocess.js new file mode 100644 index 0000000000..4a77752b17 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/xpcshell/test_gpuprocess.js @@ -0,0 +1,39 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + +function run_test() { + let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo); + let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].getService( + Ci.nsIMemoryReporterManager + ); + + let ok = gfxInfo.controlGPUProcessForXPCShell(true); + Assert.equal(ok, true); + + let endTesting = function () { + gfxInfo.controlGPUProcessForXPCShell(false); + do_test_finished(); + }; + + let foundGPUProcess = false; + let onHandleReport = function ( + aProcess, + aPath, + aKind, + aUnits, + aAmount, + aDescription + ) { + if (/GPU \(pid \d+\)/.test(aProcess)) { + foundGPUProcess = true; + } + }; + let onFinishReporting = function () { + Assert.equal(foundGPUProcess, true); + endTesting(); + }; + + mgr.getReports(onHandleReport, null, onFinishReporting, null, false); + do_test_pending(); +} diff --git a/toolkit/components/aboutmemory/tests/xpcshell/xpcshell.toml b/toolkit/components/aboutmemory/tests/xpcshell/xpcshell.toml new file mode 100644 index 0000000000..0b674bc396 --- /dev/null +++ b/toolkit/components/aboutmemory/tests/xpcshell/xpcshell.toml @@ -0,0 +1,5 @@ +[DEFAULT] +head = "" +run-if = ["os == 'win'"] + +["test_gpuprocess.js"] -- cgit v1.2.3