Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison of branch: backports-release-1.9+RAI #45

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
bc55f44
[release-1.9] Backports for Julia 1.9 (#50977)
KristofferC Nov 7, 2023
048b742
release-1.9: bump Pkg to latest v1.9 (#52145)
KristofferC Nov 13, 2023
8e5136f
set VERSION to 1.9.4 (#52153)
KristofferC Nov 14, 2023
b54b2ca
add some debug output
KristofferC Oct 16, 2023
dec47a4
Parse semantic version string correctly (#49018)
staticfloat Mar 16, 2023
9cd49a3
Exclude 'build' from 'patch' in version parsing (#49059)
staticfloat Mar 20, 2023
18e2a7c
RAI: Add `RAI` as the build part of the semantic version
Nov 15, 2023
1bf3399
RAI: Track blocks and bytes allocated for GC pools
kpamnany Aug 21, 2023
7e3130f
RAI: Change task ordering behavior to prioritize older tasks
kpamnany Aug 21, 2023
6357c1b
RAI: Prepend signal number and thread ID on backtraces
kpamnany Aug 21, 2023
a58c832
Add GC stat: total_time_to_safepoint (#48867)
vchuravy Mar 21, 2023
406f1cb
Add GC metric `last_full_sweep` (#50018)
kpamnany May 31, 2023
a423292
Add GC metric `last_incremental_sweep` (#50190)
li1 Jul 6, 2023
1ac9c81
RAI: Disable huge pages for all mmap'ed memory
kpamnany Aug 21, 2023
b006695
Makes IntrusiveLinkedListSynchronized mutable to avoid allocation on …
andrebsguedes Aug 10, 2023
3e8b88b
RAI: Never use MADV_FREE
kuszmaul Aug 22, 2023
27d5305
Allocation Profiler: Types for all allocations (#50337) (#34)
NHDaly Aug 31, 2023
ca09bf7
Metric for number of live bytes in the pool allocator (#51151)
d-netto Aug 21, 2023
1e7b597
Run GC on multiple threads (#48600)
d-netto Jan 24, 2023
e1816e9
More scalable pool allocator (#50137)
d-netto Jun 25, 2023
9bdbad7
Export num_stack_mappings to track the number of in-flight stack map…
NHDaly Sep 20, 2023
e19dba6
parallelize sweeping of object pools (#51282)
d-netto Sep 26, 2023
3fcefe7
don't print task backtrace for GC threads (#51413) (#78)
kpamnany Sep 26, 2023
f04ba29
add support for async backtraces of Tasks on any thread (#51430)
vtjnash Sep 25, 2023
10820d4
RAI: Remove GCChecker annotations
kpamnany Sep 26, 2023
905e4e9
Fix segfault if root task is NULL (#51471)
kpamnany Sep 27, 2023
bce9531
remove duplicate gc_try_claim_and_push (#49780)
d-netto May 12, 2023
d4a6a37
Backport promote objects more eagerly (#49644) (#80)
d-netto Oct 2, 2023
9e82f92
correctly track element pointer in heap snapshot (#90)
d-netto Oct 5, 2023
44d7125
Emit safepoints at function entry (#41616)
vchuravy Oct 25, 2022
b6918ed
Move safepoint emission to llvm-final-gc-lowering (#47393)
vchuravy Jan 8, 2023
8c1e694
RAI: Prepend "thread (%d) " to output from `jl_print_task_backtraces()`
kpamnany Oct 9, 2023
fe2552e
Fix dyld lock not getting unlocked on invalid threads. (#49446)
gbaraldi Apr 29, 2023
6192ed6
macOS: avoid deadlock inside dyld4 deadlock workaround (#49740)
vtjnash May 11, 2023
f3d2088
fix build failure with dyld4 deadlock workaround (#49776)
vtjnash May 12, 2023
2e444bf
Add heartbeat capability
kpamnany Oct 7, 2023
56f0e02
Make mark_obj32 like the 16 and 8 bit function by (#49240)
gbaraldi Apr 4, 2023
4db8041
eagerly update pool live bytes metric (#105) (#115)
d-netto Dec 7, 2023
13effd9
bugfix: load jl_n_threads in jl_gc_pool_live_bytes (#52034) (#106)
d-netto Nov 6, 2023
0210774
bugfix: don't set pool_live_bytes to zero at the end of GC (#107)
d-netto Nov 7, 2023
3419dfb
Change heartbeat thread controls
kpamnany Nov 12, 2023
d6b858b
add some instrumentation to measure page utilization per size class (…
d-netto Dec 4, 2023
e1971d4
add a compile-time option to enable 4k page sizes (#52229) (#111)
d-netto Dec 5, 2023
d17cfc7
functionality to expose page utilization at the julia level (#113)
d-netto Dec 6, 2023
42a3057
backport memory pressure callback to 1.9 (#114)
d-netto Dec 13, 2023
7f875cd
GC scheduler refinements (#52294) (#117)
d-netto Dec 14, 2023
b5abab4
export `jl_gc_set_max_memory` (#47545) (#124)
d-netto Dec 21, 2023
86cb433
page profile (#123)
d-netto Dec 29, 2023
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
2 changes: 1 addition & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ endif
JULIA_VERSION := $(shell cat $(JULIAHOME)/VERSION)
JULIA_MAJOR_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 1)
JULIA_MINOR_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 2)
JULIA_PATCH_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 3)
JULIA_PATCH_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'+' -f 1 | cut -d'.' -f 3)

# libjulia's SONAME will follow the format libjulia.so.$(SOMAJOR). Before v1.0.0,
# SOMAJOR will be a two-decimal value, e.g. libjulia.so.0.5, whereas at and beyond
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Compiler/Runtime improvements
* All uses of the `@pure` macro in `Base` have been replaced with the now-preferred `Base.@assume_effects` ([#44776]).
* `invoke(f, invokesig, args...)` calls to a less-specific method than would normally be chosen
for `f(args...)` are no longer spuriously invalidated when loading package precompile files ([#46010]).
* The mark phase of the Garbage Collector is now multi-threaded ([#48600]).

Command-line option changes
---------------------------
Expand All @@ -49,6 +50,8 @@ Command-line option changes
number of interactive threads to create (`auto` currently means 1) ([#42302]).
* New option `--heap-size-hint=<size>` suggests a size limit to invoke garbage collection more eagerly.
The size may be specified in bytes, kilobytes (1000k), megabytes (300M), or gigabytes (1.5G) ([#45369]).
* New option `--gcthreads` to set how many threads will be used by the Garbage Collector ([#48600]).
The default is set to `N/2` where `N` is the amount of worker threads (`--threads`) used by Julia.

Multi-threading changes
-----------------------
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.3
1.9.4+RAI
1 change: 1 addition & 0 deletions base/options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ struct JLOptions
cpu_target::Ptr{UInt8}
nthreadpools::Int16
nthreads::Int16
ngcthreads::Int16
nthreads_per_pool::Ptr{Int16}
nprocs::Int32
machine_file::Ptr{UInt8}
Expand Down
2 changes: 1 addition & 1 deletion base/partr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function multiq_sift_down(heap::taskheap, idx::Int32)
child = Int(child)
child > length(heap.tasks) && break
if isassigned(heap.tasks, child) &&
heap.tasks[child].priority < heap.tasks[idx].priority
heap.tasks[child].priority <= heap.tasks[idx].priority
t = heap.tasks[idx]
heap.tasks[idx] = heap.tasks[child]
heap.tasks[child] = t
Expand Down
3 changes: 3 additions & 0 deletions base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,7 @@ struct CodegenParams
prefer_specsig::Cint
gnu_pubnames::Cint
debug_info_kind::Cint
safepoint_on_entry::Cint

lookup::Ptr{Cvoid}

Expand All @@ -1100,12 +1101,14 @@ struct CodegenParams
function CodegenParams(; track_allocations::Bool=true, code_coverage::Bool=true,
prefer_specsig::Bool=false,
gnu_pubnames=true, debug_info_kind::Cint = default_debug_info_kind(),
safepoint_on_entry::Bool=true,
lookup::Ptr{Cvoid}=cglobal(:jl_rettype_inferred),
generic_context = nothing)
return new(
Cint(track_allocations), Cint(code_coverage),
Cint(prefer_specsig),
Cint(gnu_pubnames), debug_info_kind,
Cint(safepoint_on_entry),
lookup, generic_context)
end
end
Expand Down
2 changes: 1 addition & 1 deletion base/task.jl
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ end

## scheduler and work queue

struct IntrusiveLinkedListSynchronized{T}
mutable struct IntrusiveLinkedListSynchronized{T}
queue::IntrusiveLinkedList{T}
lock::Threads.SpinLock
IntrusiveLinkedListSynchronized{T}() where {T} = new(IntrusiveLinkedList{T}(), Threads.SpinLock())
Expand Down
7 changes: 7 additions & 0 deletions base/threadingconstructs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ function threadpooltids(pool::Symbol)
end
end

"""
Threads.ngcthreads() -> Int

Returns the number of GC threads currently configured.
"""
ngcthreads() = Int(unsafe_load(cglobal(:jl_n_gcthreads, Cint))) + 1

function threading_run(fun, static)
ccall(:jl_enter_threaded_region, Cvoid, ())
n = threadpoolsize()
Expand Down
10 changes: 10 additions & 0 deletions base/timing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ struct GC_Num
max_memory ::Int64
time_to_safepoint ::Int64
max_time_to_safepoint ::Int64
total_time_to_safepoint ::Int64
sweep_time ::Int64
mark_time ::Int64
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 Expand Up @@ -96,6 +99,13 @@ function gc_live_bytes()
Int(ccall(:jl_gc_live_bytes, Int64, ())) + num.allocd + num.deferred_alloc
end

# must be kept in sync with the value from `src/julia_threads.h``
const JL_GC_N_MAX_POOLS = 51
function gc_page_utilization_data()
page_utilization_raw = cglobal(:jl_gc_page_utilization_stats, Float64)
return Base.unsafe_wrap(Array, page_utilization_raw, JL_GC_N_MAX_POOLS, own=false)
end

"""
Base.jit_total_bytes()

Expand Down
4 changes: 2 additions & 2 deletions contrib/generate_precompile.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

if Threads.maxthreadid() != 1
@warn "Running this file with multiple Julia threads may lead to a build error" Base.maxthreadid()
@warn "Running this file with multiple Julia threads may lead to a build error" Base.Threads.maxthreadid()
end

if Base.isempty(Base.ARGS) || Base.ARGS[1] !== "0"
Expand Down Expand Up @@ -245,7 +245,7 @@ const HELP_PROMPT = "help?> "

function generate_precompile_statements()
start_time = time_ns()
debug_output = devnull # or stdout
debug_output = stdout
sysimg = Base.unsafe_string(Base.JLOptions().image_file)

# Extract the precompile statements from the precompile file
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d9630229362baeff301c473bb3e05905
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d8d421d9cce00fddaddbe88ae02076c58f5a669064b197092ceab6051c26fb3aab42f03be3f945dc5dbf376ee0d0a29c33208121e20b3e613a92311ca171828d

This file was deleted.

This file was deleted.

5 changes: 5 additions & 0 deletions doc/man/julia.1
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ supported (Linux and Windows). If this is not supported (macOS) or
process affinity is not configured, it uses the number of CPU
threads.

.TP
--gcthreads <n>
Enable n GC threads; If unspecified is set to half of the
compute worker threads.

.TP
-p, --procs {N|auto}
Integer value N launches N additional local worker processes `auto` launches as many workers
Expand Down
1 change: 1 addition & 0 deletions doc/src/base/multi-threading.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Base.Threads.nthreads
Base.Threads.threadpool
Base.Threads.nthreadpools
Base.Threads.threadpoolsize
Base.Threads.ngcthreads
```

See also [Multi-Threading](@ref man-multithreading).
Expand Down
5 changes: 3 additions & 2 deletions doc/src/manual/command-line-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ The following is a complete list of command-line switches available when launchi
|`-e`, `--eval <expr>` |Evaluate `<expr>`|
|`-E`, `--print <expr>` |Evaluate `<expr>` and display the result|
|`-L`, `--load <file>` |Load `<file>` immediately on all processors|
|`-t`, `--threads {N\|auto`} |Enable N threads; `auto` tries to infer a useful default number of threads to use but the exact behavior might change in the future. Currently, `auto` uses the number of CPUs assigned to this julia process based on the OS-specific affinity assignment interface, if supported (Linux and Windows). If this is not supported (macOS) or process affinity is not configured, it uses the number of CPU threads.|
|`-p`, `--procs {N\|auto`} |Integer value N launches N additional local worker processes; `auto` launches as many workers as the number of local CPU threads (logical cores)|
|`-t`, `--threads {N\|auto}` |Enable N threads; `auto` tries to infer a useful default number of threads to use but the exact behavior might change in the future. Currently, `auto` uses the number of CPUs assigned to this julia process based on the OS-specific affinity assignment interface, if supported (Linux and Windows). If this is not supported (macOS) or process affinity is not configured, it uses the number of CPU threads.|
| `--gcthreads {N}` |Enable N GC threads; If unspecified is set to half of the compute worker threads.|
|`-p`, `--procs {N\|auto}` |Integer value N launches N additional local worker processes; `auto` launches as many workers as the number of local CPU threads (logical cores)|
|`--machine-file <file>` |Run processes on hosts listed in `<file>`|
|`-i` |Interactive mode; REPL runs and `isinteractive()` is true|
|`-q`, `--quiet` |Quiet startup: no banner, suppress REPL warnings|
Expand Down
8 changes: 8 additions & 0 deletions doc/src/manual/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,14 @@ then spinning threads never sleep. Otherwise, `$JULIA_THREAD_SLEEP_THRESHOLD` is
interpreted as an unsigned 64-bit integer (`uint64_t`) and gives, in
nanoseconds, the amount of time after which spinning threads should sleep.

### [`JULIA_NUM_GC_THREADS`](@id env-gc-threads)

Sets the number of threads used by Garbage Collection. If unspecified is set to
half of the number of worker threads.

!!! compat "Julia 1.10"
The environment variable was added in 1.10

### `JULIA_EXCLUSIVE`

If set to anything besides `0`, then Julia's thread policy is consistent with
Expand Down
9 changes: 9 additions & 0 deletions doc/src/manual/multi-threading.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ julia> Threads.threadid()
three processes have 2 threads enabled. For more fine grained control over worker
threads use [`addprocs`](@ref) and pass `-t`/`--threads` as `exeflags`.

### Multiple GC Threads

The Garbage Collector (GC) can use multiple threads. The amount used is either half the number
of compute worker threads or configured by either the `--gcthreads` command line argument or by using the
[`JULIA_NUM_GC_THREADS`](@ref env-gc-threads) environment variable.

!!! compat "Julia 1.10"
The `--gcthreads` command line argument requires at least Julia 1.10.

## [Threadpools](@id man-threadpools)

When a program's threads are busy with many tasks to run, tasks may experience
Expand Down
117 changes: 116 additions & 1 deletion doc/src/manual/profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,122 @@ the amount of memory allocated by each line of code.

### Line-by-Line Allocation Tracking

To measure allocation line-by-line, start Julia with the `--track-allocation=<setting>` command-line
While [`@time`](@ref) logs high-level stats about memory usage and garbage collection over the course
of evaluating an expression, it can be useful to log each garbage collection event, to get an
intuitive sense of how often the garbage collector is running, how long it's running each time,
and how much garbage it collects each time. This can be enabled with
[`GC.enable_logging(true)`](@ref), which causes Julia to log to stderr every time
a garbage collection happens.

### [Allocation Profiler](@id allocation-profiler)

!!! compat "Julia 1.8"
This functionality requires at least Julia 1.8.

The allocation profiler records the stack trace, type, and size of each
allocation while it is running. It can be invoked with
[`Profile.Allocs.@profile`](@ref).

This information about the allocations is returned as an array of `Alloc`
objects, wrapped in an `AllocResults` object. The best way to visualize these is
currently with the [PProf.jl](https://github.com/JuliaPerf/PProf.jl) and
[ProfileCanvas.jl](https://github.com/pfitzseb/ProfileCanvas.jl) packages, which
can visualize the call stacks which are making the most allocations.

The allocation profiler does have significant overhead, so a `sample_rate`
argument can be passed to speed it up by making it skip some allocations.
Passing `sample_rate=1.0` will make it record everything (which is slow);
`sample_rate=0.1` will record only 10% of the allocations (faster), etc.

!!! compat "Julia 1.11"

Older versions of Julia could not capture types in all cases. In older versions of
Julia, if you see an allocation of type `Profile.Allocs.UnknownType`, it means that
the profiler doesn't know what type of object was allocated. This mainly happened when
the allocation was coming from generated code produced by the compiler. See
[issue #43688](https://github.com/JuliaLang/julia/issues/43688) for more info.

Since Julia 1.11, all allocations should have a type reported.

For more details on how to use this tool, please see the following talk from JuliaCon 2022:
https://www.youtube.com/watch?v=BFvpwC8hEWQ

##### Allocation Profiler Example

In this simple example, we use PProf to visualize the alloc profile. You could use another
visualization tool instead. We collect the profile (specifying a sample rate), then we visualize it.
```julia
using Profile, PProf
Profile.Allocs.clear()
Profile.Allocs.@profile sample_rate=0.0001 my_function()
PProf.Allocs.pprof()
```

Here is a more in-depth example, showing how we can tune the sample rate. A
good number of samples to aim for is around 1 - 10 thousand. Too many, and the
profile visualizer can get overwhelmed, and profiling will be slow. Too few,
and you don't have a representative sample.


```julia-repl
julia> import Profile

julia> @time my_function() # Estimate allocations from a (second-run) of the function
0.110018 seconds (1.50 M allocations: 58.725 MiB, 17.17% gc time)
500000

julia> Profile.Allocs.clear()

julia> Profile.Allocs.@profile sample_rate=0.001 begin # 1.5 M * 0.001 = ~1.5K allocs.
my_function()
end
500000

julia> prof = Profile.Allocs.fetch(); # If you want, you can also manually inspect the results.

julia> length(prof.allocs) # Confirm we have expected number of allocations.
1515

julia> using PProf # Now, visualize with an external tool, like PProf or ProfileCanvas.

julia> PProf.Allocs.pprof(prof; from_c=false) # You can optionally pass in a previously fetched profile result.
Analyzing 1515 allocation samples... 100%|████████████████████████████████| Time: 0:00:00
Main binary filename not available.
Serving web UI on http://localhost:62261
"alloc-profile.pb.gz"
```
Then you can view the profile by navigating to http://localhost:62261, and the profile is saved to disk.
See PProf package for more options.

##### Allocation Profiling Tips

As stated above, aim for around 1-10 thousand samples in your profile.

Note that we are uniformly sampling in the space of _all allocations_, and are not weighting
our samples by the size of the allocation. So a given allocation profile may not give a
representative profile of where most bytes are allocated in your program, unless you had set
`sample_rate=1`.

Allocations can come from users directly constructing objects, but can also come from inside
the runtime or be inserted into compiled code to handle type instability. Looking at the
"source code" view can be helpful to isolate them, and then other external tools such as
[`Cthulhu.jl`](https://github.com/JuliaDebug/Cthulhu.jl) can be useful for identifying the
cause of the allocation.

##### Allocation Profile Visualization Tools

There are several profiling visualization tools now that can all display Allocation
Profiles. Here is a small list of some of the main ones we know about:
- [PProf.jl](https://github.com/JuliaPerf/PProf.jl)
- [ProfileCanvas.jl](https://github.com/pfitzseb/ProfileCanvas.jl)
- VSCode's built-in profile visualizer (`@profview_allocs`) [docs needed]
- Viewing the results directly in the REPL
- You can inspect the results in the REPL via [`Profile.Allocs.fetch()`](@ref), to view
the stacktrace and type of each allocation.

#### Line-by-Line Allocation Tracking

An alternative way to measure allocations is to start Julia with the `--track-allocation=<setting>` command-line
option, for which you can choose `none` (the default, do not measure allocation), `user` (measure
memory allocation everywhere except Julia's core code), or `all` (measure memory allocation at
each line of Julia code). Allocation gets measured for each line of compiled code. When you quit
Expand Down
8 changes: 4 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ endif
SRCS := \
jltypes gf typemap smallintset ast builtins module interpreter symbol \
dlload sys init task array staticdata toplevel jl_uv datatype \
simplevector runtime_intrinsics precompile jloptions \
threading partr stackwalk gc gc-debug gc-pages gc-stacks gc-alloc-profiler method \
simplevector runtime_intrinsics precompile jloptions mtarraylist \
threading partr stackwalk gc gc-debug gc-pages gc-stacks gc-alloc-profiler gc-page-profiler method \
jlapi signal-handling safepoint timing subtype rtutils gc-heap-snapshot \
crc32c APInt-C processor ircode opaque_closure codegen-stubs coverage runtime_ccall

Expand Down Expand Up @@ -99,7 +99,7 @@ ifeq ($(USE_SYSTEM_LIBUV),0)
UV_HEADERS += uv.h
UV_HEADERS += uv/*.h
endif
PUBLIC_HEADERS := $(BUILDDIR)/julia_version.h $(wildcard $(SRCDIR)/support/*.h) $(addprefix $(SRCDIR)/,julia.h julia_assert.h julia_threads.h julia_fasttls.h julia_locks.h julia_atomics.h jloptions.h)
PUBLIC_HEADERS := $(BUILDDIR)/julia_version.h $(wildcard $(SRCDIR)/support/*.h) $(addprefix $(SRCDIR)/,work-stealing-queue.h julia.h julia_assert.h julia_threads.h julia_fasttls.h julia_locks.h julia_atomics.h jloptions.h)
ifeq ($(OS),WINNT)
PUBLIC_HEADERS += $(addprefix $(SRCDIR)/,win32_ucontext.h)
endif
Expand Down Expand Up @@ -353,7 +353,7 @@ $(BUILDDIR)/julia_version.h: $(JULIAHOME)/VERSION
@echo "#ifndef JL_VERSION_H" >> $@.$(JULIA_BUILD_MODE).tmp
@echo "#define JL_VERSION_H" >> $@.$(JULIA_BUILD_MODE).tmp
@echo "#define JULIA_VERSION_STRING" \"$(JULIA_VERSION)\" >> $@.$(JULIA_BUILD_MODE).tmp
@echo $(JULIA_VERSION) | awk 'BEGIN {FS="[.,-]"} \
@echo $(JULIA_VERSION) | awk 'BEGIN {FS="[.,+-]"} \
{print "#define JULIA_VERSION_MAJOR " $$1 "\n" \
"#define JULIA_VERSION_MINOR " $$2 "\n" \
"#define JULIA_VERSION_PATCH " $$3 ; \
Expand Down
1 change: 0 additions & 1 deletion src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3933,7 +3933,6 @@ static Value *emit_defer_signal(jl_codectx_t &ctx)
return ctx.builder.CreateInBoundsGEP(ctx.types().T_sigatomic, ptls, ArrayRef<Value*>(offset), "jl_defer_signal");
}


#ifndef JL_NDEBUG
static int compare_cgparams(const jl_cgparams_t *a, const jl_cgparams_t *b)
{
Expand Down
7 changes: 6 additions & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,7 @@ extern "C" {
1,
#endif
(int) DICompileUnit::DebugEmissionKind::FullDebug,
1,
jl_rettype_inferred, NULL };
}

Expand Down Expand Up @@ -7805,7 +7806,11 @@ static jl_llvm_functions_t
ctx.builder.CreateAlignedStore(load_world, world_age_field, Align(sizeof(size_t)));
}

// step 11b. Do codegen in control flow order
// step 11b. Emit the entry safepoint
if (JL_FEAT_TEST(ctx, safepoint_on_entry))
emit_gc_safepoint(ctx.builder, get_current_ptls(ctx), ctx.tbaa().tbaa_const);

// step 11c. Do codegen in control flow order
std::vector<int> workstack;
std::map<int, BasicBlock*> BB;
std::map<size_t, BasicBlock*> come_from_bb;
Expand Down
Loading