Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions base/timing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct GC_Num
total_sweep_time ::Int64
total_mark_time ::Int64
last_full_sweep ::Int64
last_incremental_sweep ::Int64
end

gc_num() = ccall(:jl_gc_num, GC_Num, ())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
036acd7c7b68432f01f2a980bc4958be
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
db2c995b09b5ab046491257b44a8806fd5e254bbf4b4df6e9281ffc8d199745a3d6fea912da2fdd657447e194c73db52cf7acb348b49fd37758b6fbbbdfd3a93
188 changes: 94 additions & 94 deletions deps/checksums/openblas

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions deps/p7zip.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
## p7zip ##

ifneq ($(USE_BINARYBUILDER_P7ZIP),1)

$(SRCCACHE)/p7zip-$(P7ZIP_VER).tar.gz: | $(SRCCACHE)
$(JLDOWNLOAD) $@ https://github.com/jinfeihan57/p7zip/archive/refs/tags/v$(P7ZIP_VER).tar.gz
$(JLDOWNLOAD) $@ https://github.com/p7zip-project/p7zip/archive/refs/tags/v$(P7ZIP_VER).tar.gz

$(BUILDDIR)/p7zip-$(P7ZIP_VER)/source-extracted: $(SRCCACHE)/p7zip-$(P7ZIP_VER).tar.gz
$(JLCHECKSUM) $<
Expand All @@ -28,13 +27,12 @@ $(eval $(call staged-install, \
P7ZIP_INSTALL,,,))

clean-p7zip:
-rm $(BUILDDIR)/p7zip-$(P7ZIP_VER)/build-configured $(BUILDDIR)/p7zip-$(P7ZIP_VER)/build-compiled
-rm $(build_bindir)/7za
-rm -f $(BUILDDIR)/p7zip-$(P7ZIP_VER)/build-configured $(BUILDDIR)/p7zip-$(P7ZIP_VER)/build-compiled
-rm -f $(build_bindir)/7za
-$(MAKE) -C $(BUILDDIR)/p7zip-$(P7ZIP_VER) clean

distclean-p7zip:
-rm -rf $(SRCCACHE)/p7zip-$(P7ZIP_VER).tar.gz $(SRCCACHE)/p7zip-$(P7ZIP_VER) $(BUILDDIR)/p7zip-$(P7ZIP_VER)

rm -rf $(SRCCACHE)/p7zip-$(P7ZIP_VER).tar.gz $(SRCCACHE)/p7zip-$(P7ZIP_VER) $(BUILDDIR)/p7zip-$(P7ZIP_VER)

get-p7zip: $(SRCCACHE)/p7zip-$(P7ZIP_VER).tar.gz
extract-p7zip: $(SRCCACHE)/p7zip-$(P7ZIP_VER)/source-extracted
Expand All @@ -43,7 +41,6 @@ compile-p7zip: $(BUILDDIR)/p7zip-$(P7ZIP_VER)/build-compiled
fastcheck-p7zip: check-p7zip
check-p7zip: compile-p7zip


else # USE_BINARYBUILDER_P7ZIP

$(eval $(call bb-install,p7zip,P7ZIP,false))
Expand Down
3 changes: 3 additions & 0 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3286,6 +3286,9 @@ static int _jl_gc_collect(jl_ptls_t ptls, jl_gc_collection_t collection)
if (sweep_full) {
gc_num.last_full_sweep = gc_end_time;
}
else {
gc_num.last_incremental_sweep = gc_end_time;
}

// sweeping is over
// 6. if it is a quick sweep, put back the remembered objects in queued state
Expand Down
1 change: 1 addition & 0 deletions src/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ typedef struct {
uint64_t total_sweep_time;
uint64_t total_mark_time;
uint64_t last_full_sweep;
uint64_t last_incremental_sweep;
} jl_gc_num_t;

enum {
Expand Down
8 changes: 4 additions & 4 deletions src/staticdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1960,17 +1960,17 @@ static void jl_save_system_image_to_stream(ios_t *f) JL_GC_DISABLED
if (sysimg.size > ((uintptr_t)1 << RELOC_TAG_OFFSET)) {
jl_printf(
JL_STDERR,
"ERROR: system image too large: sysimg.size is %jd but the limit is %" PRIxPTR "\n",
(intmax_t)sysimg.size,
"ERROR: system image too large: sysimg.size is 0x%" PRIxPTR " but the limit is 0x%" PRIxPTR "\n",
(uintptr_t)sysimg.size,
((uintptr_t)1 << RELOC_TAG_OFFSET)
);
jl_exit(1);
}
if (const_data.size > ((uintptr_t)1 << RELOC_TAG_OFFSET)*sizeof(void*)) {
jl_printf(
JL_STDERR,
"ERROR: system image too large: const_data.size is %jd but the limit is %" PRIxPTR "\n",
(intmax_t)const_data.size,
"ERROR: system image too large: const_data.size is 0x%" PRIxPTR " but the limit is 0x%" PRIxPTR "\n",
(uintptr_t)const_data.size,
((uintptr_t)1 << RELOC_TAG_OFFSET)*sizeof(void*)
);
jl_exit(1);
Expand Down
5 changes: 3 additions & 2 deletions stdlib/OpenBLAS_jll/Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name = "OpenBLAS_jll"
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.20+0"
version = "0.3.21+4"

[deps]
# See note in `src/OpenBLAS_jll.jl` about this dependency.
CompilerSupportLibraries_jll = "e66e0078-7015-5450-92f7-15fbd957f2ae"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[compat]
julia = "1.7"
julia = "1.8"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
32 changes: 31 additions & 1 deletion stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@

## dummy stub for https://github.com/JuliaBinaryWrappers/OpenBLAS_jll.jl
baremodule OpenBLAS_jll
using Base, Libdl, CompilerSupportLibraries_jll, Base.BinaryPlatforms
using Base, Libdl, Base.BinaryPlatforms

# We are explicitly NOT loading this at runtime, as it contains `libgomp`
# which conflicts with `libiomp5`, breaking things like MKL. In the future,
# we hope to transition to a JLL interface that provides a more granular
# interface than eagerly dlopen'ing all libraries provided in the JLL
# which will eliminate issues like this, where we avoid loading a JLL
# because we don't want to load a library that we don't even use yet.
# using CompilerSupportLibraries_jll
# Because of this however, we have to manually load the libraries we
# _do_ care about, namely libgfortran
Base.Experimental.@compiler_options compile=min optimize=0 infer=false

const PATH_list = String[]
Expand All @@ -25,10 +35,13 @@ end

if Sys.iswindows()
const libopenblas = "libopenblas$(libsuffix).dll"
const _libgfortran = string("libgfortran-", libgfortran_version(HostPlatform()).major, ".dll")
elseif Sys.isapple()
const libopenblas = "@rpath/libopenblas$(libsuffix).dylib"
const _libgfortran = string("@rpath/", "libgfortran.", libgfortran_version(HostPlatform()).major, ".dylib")
else
const libopenblas = "libopenblas$(libsuffix).so"
const _libgfortran = string("libgfortran.so.", libgfortran_version(HostPlatform()).major)
end

function __init__()
Expand All @@ -37,6 +50,23 @@ function __init__()
ENV["OPENBLAS_MAIN_FREE"] = "1"
end

# Ensure that OpenBLAS does not grab a huge amount of memory at first,
# since it instantly allocates scratch buffer space for the number of
# threads it thinks it needs to use.
# X-ref: https://github.com/xianyi/OpenBLAS/blob/c43ec53bdd00d9423fc609d7b7ecb35e7bf41b85/README.md#setting-the-number-of-threads-using-environment-variables
# X-ref: https://github.com/JuliaLang/julia/issues/45434
if !haskey(ENV, "OPENBLAS_NUM_THREADS") &&
!haskey(ENV, "GOTO_NUM_THREADS") &&
!haskey(ENV, "OMP_NUM_THREADS")
# We set this to `1` here, and then LinearAlgebra will update
# to the true value in its `__init__()` function.
ENV["OPENBLAS_DEFAULT_NUM_THREADS"] = "1"
end

# As mentioned above, we are sneaking this in here so that we don't have to
# depend on CSL_jll and load _all_ of its libraries.
dlopen(_libgfortran)

global libopenblas_handle = dlopen(libopenblas)
global libopenblas_path = dlpath(libopenblas_handle)
global artifact_dir = dirname(Sys.BINDIR)
Expand Down