forked from mmtk/mmtk-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
158 lines (130 loc) · 5.7 KB
/
Cargo.toml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
[package]
name = "mmtk"
version = "0.18.0"
authors = ["The MMTk Developers <>"]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "MMTk is a framework for the design and implementation of high-performance and portable memory managers."
homepage = "https://www.mmtk.io"
repository = "https://github.com/mmtk/mmtk-core"
readme = "README.md"
categories = ["memory-management"]
keywords = ["gc", "garbage", "collection", "garbage-collection", "allocation"]
rust-version = "1.61.0"
build = "build.rs"
[lib]
name = "mmtk"
crate-type = ["rlib"]
doctest = false
[dependencies]
atomic = "0.5.1"
atomic_refcell = "0.1.7"
atomic-traits = "0.3.0"
cfg-if = "1.0"
crossbeam = "0.8.1"
delegate = "0.9.0"
downcast-rs = "1.1.1"
enum-map = "2.4.2"
env_logger = "0.10.0"
itertools = "0.10.5"
jemalloc-sys = { version = "0.5.3", features = ["disable_initial_exec_tls"], optional = true }
lazy_static = "1.1"
libc = "0.2"
log = { version = "0.4", features = ["max_level_trace", "release_max_level_off"] }
mimalloc-sys = { version = "0.1.6", optional = true }
# MMTk macros
mmtk-macros = { version = "0.18.0", path = "macros/" }
num_cpus = "1.8"
num-traits = "0.2"
pfm = { version = "0.1.0-beta.3", optional = true }
regex = "1.7.0"
spin = "0.9.5"
static_assertions = "1.1.0"
strum = "0.24"
strum_macros = "0.24"
sysinfo = "0.29"
[dev-dependencies]
paste = "1.0.8"
rand = "0.8.5"
[build-dependencies]
# Fix to 0.6.0. Updating to 0.6.1 requires MSRV 1.64.
built = { version = "=0.6.0", features = ["git2"] }
[features]
default = []
# This feature is only supported on x86-64 for now
# It's manually added to CI scripts
perf_counter = ["pfm"]
# .github/scripts/ci-common.sh extracts features from the following part (including from comments).
# So be careful when editing or adding stuff to the section below.
# Do not modify the following line - ci-common.sh matches it
# -- Non mutually exclusive features --
# spaces with different semantics
# A VM-allocated/managed space. A binding could use this for their boot image, metadata space, etc.
# FIXME: This is not properly implemented yet (it is only working for JikesRVM): https://github.com/mmtk/mmtk-core/issues/415
# If a binding would need to trace/scan objects that is allocated and managed by the VM, `ActivePlan::vm_trace_object()` is an alternative.
vm_space = []
# A readonly space.
# TODO: This is not properly implemented yet. We currently use an immortal space instead, and do not guarantee read-only semantics.
ro_space = []
# A code space with execution permission.
# TODO: This is not properly implemented yet. We currently use an immortal space instead, and all our spaces have execution permission at the moment.
code_space = []
# Global valid object (VO) bit metadata.
# The VO bit is set when an object is allocated, and cleared when the GC determines it is dead.
# See `src/util/metadata/vo_bit/mod.rs`
#
# eager_sweeping: VO bits for dead objects must have been cleared by the end of each GC.
# Native MarkSweep only ensures this in eager sweeping mode.
vo_bit = ["eager_sweeping"]
# conservative garbage collection support
is_mmtk_object = ["vo_bit"]
# Enable object pinning, in particular, enable pinning/unpinning, and its metadata
object_pinning = []
# The following two features are useful for using Immix for VMs that do not support moving GC.
# Disable any object copying in Immix. This makes Immix a non-moving policy.
immix_non_moving = []
# Reduce block size for ImmixSpace. This mitigates fragmentation when defrag is disabled.
immix_smaller_block = []
# Zero the unmarked lines after a GC cycle in immix. This helps debug untraced objects.
immix_zero_on_release = []
# Run sanity GC
sanity = []
# Run analysis
analysis = []
# Use lock free variant of NoGC
nogc_lock_free = []
# Use lock free with no zeroing NoGC
nogc_no_zeroing = ["nogc_lock_free"]
# For using a single GC thread
# Q: Why do we need this as a compile time flat? We can always set the number of GC threads through options.
single_worker = []
# To run expensive comprehensive runtime checks, such as checking duplicate edges
extreme_assertions = []
# Enable multiple spaces for NoGC, each allocator maps to an individual ImmortalSpace.
nogc_multi_space = []
# To collect statistics for each GC work packet. Enabling this may introduce a small overhead (several percentage slowdown on benchmark time).
work_packet_stats = []
# Count the malloc'd memory into the heap size
malloc_counted_size = []
# Do not modify the following line - ci-common.sh matches it
# -- Mutally exclusive features --
# Only one feature from each group can be provided. Otherwise build will fail.
# Name of the mutualy exclusive feature group. ci-common.sh matches lines like this one.
# Group:malloc
# only one of the following features should be enabled, or none to use the default malloc from libc
# this does not replace the global Rust allocator, but provides these libraries for GC implementation
malloc_mimalloc = ["mimalloc-sys"]
malloc_jemalloc = ["jemalloc-sys"]
# Use the native mimalloc allocator for malloc. This is not tested by me (Yi) yet, and it is only used to make sure that some code
# is not compiled in default builds.
malloc_native_mimalloc = []
# If there are more groups, they should be inserted above this line
# Group:end
# Group:marksweepallocation
# default is native allocator with lazy sweeping
eager_sweeping = []
# Use library malloc as the freelist allocator for mark sweep. This will makes mark sweep slower. As malloc may return addresses outside our
# normal heap range, we will have to use chunk-based SFT table. Turning on this feature will use a different SFT map implementation on 64bits,
# and will affect all the plans in the build. Please be aware of the consequence, and this is only meant to be experimental use.
malloc_mark_sweep = []
# Group:end