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

fix: evacuation #354

Merged
merged 12 commits into from
Dec 1, 2023
Merged

fix: evacuation #354

merged 12 commits into from
Dec 1, 2023

Conversation

Chronostasys
Copy link
Member

@Chronostasys Chronostasys commented Nov 25, 2023

fix multiple bugs in evacuation and
force gc trigger evacuation every time it collect in debug mode (so that we can find problems asap by ci test

Copy link

Benchmark for 71a3bb1

Click to view benchmark
Test Base PR %
allocation bench/malloc benchmark small objects 33.5±9.71ns 33.4±8.93ns -0.30%
allocation bench/singlethread gc alloc benchmark small objects 11.4±1.29ns 10.8±0.56ns -5.26%
multithreads(4) gc benchmark--65535 small objects(per thread) 1492.4±31.82µs 1488.8±334.76µs -0.24%
plimmixgc/multi-thread gc stress benchmark small objects 1168.0±39.49ms 1248.0±39.61ms +6.85%
plimmixgc/singlethread gc stress benchmark small objects 702.2±12.85ms 708.6±16.50ms +0.91%
singlethread gc benchmark--65535 small objects 756.6±14.52µs 867.6±10.90µs +14.67%

Copy link

Benchmark for e406465

Click to view benchmark
Test Base PR %
allocation bench/malloc benchmark small objects 33.2±8.71ns 34.5±11.00ns +3.92%
allocation bench/singlethread gc alloc benchmark small objects 11.4±1.14ns 11.0±0.39ns -3.51%
multithreads(4) gc benchmark--65535 small objects(per thread) 1549.2±77.21µs 1505.3±382.49µs -2.83%
plimmixgc/multi-thread gc stress benchmark small objects 1183.6±22.14ms 1248.1±40.65ms +5.45%
plimmixgc/singlethread gc stress benchmark small objects 737.0±20.56ms 729.0±23.68ms -1.09%
singlethread gc benchmark--65535 small objects 761.1±17.92µs 702.3±7.52µs -7.73%

Copy link

Benchmark for f6e03bc

Click to view benchmark
Test Base PR %
allocation bench/malloc benchmark small objects 35.2±13.73ns 33.5±10.03ns -4.83%
allocation bench/singlethread gc alloc benchmark small objects 11.3±1.20ns 12.0±3.15ns +6.19%
multithreads(4) gc benchmark--65535 small objects(per thread) 1517.1±42.18µs 1360.3±62.43µs -10.34%
plimmixgc/multi-thread gc stress benchmark small objects 1209.9±49.48ms 1243.9±54.63ms +2.81%
plimmixgc/singlethread gc stress benchmark small objects 732.2±20.22ms 709.3±14.43ms -3.13%
singlethread gc benchmark--65535 small objects 782.9±14.51µs 719.2±8.70µs -8.14%

Copy link

codecov bot commented Nov 26, 2023

Codecov Report

Merging #354 (f4a8fdd) into master (feb55e0) will increase coverage by 0.21%.
The diff coverage is 85.94%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #354      +/-   ##
==========================================
+ Coverage   85.82%   86.04%   +0.21%     
==========================================
  Files         108      108              
  Lines       23987    24341     +354     
==========================================
+ Hits        20587    20944     +357     
+ Misses       3400     3397       -3     
Files Coverage Δ
immix/src/allocator/big_obj_allocator.rs 97.22% <100.00%> (ø)
immix/src/collector/tests.rs 99.71% <100.00%> (+<0.01%) ⬆️
src/ast/builder/mod.rs 33.33% <ø> (ø)
src/ast/builder/no_op_builder.rs 83.75% <100.00%> (+2.17%) ⬆️
src/ast/ctx.rs 91.65% <100.00%> (+0.12%) ⬆️
src/ast/node/cast.rs 96.53% <100.00%> (+<0.01%) ⬆️
src/ast/node/function.rs 89.23% <100.00%> (+0.29%) ⬆️
src/ast/node/function/generator.rs 98.73% <100.00%> (+0.03%) ⬆️
src/ast/node/statement.rs 76.05% <100.00%> (+0.04%) ⬆️
immix/src/allocator/thread_local_allocator.rs 86.12% <97.77%> (+1.65%) ⬆️
... and 10 more

... and 2 files with indirect coverage changes

Copy link

Benchmark for 791ce33

Click to view benchmark
Test Base PR %
allocation bench/malloc benchmark small objects 33.9±10.48ns 33.8±12.14ns -0.29%
allocation bench/singlethread gc alloc benchmark small objects 11.3±0.90ns 11.5±1.13ns +1.77%
multithreads(4) gc benchmark--65535 small objects(per thread) 1700.9±365.51µs 1616.5±344.11µs -4.96%
plimmixgc/multi-thread gc stress benchmark small objects 1211.8±47.74ms 1272.4±65.09ms +5.00%
plimmixgc/singlethread gc stress benchmark small objects 799.8±13.24ms 806.4±18.60ms +0.83%
singlethread gc benchmark--65535 small objects 759.7±8.85µs 726.8±8.80µs -4.33%

@Chronostasys Chronostasys changed the title Fix/winfault eva fix: evacuation Nov 26, 2023
@Chronostasys Chronostasys marked this pull request as ready for review November 26, 2023 04:56
Copy link

Benchmark for 028b501

Click to view benchmark
Test Base PR %
allocation bench/malloc benchmark small objects 33.8±11.02ns 33.7±11.29ns -0.30%
allocation bench/singlethread gc alloc benchmark small objects 11.3±0.99ns 11.1±1.40ns -1.77%
multithreads(4) gc benchmark--65535 small objects(per thread) 1542.4±232.55µs 1532.2±392.89µs -0.66%
plimmixgc/multi-thread gc stress benchmark small objects 1192.5±61.82ms 1203.5±26.88ms +0.92%
plimmixgc/singlethread gc stress benchmark small objects 725.3±17.78ms 704.1±16.43ms -2.92%
singlethread gc benchmark--65535 small objects 768.7±6.95µs 716.0±3.43µs -6.86%

Copy link

Benchmark for 8c9fd00

Click to view benchmark
Test Base PR %
allocation bench/malloc benchmark small objects 34.5±13.27ns 34.8±14.70ns +0.87%
allocation bench/singlethread gc alloc benchmark small objects 11.3±0.32ns 11.1±1.03ns -1.77%
multithreads(4) gc benchmark--65535 small objects(per thread) 1676.5±267.70µs 1617.4±400.98µs -3.53%
plimmixgc/multi-thread gc stress benchmark small objects 1203.9±49.93ms 1245.6±57.99ms +3.46%
plimmixgc/singlethread gc stress benchmark small objects 772.5±24.34ms 764.1±26.59ms -1.09%
singlethread gc benchmark--65535 small objects 779.4±13.59µs 727.5±9.66µs -6.66%

Copy link

Benchmark for 2e2a41d

Click to view benchmark
Test Base PR %
allocation bench/malloc benchmark small objects 33.9±10.33ns 34.9±13.22ns +2.95%
allocation bench/singlethread gc alloc benchmark small objects 11.2±0.41ns 11.3±0.89ns +0.89%
multithreads(4) gc benchmark--65535 small objects(per thread) 1772.3±361.97µs 1734.0±278.64µs -2.16%
plimmixgc/multi-thread gc stress benchmark small objects 1180.7±27.08ms 1223.6±53.82ms +3.63%
plimmixgc/singlethread gc stress benchmark small objects 772.1±18.84ms 805.4±18.24ms +4.31%
singlethread gc benchmark--65535 small objects 797.5±14.07µs 760.3±5.37µs -4.66%

@Chronostasys Chronostasys requested review from CjiW, RINNE-TAN, xieyuschen and a team November 30, 2023 05:49
@@ -101,7 +101,7 @@ impl BigObjAllocator {
pub fn return_chunk(&mut self, obj: *mut BigObj) {
let _lock = self.lock.lock();
let size = unsafe { (*obj).size };
println!("ret_chunk: {:p}[size {}]", obj, size);
// println!("ret_chunk: {:p}[size {}]", obj, size);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could add a todo: use debug logger to print logs hence we don't need to comment it.

/// 所有被归还的Block都会被放到这个Vec里面
unavailable_blocks: Vec<*mut Block>,
/// 所有被归还的Block都会被放到这个Vec里面
recycle_blocks: Vec<*mut Block>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the difference between unavailable_blocks and recycle_blocks? The comments are same.

Copy link

github-actions bot commented Dec 1, 2023

Benchmark for 064194f

Click to view benchmark
Test Base PR %
allocation bench/malloc benchmark small objects 33.7±10.93ns 34.6±13.55ns +2.67%
allocation bench/singlethread gc alloc benchmark small objects 11.5±1.04ns 11.0±0.45ns -4.35%
multithreads(4) gc benchmark--65535 small objects(per thread) 1542.5±72.22µs 1732.4±488.74µs +12.31%
plimmixgc/multi-thread gc stress benchmark small objects 1187.0±45.38ms 1229.0±56.19ms +3.54%
plimmixgc/singlethread gc stress benchmark small objects 751.2±14.95ms 762.7±21.30ms +1.53%
singlethread gc benchmark--65535 small objects 775.1±56.60µs 796.1±14.75µs +2.71%

Copy link

github-actions bot commented Dec 1, 2023

Benchmark for d7bcd24

Click to view benchmark
Test Base PR %
allocation bench/malloc benchmark small objects 34.0±11.15ns 37.0±28.29ns +8.82%
allocation bench/singlethread gc alloc benchmark small objects 11.2±0.61ns 11.1±1.09ns -0.89%
multithreads(4) gc benchmark--65535 small objects(per thread) 1642.5±293.98µs 1775.4±302.30µs +8.09%
plimmixgc/multi-thread gc stress benchmark small objects 1180.8±33.91ms 1219.3±23.79ms +3.26%
plimmixgc/singlethread gc stress benchmark small objects 765.1±17.42ms 796.1±18.44ms +4.05%
singlethread gc benchmark--65535 small objects 782.0±19.46µs 818.5±17.65µs +4.67%

Copy link

github-actions bot commented Dec 1, 2023

Benchmark for d97db6c

Click to view benchmark
Test Base PR %
allocation bench/malloc benchmark small objects 33.9±10.75ns 34.3±9.18ns +1.18%
allocation bench/singlethread gc alloc benchmark small objects 11.2±0.59ns 11.0±0.81ns -1.79%
multithreads(4) gc benchmark--65535 small objects(per thread) 1609.8±375.78µs 1538.7±299.61µs -4.42%
plimmixgc/multi-thread gc stress benchmark small objects 1186.7±42.52ms 1216.9±33.54ms +2.54%
plimmixgc/singlethread gc stress benchmark small objects 728.7±15.23ms 753.0±27.06ms +3.33%
singlethread gc benchmark--65535 small objects 778.4±15.89µs 782.2±17.51µs +0.49%

@Chronostasys Chronostasys merged commit efb3de3 into master Dec 1, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants