all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 1084b5a5becd7189a58d8924ea35e46f5f7994b8 1354 bytes (raw)
name: gnu/packages/patches/pnet-newer-libgc-fix.patch 	 # note: path name is non-authoritative(*)

 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
44
45
 
diff --git a/support/hb_gc.c b/support/hb_gc.c
index a5addb2d..41126963 100644
--- a/support/hb_gc.c
+++ b/support/hb_gc.c
@@ -104,12 +104,6 @@ static volatile int _FinalizersRunningSynchronously = 0;
 	#define GC_TRACE(a, b)
 #endif
 
-/*
- * This is a internal global variable with the number of reclaimed bytes
- * after a garbage collection.
- */
-extern GC_signed_word GC_bytes_found;
-
 /*
  *	Main entry point for the finalizer thread.
  */
@@ -432,6 +426,7 @@ int ILGCFullCollection(int timeout)
 {
 	int lastFinalizingCount;
 	int hasThreads;
+       struct GC_prof_stats_s stats;
 
 	hasThreads = _ILHasThreads();
 
@@ -462,7 +457,8 @@ int ILGCFullCollection(int timeout)
 			GC_TRACE("Last finalizingCount = %i\n", lastFinalizingCount);
 
 			GC_gcollect();
-			bytesCollected = GC_bytes_found;
+                       GC_get_prof_stats(&stats, sizeof(stats));
+			bytesCollected = stats.bytes_reclaimed_since_gc;
 
 			GC_TRACE("GC: bytes collected =  %i\n", bytesCollected);
 
@@ -516,7 +512,8 @@ int ILGCFullCollection(int timeout)
 			GC_TRACE("Last finalizingCount = %i\n", lastFinalizingCount);
 
 			GC_gcollect();
-			bytesCollected = GC_bytes_found;
+                       GC_get_prof_stats(&stats, sizeof(stats));
+			bytesCollected = stats.bytes_reclaimed_since_gc;
 
 			GC_TRACE("GC: bytes collected =  %i\n", bytesCollected);
 

debug log:

solving 1084b5a5be ...
found 1084b5a5be in https://yhetil.org/guix/iMoekcfwEfCp2uLTWzr-P2_OVyzTF-420AoXae5W6GK2kP5NvueOXBRzAIJBRN2U0c7Sl0HUzUy8eKWNuTs2uaiapCUkJUo5Ng9ahfsfGZ8=@proton.me/

applying [1/1] https://yhetil.org/guix/iMoekcfwEfCp2uLTWzr-P2_OVyzTF-420AoXae5W6GK2kP5NvueOXBRzAIJBRN2U0c7Sl0HUzUy8eKWNuTs2uaiapCUkJUo5Ng9ahfsfGZ8=@proton.me/
diff --git a/gnu/packages/patches/pnet-newer-libgc-fix.patch b/gnu/packages/patches/pnet-newer-libgc-fix.patch
new file mode 100644
index 0000000000..1084b5a5be

1:12: space before tab in indent.
 	#define GC_TRACE(a, b)
1:14: trailing whitespace.
 
1:26: space before tab in indent.
 	int lastFinalizingCount;
1:27: space before tab in indent.
 	int hasThreads;
1:29: trailing whitespace.
 
Checking patch gnu/packages/patches/pnet-newer-libgc-fix.patch...
Applied patch gnu/packages/patches/pnet-newer-libgc-fix.patch cleanly.
warning: squelched 15 whitespace errors
warning: 20 lines add whitespace errors.

index at:
100644 1084b5a5becd7189a58d8924ea35e46f5f7994b8	gnu/packages/patches/pnet-newer-libgc-fix.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.