aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-base_process_process__metrics.h
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium/files/patch-base_process_process__metrics.h')
-rw-r--r--www/chromium/files/patch-base_process_process__metrics.h61
1 files changed, 24 insertions, 37 deletions
diff --git a/www/chromium/files/patch-base_process_process__metrics.h b/www/chromium/files/patch-base_process_process__metrics.h
index 79286ab92b7d..07463e92edbf 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 2022-06-17 14:20:10 UTC
+--- base/process/process_metrics.h.orig 2025-02-19 07:43:18 UTC
+++ base/process/process_metrics.h
-@@ -35,7 +35,7 @@
+@@ -39,7 +39,7 @@
#endif
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
@@ -9,26 +9,17 @@
#include <string>
#include <utility>
#include <vector>
-@@ -51,7 +51,7 @@ class Value;
- // Full declaration is in process_metrics_iocounters.h.
- struct IoCounters;
+@@ -49,7 +49,7 @@
+
+ namespace base {
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
// Minor and major page fault counts since the process creation.
// Both counts are process-wide, and exclude child processes.
//
-@@ -106,7 +106,7 @@ class BASE_EXPORT ProcessMetrics {
- // convenience wrapper for CreateProcessMetrics().
- static std::unique_ptr<ProcessMetrics> CreateCurrentProcessMetrics();
-
--#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
-+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
- // Resident Set Size is a Linux/Android specific memory concept. Do not
- // attempt to extend this to other platforms.
- BASE_EXPORT size_t GetResidentSetSize() const;
-@@ -154,7 +154,7 @@ class BASE_EXPORT ProcessMetrics {
- #endif // BUILDFLAG(IS_WIN)
+@@ -179,7 +179,7 @@ class BASE_EXPORT ProcessMetrics {
+ base::expected<TimeDelta, ProcessCPUUsageError> GetCumulativeCPUUsage();
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
- BUILDFLAG(IS_AIX)
@@ -36,16 +27,16 @@
// 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
-@@ -237,7 +237,7 @@ class BASE_EXPORT ProcessMetrics {
+@@ -224,7 +224,7 @@ class BASE_EXPORT ProcessMetrics {
int GetOpenFdSoftLimit() const;
#endif // BUILDFLAG(IS_POSIX)
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
- // Bytes of swap as reported by /proc/[pid]/status.
- uint64_t GetVmSwapBytes() const;
-
-@@ -258,7 +258,7 @@ class BASE_EXPORT ProcessMetrics {
+ // 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 {
#endif // !BUILDFLAG(IS_MAC)
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
@@ -54,17 +45,13 @@
int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups);
#endif
#if BUILDFLAG(IS_APPLE)
-@@ -269,7 +269,7 @@ class BASE_EXPORT ProcessMetrics {
- #endif
-
- #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
-- BUILDFLAG(IS_AIX)
-+ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD)
- CPU::CoreType GetCoreType(int core_index);
- #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
- // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX)
-@@ -293,7 +293,7 @@ class BASE_EXPORT ProcessMetrics {
- #endif
+@@ -264,12 +264,10 @@ 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)
+ TimeDelta last_cumulative_cpu_;
+-#endif
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
- BUILDFLAG(IS_AIX)
@@ -72,7 +59,7 @@
// Same thing for idle wakeups.
TimeTicks last_idle_wakeups_time_;
uint64_t last_absolute_idle_wakeups_;
-@@ -336,7 +336,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de
+@@ -310,7 +308,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) || \
@@ -81,7 +68,7 @@
// Data about system-wide memory consumption. Values are in KB. Available on
// Windows, Mac, Linux, Android and Chrome OS.
//
-@@ -371,7 +371,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
+@@ -345,7 +343,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
#endif
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
@@ -90,7 +77,7 @@
// 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
-@@ -386,7 +386,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
+@@ -360,7 +358,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
#endif
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
@@ -99,7 +86,7 @@
int buffers = 0;
int cached = 0;
int active_anon = 0;
-@@ -423,7 +423,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK
+@@ -397,7 +395,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK
// BUILDFLAG(IS_FUCHSIA)
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
@@ -108,7 +95,7 @@
// 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.
-@@ -610,7 +610,7 @@ class BASE_EXPORT SystemMetrics {
+@@ -591,7 +589,7 @@ class BASE_EXPORT SystemMetrics {
FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics);
size_t committed_memory_;