Tell stacker about the correct initial stack size - #158754
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Tell stacker about the correct initial stack size
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (6a21530): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (primary 3.2%, secondary -1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 485.944s -> 486.323s (0.08%) |
I've been debugging #138889, and I think this is a fix.
Android is not supported by
stacker. So it ends up in the fallback case, wherestackercannot determine what the initial stack size is. So the first call tostacker::maybe_growallocates a stack of the passed-in size. On Android, this would immediately shrink the initial stack size from 8 MB from 1 MB, and then we blow the (now much smaller) stack with recursive calls.I think the problem in the compiler is that we should never pass
stacker::maybe_growa stack size that is smaller than the current stack, so I've moved code around so that theSTACK_SIZEstatic that we set when the compiler is initialized inrustc_interfacecan be shared byrustc_data_structures.I think the
cfg(aix)was added in #131116 to fix the same problem, so it shouldn't be required anymore.target_os = "aix"is also unsupported bystacker.