Commit Graph

6674 Commits

Author SHA1 Message Date
Ralf Jung
d5f1c26380 rustup; ptr atomics 2022-07-06 21:38:52 -04:00
bors
8c7114841c Auto merge of #2339 - RalfJung:rustup, r=RalfJung
rustup
2022-07-06 18:07:57 +00:00
Ralf Jung
501a6b4687 rustup 2022-07-06 14:06:15 -04:00
bors
7d5ae091cb Auto merge of #2338 - RalfJung:format, r=RalfJung
tweak format strings
2022-07-06 13:49:46 +00:00
Ralf Jung
907a003f14 tweak format strings 2022-07-06 09:47:48 -04:00
bors
36d8f5cbfc Auto merge of #2336 - RalfJung:wide-ptr-compare, r=RalfJung
fix comparing wide raw pointers

Fixes https://github.com/rust-lang/rust/issues/96169

However I am not sure if these are the correct semantics. I'll wait for confirmation in that issue.
2022-07-06 12:16:25 +00:00
bors
6fcf4826de Auto merge of #2337 - RalfJung:rustup, r=RalfJung
rustup

Adds a regression test for https://github.com/rust-lang/rust/issues/96185
2022-07-06 02:30:17 +00:00
Ralf Jung
de2915bba7 rustup 2022-07-05 22:29:38 -04:00
Ralf Jung
6c8ad4abc9 fix comparing wide raw pointers 2022-07-05 21:21:02 -04:00
bors
1118d94bdf Auto merge of #2335 - RalfJung:rustup, r=RalfJung
rustup
2022-07-05 22:17:31 +00:00
Ralf Jung
f3f4bafa1b rustup 2022-07-05 18:16:20 -04:00
bors
35399c6a5d Auto merge of #2323 - RalfJung:box-is-special, r=RalfJung
handle Box with allocators

This is the Miri side of https://github.com/rust-lang/rust/pull/98847.

Thanks `@DrMeepster` for doing most of the work of getting this test case to pass in Miri. :)
2022-07-05 12:35:03 +00:00
Ralf Jung
2931e0fd63 handle Box with allocators 2022-07-05 08:34:41 -04:00
bors
1a60a7dc89 Auto merge of #2334 - RalfJung:range, r=RalfJung
we don't need HexRange any more
2022-07-05 11:56:14 +00:00
Ralf Jung
a07398d441 we don't need HexRange any more 2022-07-05 07:38:42 -04:00
bors
723fa96c8d Auto merge of #2329 - RalfJung:benches, r=oli-obk
add command to run our benchmarks

This is quite ad-hoc but better than nothing IMO.
I have also deleted the old `benches` folder. Some of these tests have UB 😂 and the rest doesn't seem very useful to benchmark the things that are slow about Miri today.

Cc `@saethlin`
2022-07-05 11:29:55 +00:00
bors
178e7f3f33 Auto merge of #2333 - rust-lang:miriup, r=oli-obk
Bump rust version

rustc changes: https://github.com/rust-lang/rust/pull/98811

rustc issue: https://github.com/rust-lang/rust/issues/98922
2022-07-05 10:18:54 +00:00
Oli Scherer
afb937ab25 Bump rust version 2022-07-05 10:17:43 +00:00
bors
4dacf5ae64 Auto merge of #2330 - RalfJung:notex, r=oli-obk
remove ancient tex files

These are the sources of `@solson's` original report, I think. They will remain available in the git history, but I don't think there is much point in still carrying them around on master. The readme links to their rendered PDFs:
- https://solson.me/miri-slides.pdf
- https://solson.me/miri-report.pdf
2022-07-05 08:28:17 +00:00
Ralf Jung
6083963b4b do not enable expensive-debug-assertions in installed Miri in CI 2022-07-04 20:14:07 -04:00
Ralf Jung
b2e64653eb ensure that benchmarks can actually run 2022-07-04 19:40:44 -04:00
Ralf Jung
6ec8909fdb less silly Cargo.toml 2022-07-04 19:26:43 -04:00
bors
b93a70fe3f Auto merge of #2331 - RalfJung:trophy, r=RalfJung
trophy case++
2022-07-04 20:11:17 +00:00
Ralf Jung
58b6e592a2 trophy case++ 2022-07-04 16:10:57 -04:00
Ralf Jung
722c229c42 add a simple benchmark with concurrency 2022-07-04 15:58:55 -04:00
Ralf Jung
97dd53d5ef remove ancient tex files 2022-07-04 15:26:02 -04:00
Ralf Jung
d7a9989f52 add command to run our benchmarks 2022-07-04 15:23:31 -04:00
Ralf Jung
04a0135af7 make unicode benchmark not take 20s 2022-07-04 15:12:40 -04:00
Ralf Jung
25cbfcc5be delete ancient benchmarks 2022-07-04 15:11:14 -04:00
bors
709e29a167 Auto merge of #2327 - RalfJung:unit-return, r=RalfJung
call_function: make the unit-return-type case more convenient
2022-07-04 17:47:28 +00:00
Ralf Jung
22aa7f98c5 call_function: make the unit-return-type case more convenient 2022-07-04 13:46:11 -04:00
bors
f338e62e57 Auto merge of #2326 - RalfJung:vscode, r=RalfJung
update vscode settings

Following [this recommendation](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/.22target.22.20directory.20in.20rustc.20tree.3F/near/288428273)
Cc https://github.com/rust-lang/rustc-dev-guide/pull/1384
2022-07-04 17:07:46 +00:00
Ralf Jung
0ce1e14c89 update vscode settings 2022-07-04 13:07:18 -04:00
bors
984b46cc7d Auto merge of #2320 - RalfJung:less-rebuilds, r=RalfJung
reduce regex features to reduce rebuilds

Helps with the issue I [mentioned on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/Miri.20rebuilds/near/287442340).
2022-07-03 16:31:49 +00:00
Ralf Jung
248a10eaf5 reduce regex features to reduce rebuilds 2022-07-03 12:28:57 -04:00
bors
2e20cae150 Auto merge of #2319 - RalfJung:dont-touch-vtables, r=RalfJung
fix retagging of vtable ptrs

Fixes a problem reported by `@saethlin` on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/Stacked.20Borrows.20field.20retagging/near/288040048).
2022-07-03 15:56:55 +00:00
Ralf Jung
a4e7e1e6b5 fix retagging of vtable ptrs 2022-07-03 11:56:29 -04:00
bors
8d53314233 Auto merge of #2318 - RalfJung:nodoc, r=RalfJung
there are no doctests in ui_test

It tries to run doctests which leads to an error when testing against a locally built rustc (that has no rustdoc).
2022-07-03 15:03:19 +00:00
Ralf Jung
2fc9278818 no doctests in ui_test 2022-07-03 10:45:39 -04:00
bors
cfad9d12f3 Auto merge of #1935 - saethlin:optimize-sb, r=RalfJung
Optimizing Stacked Borrows (part 1?): Cache locations of Tags in a Borrow Stack

Before this PR, a profile of Miri under almost any workload points quite squarely at these regions of code as being incredibly hot (each being ~40% of cycles):

dadcbebfbd/src/stacked_borrows.rs (L259-L269)

dadcbebfbd/src/stacked_borrows.rs (L362-L369)

This code is one of at least three reasons that stacked borrows analysis is super-linear: These are both linear in the number of borrows in the stack and they are positioned along the most commonly-taken paths.

I'm addressing the first loop (which is in `Stack::find_granting`) by adding a very very simple sort of LRU cache implemented on a `VecDeque`, which maps recently-looked-up tags to their position in the stack. For `Untagged` access we fall back to the same sort of linear search. But as far as I can tell there are never enough `Untagged` items to be significant.

I'm addressing the second loop by keeping track of the region of stack where there could be items granting `Permission::Unique`. This optimization is incredibly effective because `Read` access tends to dominate and many trips through this code path now skip the loop entirely.

These optimizations result in pretty enormous improvements:
Without raw pointer tagging, `mse` 34.5s -> 2.4s, `serde1` 5.6s -> 3.6s
With raw pointer tagging, `mse` 35.3s -> 2.4s, `serde1` 5.7s -> 3.6s

And there is hardly any impact on memory usage:
Memory usage on `mse` 844 MB -> 848 MB, `serde1` 184 MB -> 184 MB (jitter on these is a few MB).
2022-07-03 14:39:22 +00:00
bors
5382f463a6 Auto merge of #2316 - domenicquirl:readme-track-tag, r=RalfJung
Clarify the effect of the `-Zmiri-track-pointer-tag` flag in the README

Edit the README to explicitly say that the `-Zmiri-track-pointer-tag` flag also tracks the creation of tags, not just when they are popped/invalidated.

Related to https://github.com/rust-lang/miri/pull/2308 / https://github.com/Manishearth/triomphe/issues/38.
2022-07-03 14:07:27 +00:00
DQ
1b9e19a39b
clarify that a (tracked) tag may never be popped
Co-authored-by: Ralf Jung <post@ralfj.de>
2022-07-03 15:47:39 +02:00
bors
e86cd1a246 Auto merge of #2317 - RalfJung:this-is-not-a-std-test-suite, r=RalfJung
move arc_drop test to miri-test-libstd

That's where we have a bunch of slow and unlikely-to-regress tests already. Miri's test suite should primarily test Miri; we sometimes add libstd tests when they are cheap and/or exercise interesting code paths in Miri. https://github.com/rust-lang/miri/pull/2248 already ensures that we allow code like `Arc` with more direct tests.
2022-07-03 12:36:04 +00:00
Ralf Jung
e71f8b0630 fix ./miri run with MIRI_TEST_TARGET 2022-07-03 08:35:44 -04:00
Ralf Jung
c6f44c1639 another one for the trophy case 2022-07-03 08:18:03 -04:00
Ralf Jung
5f7bc9739b move arc_drop test to miri-test-libstd
and make weak memory consistency test a bit faster again
2022-07-03 08:13:58 -04:00
DQ
672d721544
Clarify -Zmiri-track-pointer-tag
to explicitly say it also tracks tag creation
2022-07-03 11:32:36 +02:00
Ben Kimock
b004a03bdb Typo 2022-07-02 20:45:27 -04:00
Ben Kimock
f3b479d556 Explain cache behavior a bit better, clean up diff 2022-07-02 19:44:55 -04:00
bors
c674f2604b Auto merge of #2312 - RalfJung:misc, r=RalfJung
put call to stacked borrows end_call in a more sensible place

This looks like a refactoring accident.
2022-07-02 22:38:36 +00:00