Commit Graph

116 Commits

Author SHA1 Message Date
Aaron Hill
16f469280e
Address review comments 2021-05-29 17:10:54 -05:00
Aaron Hill
7e9da8d30e
Add measureme integration for profiling the interpreted program
This PR uses the `measureme` crate to profile the call stack of the
program being interpreted by Miri. This is accomplished by starting a
measureme 'event' when we enter a function call, and ending the event
when we exit the call. The `measureme` tooling can be used to produce a
call stack from the generated profile data.

Limitations:
* We currently record every single entry/exit. This might generate very
  large profile outputs for programs with a large number of function
  calls. In follow-up work, we might want to explore sampling (e.g. only
  recording every N function calls).
* This does not integrate very well with Miri's concurrency support.
  Each event we record starts when we push a frame, and ends when we pop
  a frame. As a result, switching between virtual threads will cause
  events from different threads to be interleaved. Additionally, the
  recorded for a particular frame will include all of the work Miri does
  before that frame completes, including executing another thread.

The `measureme` integration is off by default, and must be enabled via
`-Zmiri-measureme=<output_name>`
2021-05-29 17:01:52 -05:00
hyd-dev
2da6bedaec
Use harness = false instead of #![feature(custom_test_frameworks)] 2021-05-01 22:28:33 +08:00
Ralf Jung
31bd77c7d8 bump miri dependencies 2021-04-04 11:48:20 +02:00
Daniel McNab
6106ee214c Add link to pr for documentation 2021-03-09 18:27:22 +00:00
Daniel McNab
1e19150d1e Opt-in to rustc_private for rust-analyzer
rust-analyzer/rust-analyzer#7891
2021-03-08 17:28:52 +00:00
Ralf Jung
6145709bfc remove miri-rustc-tests 2020-11-29 21:00:50 +01:00
JCTyBlaidd
89814f1b3f Initial data-race detector,
passes all current tests but additional tests are required
2020-11-02 02:57:05 +00:00
Ralf Jung
6be8761e47 update for major version bumps 2020-09-18 12:17:09 +02:00
Jubilee Young
20942fb3a7 Remove byteorder dependency
miri hasn't actually depended on byteorder directly for a while.
Let's remove this dependency so Rust also depends less on it.
2020-08-19 22:19:32 -07:00
Ralf Jung
35964b10b0 no workspace as that is incompatible with the rustc submodule 2020-05-28 08:53:44 +02:00
Ralf Jung
7fcf92dfea re-add some fake dependencies to avoid rebuilds 2020-05-28 08:53:44 +02:00
Ralf Jung
0790f75ae4 make cargo-miri a separate crate in a workspace 2020-05-28 08:53:44 +02:00
Ralf Jung
93027da5ed bump compiletest 2020-04-10 14:57:22 +02:00
Ralf Jung
92e3032941 Cargo.toml: group all dependencies together 2020-03-15 15:15:22 +01:00
Ralf Jung
5c4dc072bd downgrade serde_json to match rustc workspace 2020-03-04 10:29:00 +01:00
Ralf Jung
47f2b12735 fix Cargo.toml 2020-02-24 14:42:45 +01:00
Aaron Hill
e530829797 Use 'cargo check' to build the sysroot and target crate
Fixes #1057

Since we are no longer using "cargo rustc", we now use the rustc
arguments passed by Cargo to determine whether we are building a
build dependency, normal dependency, or "target" (final binary or test)
crate.
2020-02-24 14:41:04 +01:00
Ralf Jung
87fb5db526 avoid recompiling Miri on install 2019-12-06 08:27:15 +01:00
Ralf Jung
e2fd9d83e2 cargo update 2019-11-26 14:28:56 +01:00
Ralf Jung
52b18b44f9 bump compiletest; remove unused feature 2019-11-18 15:10:17 +01:00
Ralf Jung
08fe5ee78c try the stable feature of compiletest 2019-11-16 09:08:30 +01:00
Mateusz Mikuła
b40351c53a Bump dependencies 2019-10-27 23:01:01 +01:00
bors
1bf282ff09 Auto merge of #1020 - RalfJung:compiletest, r=RalfJung
compiletest-nightly should work again
2019-10-24 08:53:52 +00:00
Ralf Jung
1b96a822de compiletest-nightly should work again 2019-10-24 10:31:08 +02:00
Ralf Jung
cf9340113e rustup: more flexible write_bytes avoids allocations and removes itertools dependency 2019-10-24 10:15:30 +02:00
Ralf Jung
6fb5e124d9 use compiletest_rs for stable compiler as nightly is broken 2019-10-23 10:31:08 +02:00
Ralf Jung
2690f5948a rustup: fix for write_bytes and new union rules 2019-10-22 10:13:11 +02:00
Ralf Jung
d8f06523f2 bump compiletest 2019-10-14 13:17:30 +02:00
Oliver Scherer
20b10cc6d3 Update to latest nightly 2019-09-26 09:42:03 +02:00
bors
b1d35d5ba2 Auto merge of #948 - mati865:patch-1, r=RalfJung
Bump byteorder and remove no-op feature

It's automatically detected: 5b3ffeeed2

With this PR `byteorder` can be from [rustc-workspace-hack](f71826e8f2/src/tools/rustc-workspace-hack/Cargo.toml (L74)).
2019-09-13 08:42:57 +00:00
Mateusz Mikuła
247ac227ef
Bump byteorder and remove no-op feature 2019-09-12 12:45:00 +02:00
Ralf Jung
138492c30b bump rand dependency 2019-09-11 18:33:48 +02:00
Ralf Jung
7faa329f11 more implicit 2019-08-28 09:27:19 +02:00
Ralf Jung
283829c5c1 explicitly enable getrandom/std feature 2019-08-27 15:12:12 +02:00
Ralf Jung
63ec6e6467 decrease getrandom version so that we dont have to bump Cargo.toml in rustc 2019-08-26 20:53:45 +02:00
Christian Poveda
b44fd97af6 Use host's rng when communication is enabled 2019-08-19 10:43:09 -05:00
lzutao
8f114e87b8 Remove stable cargo feature default-run
At least on beta.
2019-07-06 16:33:30 +07:00
Lzu Tao
724a9276b1 Bump directories to 2.0 2019-06-03 09:55:02 +07:00
Lzu Tao
e4317e9e08 Bump cargo_metadata to 0.8 2019-06-03 09:52:19 +07:00
Ralf Jung
aa868a8a21 dependency management 2019-05-27 09:47:41 +02:00
Bastien Orivel
69a252c1b3 Update cargo_metadata to 0.7 2019-04-27 23:31:48 +02:00
Ralf Jung
e4cecb10db bump compiletest 2019-04-19 18:30:53 +02:00
Ralf Jung
98296d60e7 lower rand version requirement 2019-04-12 23:17:58 +02:00
Aaron Hill
808b149671
Use raw syscall numbers 2019-04-07 20:09:53 -04:00
Aaron Hill
dddeda7f7d
Use getrandom() syscall number from libc 2019-04-07 19:57:14 -04:00
Aaron Hill
73239573c9
Implement non-deterministc mode
Part of #653

This allows us to properly implement getrandom(),
which unlocks the default HashMap type (e.g. HashMap<K, V>)
with RandomState)

This commit adds a new '-Zmiri-seed=<seed>' option. When present,
this option takes a 64-bit hex value, which is used as the seed
to an internal PRNG. This PRNG is used to implement the 'getrandom()'
syscall.

When '-Zmiri-seed' is not passed, 'getrandom()' will be disabled.
2019-04-07 19:26:20 -04:00
Manish Goregaokar
3002bbd4ac Update compiletest 2019-04-07 14:33:28 -07:00
Ralf Jung
133f2ce4e5 pin old compiletest, for now 2019-03-21 10:24:22 +01:00
Ralf Jung
d96ece3806 move back to unstable compiletest; the stable one broke 2019-03-20 10:09:49 +01:00