summarylogtreecommitdiffstats
path: root/0002-tcmalloc-hold-pageheap_lock-for-info-accessor.patch
blob: 6d799a83f973fd190ba56bd21ca23ca457e8ea2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff -Naur a/bazel/foreign_cc/tcmalloc.patch b/bazel/foreign_cc/tcmalloc.patch
--- a/bazel/foreign_cc/tcmalloc.patch	1969-12-31 19:00:00.000000000 -0500
+++ b/bazel/foreign_cc/tcmalloc.patch	2024-12-09 09:23:11.264026121 -0500
@@ -0,0 +1,27 @@
+From 4ef8fe128ec8af0e5c5c351852c071eb00cccd39 Mon Sep 17 00:00:00 2001
+From: Clement Courbet <courbet@google.com>
+Date: Fri, 13 Oct 2023 08:37:12 -0700
+Subject: [PATCH] No public description
+
+PiperOrigin-RevId: 573230143
+Change-Id: I6d0d70dec3f4ee284ecd84acfebe40ce956b35ea
+---
+ tcmalloc/page_allocator_interface.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tcmalloc/page_allocator_interface.h b/tcmalloc/page_allocator_interface.h
+index f3bececea..158c71be3 100644
+--- a/tcmalloc/page_allocator_interface.h
++++ b/tcmalloc/page_allocator_interface.h
+@@ -81,7 +81,10 @@ class PageAllocatorInterface {
+   virtual void PrintInPbtxt(PbtxtRegion* region)
+       ABSL_LOCKS_EXCLUDED(pageheap_lock) = 0;
+ 
+-  const PageAllocInfo& info() const { return info_; }
++  const PageAllocInfo& info() const
++      ABSL_EXCLUSIVE_LOCKS_REQUIRED(pageheap_lock) {
++    return info_;
++  }
+ 
+  protected:
+   PageAllocInfo info_ ABSL_GUARDED_BY(pageheap_lock);
diff -Naur a/bazel/repositories.bzl b/bazel/repositories.bzl
--- a/bazel/repositories.bzl	2024-12-09 09:23:05.763926646 -0500
+++ b/bazel/repositories.bzl	2024-12-09 09:23:11.264026121 -0500
@@ -865,6 +865,8 @@
 def _com_github_google_tcmalloc():
     external_http_archive(
         name = "com_github_google_tcmalloc",
+		patches = ["@envoy//bazel/foreign_cc:tcmalloc.patch"],
+		patch_args = ["-p1"],
     )
 
 def _com_github_gperftools_gperftools():