diff options
Diffstat (limited to 'www/chromium/files/patch-base_process_process__metrics.h')
-rw-r--r-- | www/chromium/files/patch-base_process_process__metrics.h | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/www/chromium/files/patch-base_process_process__metrics.h b/www/chromium/files/patch-base_process_process__metrics.h index deebade4b6c6..b8b7cafd5571 100644 --- a/www/chromium/files/patch-base_process_process__metrics.h +++ b/www/chromium/files/patch-base_process_process__metrics.h @@ -1,6 +1,6 @@ ---- base/process/process_metrics.h.orig 2025-09-06 10:01:20 UTC +--- base/process/process_metrics.h.orig 2025-10-02 14:20:29 UTC +++ base/process/process_metrics.h -@@ -39,7 +39,7 @@ +@@ -40,7 +40,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ @@ -9,7 +9,7 @@ #include <string> #include <utility> #include <vector> -@@ -49,7 +49,7 @@ +@@ -50,7 +50,7 @@ namespace base { @@ -18,7 +18,16 @@ // Minor and major page fault counts since the process creation. // Both counts are process-wide, and exclude child processes. // -@@ -179,7 +179,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -88,7 +88,7 @@ struct ProcessMemoryInfo { + #endif // BUILDFLAG(IS_APPLE) + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + uint64_t rss_anon_bytes = 0; + uint64_t vm_swap_bytes = 0; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || +@@ -180,7 +180,7 @@ class BASE_EXPORT ProcessMetrics { base::expected<TimeDelta, ProcessCPUUsageError> GetCumulativeCPUUsage(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ @@ -27,7 +36,7 @@ // Emits the cumulative CPU usage for all currently active threads since they // were started into the output parameter (replacing its current contents). // Threads that have already terminated will not be reported. Thus, the sum of -@@ -224,7 +224,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -225,7 +225,7 @@ class BASE_EXPORT ProcessMetrics { int GetOpenFdSoftLimit() const; #endif // BUILDFLAG(IS_POSIX) @@ -36,7 +45,7 @@ // Minor and major page fault count as reported by /proc/[pid]/stat. // Returns true for success. bool GetPageFaultCounts(PageFaultCounts* counts) const; -@@ -242,7 +242,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -243,7 +243,7 @@ class BASE_EXPORT ProcessMetrics { #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ @@ -45,13 +54,14 @@ int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); #endif #if BUILDFLAG(IS_APPLE) -@@ -264,12 +264,10 @@ class BASE_EXPORT ProcessMetrics { +@@ -265,12 +265,12 @@ class BASE_EXPORT ProcessMetrics { // Used to store the previous times and CPU usage counts so we can // compute the CPU usage between calls. TimeTicks last_cpu_time_; -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) ++#if BUILDFLAG(IS_POSIX) TimeDelta last_cumulative_cpu_; --#endif + #endif #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) @@ -59,16 +69,16 @@ // Same thing for idle wakeups. TimeTicks last_idle_wakeups_time_; uint64_t last_absolute_idle_wakeups_; -@@ -310,7 +308,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de +@@ -311,7 +311,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // Data about system-wide memory consumption. Values are in KB. Available on - // Windows, Mac, Linux, Android and Chrome OS. + // Data about system-wide memory consumption. Available on Windows, Mac, Linux, + // Android and Chrome OS. // -@@ -342,7 +340,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -346,7 +346,7 @@ struct BASE_EXPORT SystemMemoryInfo { #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ @@ -77,16 +87,16 @@ // This provides an estimate of available memory as described here: // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always -@@ -357,7 +355,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -361,7 +361,7 @@ struct BASE_EXPORT SystemMemoryInfo { #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - int buffers = 0; - int cached = 0; - int active_anon = 0; -@@ -394,7 +392,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK + ByteCount buffers; + ByteCount cached; + ByteCount active_anon; +@@ -398,7 +398,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfo* // BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ @@ -95,12 +105,12 @@ // Parse the data found in /proc/<pid>/stat and return the sum of the // CPU-related ticks. Returns -1 on parse error. // Exposed for testing. -@@ -570,7 +568,7 @@ class BASE_EXPORT SystemMetrics { +@@ -574,7 +574,7 @@ class BASE_EXPORT SystemMetrics { FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics); size_t committed_memory_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - SystemMemoryInfoKB memory_info_; + SystemMemoryInfo memory_info_; VmStatInfo vmstat_info_; SystemDiskInfo disk_info_; |