Differential D38165 Diff 118368 www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc
Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/files/patch-src_3rdparty_chromium_base_process_process__metrics.cc
--- src/3rdparty/chromium/base/process/process_metrics.cc.orig 2019-11-27 21:12:25 UTC | --- src/3rdparty/chromium/base/process/process_metrics.cc.orig 2021-12-15 16:12:54 UTC | ||||
+++ src/3rdparty/chromium/base/process/process_metrics.cc | +++ src/3rdparty/chromium/base/process/process_metrics.cc | ||||
@@ -57,7 +57,7 @@ SystemMetrics SystemMetrics::Sample() { | @@ -49,7 +49,7 @@ SystemMetrics SystemMetrics::Sample() { | ||||
SystemMetrics system_metrics; | SystemMetrics system_metrics; | ||||
system_metrics.committed_memory_ = GetSystemCommitCharge(); | system_metrics.committed_memory_ = GetSystemCommitCharge(); | ||||
-#if defined(OS_LINUX) || defined(OS_ANDROID) | -#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) | ||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) | +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) | ||||
GetSystemMemoryInfo(&system_metrics.memory_info_); | GetSystemMemoryInfo(&system_metrics.memory_info_); | ||||
GetVmStatInfo(&system_metrics.vmstat_info_); | GetVmStatInfo(&system_metrics.vmstat_info_); | ||||
GetSystemDiskInfo(&system_metrics.disk_info_); | GetSystemDiskInfo(&system_metrics.disk_info_); | ||||
@@ -75,7 +75,7 @@ std::unique_ptr<Value> SystemMetrics::ToValue() const | @@ -68,7 +68,7 @@ std::unique_ptr<Value> SystemMetrics::ToValue() const | ||||
std::unique_ptr<DictionaryValue> res(new DictionaryValue()); | std::unique_ptr<DictionaryValue> res(new DictionaryValue()); | ||||
res->SetIntKey("committed_memory", static_cast<int>(committed_memory_)); | res->SetIntKey("committed_memory", static_cast<int>(committed_memory_)); | ||||
-#if defined(OS_LINUX) || defined(OS_ANDROID) | -#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) | ||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) | +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) | ||||
std::unique_ptr<DictionaryValue> meminfo = memory_info_.ToValue(); | std::unique_ptr<DictionaryValue> meminfo = memory_info_.ToValue(); | ||||
std::unique_ptr<DictionaryValue> vmstat = vmstat_info_.ToValue(); | std::unique_ptr<DictionaryValue> vmstat = vmstat_info_.ToValue(); | ||||
meminfo->MergeDictionary(vmstat.get()); | meminfo->MergeDictionary(vmstat.get()); | ||||
@@ -126,7 +126,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( | @@ -119,7 +119,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( | ||||
} | } | ||||
#endif | #endif | ||||
-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) | -#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ | ||||
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) | +#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \ | ||||
defined(OS_AIX) | |||||
int ProcessMetrics::CalculateIdleWakeupsPerSecond( | int ProcessMetrics::CalculateIdleWakeupsPerSecond( | ||||
uint64_t absolute_idle_wakeups) { | uint64_t absolute_idle_wakeups) { | ||||
return CalculateEventsPerSecond(absolute_idle_wakeups, | @@ -132,7 +132,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() { | ||||
@@ -138,7 +138,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() { | |||||
NOTIMPLEMENTED(); // http://crbug.com/120488 | NOTIMPLEMENTED(); // http://crbug.com/120488 | ||||
return 0; | return 0; | ||||
} | } | ||||
-#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) | -#endif // defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || | ||||
+#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) | +#endif // defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || | ||||
// defined(OS_AIX) | |||||
#if defined(OS_MACOSX) | #if defined(OS_APPLE) | ||||
int ProcessMetrics::CalculatePackageIdleWakeupsPerSecond( |