Skip to content

Commit 5a33571

Browse files
committed
Merge pull request #16385 from JuliaLang/yyc/gc/page-mgr
Clean up of gc debugging and page management code
2 parents 05366dc + 51595a1 commit 5a33571

File tree

10 files changed

+942
-909
lines changed

10 files changed

+942
-909
lines changed

base/util.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# high-resolution relative time, in nanoseconds
88
time_ns() = ccall(:jl_hrtime, UInt64, ())
99

10-
# This type must be kept in sync with the C struct in src/gc.c
10+
# This type must be kept in sync with the C struct in src/gc.h
1111
immutable GC_Num
1212
allocd ::Int64 # GC internal
1313
freed ::Int64 # GC internal
@@ -40,7 +40,7 @@ immutable GC_Diff
4040
end
4141

4242
function GC_Diff(new::GC_Num, old::GC_Num)
43-
# logic from gc.c:jl_gc_total_bytes
43+
# logic from `src/gc.c:jl_gc_total_bytes`
4444
old_allocd = old.allocd + Int64(old.collect) + Int64(old.total_allocd)
4545
new_allocd = new.allocd + Int64(new.collect) + Int64(new.total_allocd)
4646
return GC_Diff(new_allocd - old_allocd,

src/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SRCS := \
2828
jltypes gf typemap ast builtins module interpreter \
2929
alloc dlload sys init task array dump toplevel jl_uv jlapi signal-handling \
3030
simplevector APInt-C runtime_intrinsics runtime_ccall \
31-
threadgroup threading stackwalk gc safepoint
31+
threadgroup threading stackwalk gc gc-debug gc-pages safepoint
3232

3333
ifeq ($(JULIACODEGEN),LLVM)
3434
SRCS += codegen disasm debuginfo llvm-simdloop llvm-gcroot
@@ -117,7 +117,9 @@ $(BUILDDIR)/anticodegen.o $(BUILDDIR)/anticodegen.dbg.obj: $(SRCDIR)/intrinsics.
117117
$(BUILDDIR)/debuginfo.o $(BUILDDIR)/debuginfo.dbg.obj: $(SRCDIR)/codegen_internal.h
118118
$(BUILDDIR)/disasm.o $(BUILDDIR)/disasm.dbg.obj: $(SRCDIR)/codegen_internal.h
119119
$(BUILDDIR)/builtins.o $(BUILDDIR)/builtins.dbg.obj: $(SRCDIR)/table.c
120-
$(BUILDDIR)/gc.o $(BUILDDIR)/gc.dbg.obj: $(SRCDIR)/gc-debug.c
120+
$(BUILDDIR)/gc.o $(BUILDDIR)/gc.dbg.obj: $(SRCDIR)/gc.h
121+
$(BUILDDIR)/gc-debug.o $(BUILDDIR)/gc-debug.dbg.obj: $(SRCDIR)/gc.h
122+
$(BUILDDIR)/gc-pages.o $(BUILDDIR)/gc-pages.dbg.obj: $(SRCDIR)/gc.h
121123
$(BUILDDIR)/signal-handling.o $(BUILDDIR)/signal-handling.dbg.obj: $(addprefix $(SRCDIR)/,signals-*.c)
122124
$(BUILDDIR)/dump.o $(BUILDDIR)/dump.dbg.obj: $(addprefix $(SRCDIR)/,common_symbols1.inc common_symbols2.inc)
123125
$(addprefix $(BUILDDIR)/,threading.o threading.dbg.obj gc.o gc.dbg.obj init.c init.dbg.obj task.o task.dbg.obj): $(addprefix $(SRCDIR)/,threading.h threadgroup.h)

0 commit comments

Comments
 (0)