Commit Graph

6603 Commits

Author SHA1 Message Date
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
Ralf Jung
dcdf4fb6f6 readme tweaks 2022-07-02 18:38:07 -04:00
Ralf Jung
d9c441c5ab put call to stacked borrows end_call in a more sensible place 2022-07-02 18:38:07 -04:00
bors
c9925ff7f4 Auto merge of #2311 - RalfJung:many-seeds, r=RalfJung
./miri many-seeds: also print the seed before we try it

When using `cargo miri`, we otherwise have no way of even seeing which seed it is currently on.
2022-07-02 20:08:28 +00:00
Ralf Jung
733b141789 ./miri many-seeds: also print the seed before we try it 2022-07-02 16:06:23 -04:00
bors
f76ebd6feb Auto merge of #2309 - RalfJung:read_link, r=RalfJung
test fs::read_link surface function

The shim got implemented a while ago but we never ensured that that is actually what std uses.
2022-07-02 17:32:57 +00:00
Ralf Jung
b4520e4591 test fs::read_link surface function 2022-07-02 13:32:04 -04:00
Ben Kimock
7cdbf98f57 Explain the behavior of the cache upon clear 2022-07-02 13:22:22 -04:00
bors
c9d5c3f88c Auto merge of #2308 - RalfJung:ptr-tacking, r=RalfJung
pointer tag tracking: on creation, log the offsets it is created for

Hopefully this makes things like https://github.com/Manishearth/triomphe/issues/38 easier to diagnose.
2022-07-02 15:34:02 +00:00
Ralf Jung
98254f67af pointer tag tracking: on creation, log the offsets it is created for 2022-07-02 11:33:29 -04:00
bors
428245072e Auto merge of #2306 - RalfJung:unix, r=RalfJung
make some things available for all Unixes
2022-07-02 13:45:27 +00:00
Ralf Jung
5ba2c1e6be posix_fadvise is not Linux-specific 2022-07-02 09:45:00 -04:00
Ralf Jung
ae51998191 male libc.rs at least build on FreeBSD 2022-07-02 09:45:00 -04:00
Ralf Jung
98d20490f4 move some POSIX file shims from linux to unix module 2022-07-02 09:45:00 -04:00
bors
c17e68d9be Auto merge of #2300 - InfRandomness:freebsd-environ-extern-impl, r=RalfJung
Extend `environ` linux extern implementation to freebsd

This fixes the `env` test on freebsd, and enables the CI test

Signed-off-by: InfRandomness <infrandomness@gmail.com>
2022-07-02 12:57:14 +00:00
bors
24c5eaf8bc Auto merge of #2305 - RalfJung:rustup, r=RalfJung
rustup
2022-07-02 12:38:40 +00:00
Ralf Jung
c0cbb662d2 rustup 2022-07-02 08:38:07 -04:00
InfRandomness
a26be7ea5f
Enable env test on freebsd
Signed-off-by: InfRandomness <infrandomness@gmail.com>
2022-07-02 12:42:14 +02:00
InfRandomness
5ec25359ff
Add environ extern implementation to freebsd
Signed-off-by: InfRandomness <infrandomness@gmail.com>
2022-07-02 12:42:14 +02:00
bors
602a3dcefd Auto merge of #2304 - LegNeato:shim-fstat64-mac, r=oli-obk
Support (stat/fstat/lstat)64 on macos

"In order to accommodate advanced capabilities of newer file systems,
     the struct stat, struct statfs, and struct dirent data structures
     were updated in Mac OSX 10.5."

"TRANSITIONAL DESCRIPTION (NOW DEPRECATED)
     The fstat64, lstat64 and stat64 routines are equivalent to their
     corresponding non-64-suffixed routine, when 64-bit inodes are in
     effect.  They were added before there was support for the symbol
     variants, and so are now deprecated.  Instead of using these, set
     the _DARWIN_USE_64_BIT_INODE macro before including header files to
     force 64-bit inode support. The stat64 structure used by these deprecated routines is the same
     as the stat structure when 64-bit inodes are in effect (see above)."

"HISTORY
     An lstat() function call appeared in 4.2BSD.  The stat64(),
     fstat64(), and lstat64() system calls first appeared in Mac OS X
     10.5 (Leopard) and are now deprecated in favor of the corresponding
     symbol variants.  The fstatat() system call appeared in OS X 10.10"
2022-07-02 07:31:16 +00:00
Christian Legnitto
a1473ea8f5 Support (stat/fstat/lstat)64 on macos
"In order to accommodate advanced capabilities of newer file systems,
     the struct stat, struct statfs, and struct dirent data structures
     were updated in Mac OSX 10.5."

"TRANSITIONAL DESCRIPTION (NOW DEPRECATED)
     The fstat64, lstat64 and stat64 routines are equivalent to their
     corresponding non-64-suffixed routine, when 64-bit inodes are in
     effect.  They were added before there was support for the symbol
     variants, and so are now deprecated.  Instead of using these, set
     the _DARWIN_USE_64_BIT_INODE macro before including header files to
     force 64-bit inode support.

     The stat64 structure used by these deprecated routines is the same
     as the stat structure when 64-bit inodes are in effect (see above)."

"HISTORY
     An lstat() function call appeared in 4.2BSD.  The stat64(),
     fstat64(), and lstat64() system calls first appeared in Mac OS X
     10.5 (Leopard) and are now deprecated in favor of the corresponding
     symbol variants.  The fstatat() system call appeared in OS X 10.10"
2022-07-01 20:10:17 -06:00
Ben Kimock
17acc3f71c Document implementation a bit, add some fast paths 2022-07-01 20:15:34 -04:00