summaryrefslogtreecommitdiffstats
path: root/desktop/modules/perf/Perf.js
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/perf/Perf.js')
-rw-r--r--desktop/modules/perf/Perf.js24
1 files changed, 0 insertions, 24 deletions
diff --git a/desktop/modules/perf/Perf.js b/desktop/modules/perf/Perf.js
index 03fd484..d067d3b 100644
--- a/desktop/modules/perf/Perf.js
+++ b/desktop/modules/perf/Perf.js
@@ -16,8 +16,6 @@
// or numbers and returns values. A reading that cannot be made is null, and
// the panel draws null as a dash.
-const UNITS = { "": 1, B: 1, KiB: 1024, MiB: 1024 ** 2, GiB: 1024 ** 3 };
-
// A public IP older than this is not shown: by then the fetch has failed
// for hours, and an address that may no longer be ours is worse than a dash.
const STALE = 4 * 3600;
@@ -86,28 +84,6 @@ function du(text) {
return { total: rows[0].bytes, items: rows.slice(1) };
}
-// VRAM in bytes from the fdinfo scan: drm-resident-vram0 of every xe fd,
-// counted once per drm-client-id because a client holds several fds.
-function vram(text) {
- const fds = {};
- for (const line of text.split("\n")) {
- const m = /^([^:]*):(drm-[\w-]+):\s*(.*)$/.exec(line);
- if (!m) continue;
- (fds[m[1]] = fds[m[1]] || {})[m[2]] = m[3];
- }
- const seen = {};
- let total = null;
- for (const path in fds) {
- const fd = fds[path];
- const id = fd["drm-client-id"];
- const n = /^(\d+)\s*(\w*)/.exec(fd["drm-resident-vram0"] || "");
- if (fd["drm-driver"] !== "xe" || !id || !n || seen[id]) continue;
- seen[id] = true;
- total = (total || 0) + Number(n[1]) * (UNITS[n[2]] || 1);
- }
- return total;
-}
-
// Bytes per second between two counter readings. A counter that went
// backwards (interface reset) gives null rather than a negative spike.
function rate(prev, cur, secs) {