Repository navigation
Commit 4b71ad9
committed
fix: teach analyze_trace about native_allocated and cover the accounting feature in CI
Address the third review round on the alloc-accounting feature.
- analyze_trace only matched jemalloc_allocated, so a trace from a build with
alloc-accounting and no jemalloc reported zero allocated and no excess.
It now analyzes native_allocated when present, falls back to
jemalloc_allocated otherwise, names the counter in its output, and rejects
a trace with neither. tracing.md describes the selection.
- Nothing in CI compiled the feature. The rust-test action now lints the
jemalloc,alloc-accounting build with --all-targets, runs the accounting
tests with the wrapper installed, and checks the system-allocator arm.
- lib.rs: the three backend modules only name the type; the two
global_allocator statics sit together, so the default build now installs
System explicitly. ALLOCATOR_BACKEND is doc(hidden).
- alloc_accounting.rs: inline the clamp, table-drive the settle tests, add a
realloc test that pins the size-difference accounting and the
after-delegating order, and confine the thread-exit test to the default
build, where a missing destructor is actually caught. Trim the prose.
- alloc_overhead bench: drop the redundant extern crate, run both liveness
guards from a single Once that every bench function calls, merge the two
alloc/free loops, and use iter instead of iter_batched. Benchmark IDs are
unchanged.1 parent ac51c5c commit 4b71ad9
6 files changed
Lines changed: 339 additions & 292 deletions
File tree
- .github/actions/rust-test
- docs/source/contributor-guide
- native
- common/src/bin
- core
- benches
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
90 | 93 | | |
91 | | - | |
| 94 | + | |
92 | 95 | | |
93 | | - | |
| 96 | + | |
94 | 97 | | |
95 | | - | |
| 98 | + | |
96 | 99 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | | - | |
116 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
124 | | - | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
| |||
42 | 52 | | |
43 | 53 | | |
44 | 54 | | |
45 | | - | |
| 55 | + | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
| |||
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
64 | | - | |
65 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
66 | 78 | | |
67 | 79 | | |
68 | | - | |
| 80 | + | |
69 | 81 | | |
70 | 82 | | |
71 | | - | |
| 83 | + | |
72 | 84 | | |
73 | 85 | | |
74 | 86 | | |
| |||
110 | 122 | | |
111 | 123 | | |
112 | 124 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
118 | 147 | | |
119 | 148 | | |
120 | 149 | | |
| |||
129 | 158 | | |
130 | 159 | | |
131 | 160 | | |
132 | | - | |
| 161 | + | |
133 | 162 | | |
134 | 163 | | |
135 | 164 | | |
136 | 165 | | |
137 | 166 | | |
138 | | - | |
139 | | - | |
| 167 | + | |
| 168 | + | |
140 | 169 | | |
141 | 170 | | |
142 | 171 | | |
| |||
147 | 176 | | |
148 | 177 | | |
149 | 178 | | |
150 | | - | |
| 179 | + | |
151 | 180 | | |
152 | 181 | | |
153 | 182 | | |
154 | 183 | | |
155 | 184 | | |
156 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
157 | 195 | | |
158 | 196 | | |
159 | 197 | | |
| 198 | + | |
160 | 199 | | |
161 | | - | |
| 200 | + | |
162 | 201 | | |
163 | 202 | | |
164 | 203 | | |
165 | 204 | | |
166 | 205 | | |
167 | | - | |
| 206 | + | |
168 | 207 | | |
169 | 208 | | |
170 | 209 | | |
171 | 210 | | |
172 | 211 | | |
173 | | - | |
| 212 | + | |
174 | 213 | | |
175 | 214 | | |
176 | | - | |
| 215 | + | |
177 | 216 | | |
178 | 217 | | |
179 | 218 | | |
180 | | - | |
181 | | - | |
| 219 | + | |
| 220 | + | |
182 | 221 | | |
183 | | - | |
| 222 | + | |
184 | 223 | | |
185 | | - | |
| 224 | + | |
186 | 225 | | |
187 | | - | |
| 226 | + | |
188 | 227 | | |
189 | | - | |
| 228 | + | |
190 | 229 | | |
191 | 230 | | |
192 | 231 | | |
| |||
0 commit comments