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

WIP cargo dev bless for x.py (on my own Rust checkout) #1

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

phansch
Copy link
Owner

@phansch phansch commented Dec 29, 2020

No description provided.

Before, `clippy_project_root` worked by ascending the path from the build
directory. This worked as long as it was executed from the Clippy
checkout as the Clippy build directory is part of the Clippy checkout.

It didn't work when executed from the rust checkout because the Rust
build directory is at `./rust/build/` which doesn't have the Clippy project
at in the ancestors.

The solution to make the function behave the same in the Rust checkout,
is to ascend from the `CARGO_MANIFEST_DIR` instead.

This commit passed Clippy CI: rust-lang/rust-clippy#6512
phansch pushed a commit that referenced this pull request Mar 9, 2021
bypass auto_da_alloc for metadata files

This saves about 0.7% when rerunning the UI test suite. I.e. when the metadata files exist and will be overwritten. No improvements expected for a clean build. So it might show up in incr-patched perf results.
```
regular rename:

Benchmark #1: touch src/tools/compiletest/src/main.rs ; RUSTC_WRAPPER="" schedtool -B -e ./x.py test src/test/ui
  Time (mean ± σ):     47.305 s ±  0.170 s    [User: 1631.540 s, System: 412.648 s]
  Range (min … max):   47.125 s … 47.856 s    20 runs

non-durable rename:

Benchmark #1: touch src/tools/compiletest/src/main.rs ; RUSTC_WRAPPER="" schedtool -B -e ./x.py test src/test/ui
  Time (mean ± σ):     46.930 s ±  0.064 s    [User: 1634.344 s, System: 396.038 s]
  Range (min … max):   46.759 s … 47.043 s    20 runs
```

There are more places that trigger auto_da_alloc behavior by overwriting existing files with O_TRUNC, but those are much harder to locate because `O_TRUNC` is set on `open()` but the writeback is triggered on `close()`. The latter is the part which shows up in profiles.
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.

1 participant