Skip to content

Commit d6b1385

Browse files
krajRaphael Kubo da Costa
authored andcommitted
chromium: Update mallinfo patch for aarch64
while building for aarch64 ran into a case where HAVE_MALLINFO was hardcoded, undefine it for musl like other places as well. Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent 0d70731 commit d6b1385

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

meta-chromium/recipes-browser/chromium/files/musl/0001-mallinfo-implementation-is-glibc-specific.patch

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1212
third_party/tcmalloc/chromium/src/config_linux.h | 2 +-
1313
4 files changed, 4 insertions(+), 4 deletions(-)
1414

15-
diff --git a/base/process/process_metrics_posix.cc b/base/process/process_metrics_posix.cc
16-
index 9d12c427bb..7984c733c8 100644
1715
--- a/base/process/process_metrics_posix.cc
1816
+++ b/base/process/process_metrics_posix.cc
19-
@@ -119,7 +119,7 @@ size_t ProcessMetrics::GetMallocUsage() {
17+
@@ -119,7 +119,7 @@ size_t ProcessMetrics::GetMallocUsage()
2018
malloc_statistics_t stats = {0};
2119
malloc_zone_statistics(nullptr, &stats);
2220
return stats.size_in_use;
@@ -25,11 +23,9 @@ index 9d12c427bb..7984c733c8 100644
2523
struct mallinfo minfo = mallinfo();
2624
#if BUILDFLAG(USE_TCMALLOC)
2725
return minfo.uordblks;
28-
diff --git a/base/trace_event/malloc_dump_provider.cc b/base/trace_event/malloc_dump_provider.cc
29-
index 9bf8376988..e6cb89ebed 100644
3026
--- a/base/trace_event/malloc_dump_provider.cc
3127
+++ b/base/trace_event/malloc_dump_provider.cc
32-
@@ -184,7 +184,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
28+
@@ -184,7 +184,7 @@ bool MallocDumpProvider::OnMemoryDump(co
3329
}
3430
#elif defined(OS_FUCHSIA)
3531
// TODO(fuchsia): Port, see https://crbug.com/706592.
@@ -38,21 +34,17 @@ index 9bf8376988..e6cb89ebed 100644
3834
struct mallinfo info = mallinfo();
3935
// In case of Android's jemalloc |arena| is 0 and the outer pages size is
4036
// reported by |hblkhd|. In case of dlmalloc the total is given by
41-
diff --git a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
42-
index 2f860e1286..d99a22ad1b 100644
4337
--- a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
4438
+++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
4539
@@ -130,7 +130,7 @@
4640
/* #undef HAVE_MALLCTL */
4741

4842
/* Define to 1 if you have the `mallinfo' function. */
4943
-#define HAVE_MALLINFO 1
50-
+/* #define HAVE_MALLINFO 1 */
44+
+/* #undef HAVE_MALLINFO */
5145

5246
/* Define to 1 if you have the <malloc.h> header file. */
5347
#define HAVE_MALLOC_H 1
54-
diff --git a/third_party/tcmalloc/chromium/src/config_linux.h b/third_party/tcmalloc/chromium/src/config_linux.h
55-
index 4e8e3989eb..93a62a2d82 100644
5648
--- a/third_party/tcmalloc/chromium/src/config_linux.h
5749
+++ b/third_party/tcmalloc/chromium/src/config_linux.h
5850
@@ -152,7 +152,7 @@
@@ -64,3 +56,14 @@ index 4e8e3989eb..93a62a2d82 100644
6456

6557
/* Define to 1 if you have the <sys/cdefs.h> header file. */
6658
#define HAVE_SYS_CDEFS_H 1
59+
--- a/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h
60+
+++ b/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h
61+
@@ -125,7 +125,7 @@
62+
/* #undef HAVE_MALLCTL */
63+
64+
/* Define to 1 if you have the `mallinfo' function. */
65+
-#define HAVE_MALLINFO 1
66+
+/* #undef HAVE_MALLINFO */
67+
68+
/* Define to 1 if you have the <malloc/malloc.h> header file. */
69+
/* #undef HAVE_MALLOC_MALLOC_H */

0 commit comments

Comments
 (0)