aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-base_process_process__metrics__freebsd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium/files/patch-base_process_process__metrics__freebsd.cc')
-rw-r--r--www/chromium/files/patch-base_process_process__metrics__freebsd.cc64
1 files changed, 3 insertions, 61 deletions
diff --git a/www/chromium/files/patch-base_process_process__metrics__freebsd.cc b/www/chromium/files/patch-base_process_process__metrics__freebsd.cc
index 5eb60b3d9b11..27c09519dce9 100644
--- a/www/chromium/files/patch-base_process_process__metrics__freebsd.cc
+++ b/www/chromium/files/patch-base_process_process__metrics__freebsd.cc
@@ -1,4 +1,4 @@
---- base/process/process_metrics_freebsd.cc.orig 2025-08-07 06:57:29 UTC
+--- base/process/process_metrics_freebsd.cc.orig 2025-09-06 10:01:20 UTC
+++ base/process/process_metrics_freebsd.cc
@@ -3,41 +3,92 @@
// found in the LICENSE file.
@@ -104,11 +104,10 @@
}
size_t GetSystemCommitCharge() {
-@@ -64,6 +115,176 @@ size_t GetSystemCommitCharge() {
- pagesize = getpagesize();
+@@ -65,5 +116,118 @@ size_t GetSystemCommitCharge() {
return mem_total - (mem_free * pagesize) - (mem_inactive * pagesize);
-+}
+ }
+
+int64_t GetNumberOfThreads(ProcessHandle process) {
+ // Taken from FreeBSD top (usr.bin/top/machine.c)
@@ -222,62 +221,5 @@
+SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default;
+
+SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default;
-+
-+Value::Dict SystemDiskInfo::ToDict() const {
-+ Value::Dict res;
-+
-+ // Write out uint64_t variables as doubles.
-+ // Note: this may discard some precision, but for JS there's no other option.
-+ res.Set("reads", static_cast<double>(reads));
-+ res.Set("reads_merged", static_cast<double>(reads_merged));
-+ res.Set("sectors_read", static_cast<double>(sectors_read));
-+ res.Set("read_time", static_cast<double>(read_time));
-+ res.Set("writes", static_cast<double>(writes));
-+ res.Set("writes_merged", static_cast<double>(writes_merged));
-+ res.Set("sectors_written", static_cast<double>(sectors_written));
-+ res.Set("write_time", static_cast<double>(write_time));
-+ res.Set("io", static_cast<double>(io));
-+ res.Set("io_time", static_cast<double>(io_time));
-+ res.Set("weighted_io_time", static_cast<double>(weighted_io_time));
-+
-+ NOTIMPLEMENTED();
-+
-+ return res;
-+}
-+
-+Value::Dict SystemMemoryInfoKB::ToDict() const {
-+ Value::Dict res;
-+ res.Set("total", total);
-+ res.Set("free", free);
-+ res.Set("available", available);
-+ res.Set("buffers", buffers);
-+ res.Set("cached", cached);
-+ res.Set("active_anon", active_anon);
-+ res.Set("inactive_anon", inactive_anon);
-+ res.Set("active_file", active_file);
-+ res.Set("inactive_file", inactive_file);
-+ res.Set("swap_total", swap_total);
-+ res.Set("swap_free", swap_free);
-+ res.Set("swap_used", swap_total - swap_free);
-+ res.Set("dirty", dirty);
-+ res.Set("reclaimable", reclaimable);
-+
-+ NOTIMPLEMENTED();
-+
-+ return res;
-+}
-+
-+Value::Dict VmStatInfo::ToDict() const {
-+ Value::Dict res;
-+ // TODO(crbug.com/1334256): Make base::Value able to hold uint64_t and remove
-+ // casts below.
-+ res.Set("pswpin", static_cast<int>(pswpin));
-+ res.Set("pswpout", static_cast<int>(pswpout));
-+ res.Set("pgmajfault", static_cast<int>(pgmajfault));
-+
-+ NOTIMPLEMENTED();
-+
-+ return res;
- }
} // namespace base