diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2018-10-23 15:55:46 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2018-10-30 08:11:51 +0000 |
commit | bfddeb7f34db5b1d1b73a787246ca28f8ad3575b (patch) | |
tree | ad8d7e0e85bbf25772fe0a3d35e8c0045e23f336 /recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | |
parent | 11b63656bad9db24950d05901a8b1917bc5cb7f8 (diff) | |
download | meta-qt5-bfddeb7f34db5b1d1b73a787246ca28f8ad3575b.tar.gz |
qtwebengine: update chromium musl patchset
Change-Id: I792a600e354531f234a3ff641c030c119921f200
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch')
-rw-r--r-- | recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch index 3396b7f7..0c1b2017 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d886de89a3afad81d0b3ac012098d064eb00d8ed Mon Sep 17 00:00:00 2001 | 1 | From 22a60b7403ba8404e2936caf9126c6c666fa577b Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 7 Jul 2017 14:09:06 -0700 | 3 | Date: Fri, 7 Jul 2017 14:09:06 -0700 |
4 | Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux | 4 | Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux |
@@ -6,15 +6,14 @@ Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | --- | 7 | --- |
8 | chromium/base/process/process_metrics_posix.cc | 4 ++-- | 8 | chromium/base/process/process_metrics_posix.cc | 4 ++-- |
9 | chromium/base/trace_event/malloc_dump_provider.cc | 3 ++- | 9 | chromium/base/trace_event/malloc_dump_provider.cc | 2 ++ |
10 | chromium/content/child/content_child_helpers.cc | 2 +- | 10 | 2 files changed, 4 insertions(+), 2 deletions(-) |
11 | 3 files changed, 5 insertions(+), 4 deletions(-) | ||
12 | 11 | ||
13 | diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc | 12 | diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc |
14 | index 73a52d6210..4867198a50 100644 | 13 | index a09bbf2c56..b309f6b694 100644 |
15 | --- a/chromium/base/process/process_metrics_posix.cc | 14 | --- a/chromium/base/process/process_metrics_posix.cc |
16 | +++ b/chromium/base/process/process_metrics_posix.cc | 15 | +++ b/chromium/base/process/process_metrics_posix.cc |
17 | @@ -94,14 +94,14 @@ size_t ProcessMetrics::GetMallocUsage() { | 16 | @@ -100,14 +100,14 @@ size_t ProcessMetrics::GetMallocUsage() { |
18 | malloc_statistics_t stats = {0}; | 17 | malloc_statistics_t stats = {0}; |
19 | malloc_zone_statistics(nullptr, &stats); | 18 | malloc_zone_statistics(nullptr, &stats); |
20 | return stats.size_in_use; | 19 | return stats.size_in_use; |
@@ -32,10 +31,10 @@ index 73a52d6210..4867198a50 100644 | |||
32 | return 0; | 31 | return 0; |
33 | #endif | 32 | #endif |
34 | diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc | 33 | diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc |
35 | index ffd519133c..0c9131e98e 100644 | 34 | index 46fdb3e214..27936e6b20 100644 |
36 | --- a/chromium/base/trace_event/malloc_dump_provider.cc | 35 | --- a/chromium/base/trace_event/malloc_dump_provider.cc |
37 | +++ b/chromium/base/trace_event/malloc_dump_provider.cc | 36 | +++ b/chromium/base/trace_event/malloc_dump_provider.cc |
38 | @@ -197,6 +197,7 @@ MallocDumpProvider::~MallocDumpProvider() = default; | 37 | @@ -77,6 +77,7 @@ MallocDumpProvider::~MallocDumpProvider() = default; |
39 | // the current process. | 38 | // the current process. |
40 | bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, | 39 | bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, |
41 | ProcessMemoryDump* pmd) { | 40 | ProcessMemoryDump* pmd) { |
@@ -43,25 +42,11 @@ index ffd519133c..0c9131e98e 100644 | |||
43 | { | 42 | { |
44 | base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_); | 43 | base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_); |
45 | if (!emit_metrics_on_memory_dump_) | 44 | if (!emit_metrics_on_memory_dump_) |
46 | @@ -322,7 +323,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, | 45 | @@ -172,6 +173,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, |
47 | pmd->DumpHeapUsage(metrics_by_context, overhead, "malloc"); | 46 | MemoryAllocatorDump::kUnitsBytes, |
47 | resident_size - allocated_objects_size); | ||
48 | } | 48 | } |
49 | tid_dumping_heap_ = kInvalidThreadId; | ||
50 | - | ||
51 | +#endif // __GLIBC__ | 49 | +#endif // __GLIBC__ |
52 | return true; | 50 | return true; |
53 | } | 51 | } |
54 | 52 | ||
55 | diff --git a/chromium/content/child/content_child_helpers.cc b/chromium/content/child/content_child_helpers.cc | ||
56 | index 7ddeb4d16a..b8c73b09c5 100644 | ||
57 | --- a/chromium/content/child/content_child_helpers.cc | ||
58 | +++ b/chromium/content/child/content_child_helpers.cc | ||
59 | @@ -25,7 +25,7 @@ namespace content { | ||
60 | // though, this provides only a partial and misleading value. | ||
61 | // Unfortunately some telemetry benchmark rely on it and these need to | ||
62 | // be refactored before getting rid of this. See crbug.com/581365 . | ||
63 | -#if defined(OS_LINUX) || defined(OS_ANDROID) | ||
64 | +#if defined(__GLIBC__) || defined(OS_ANDROID) | ||
65 | size_t GetMemoryUsageKB() { | ||
66 | struct mallinfo minfo = mallinfo(); | ||
67 | uint64_t mem_usage = | ||