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

try_normalize_after_erasing_regions: promote an assertion to always run #104522

Merged
merged 1 commit into from
Nov 20, 2022

Conversation

RalfJung
Copy link
Member

In rust-lang/miri#2433 this assertion has been seen to trigger, so it might be worth actually checking this? Regressing debug assertions are very easy to miss until much later, and then they become quite hard to debug.

@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2022

r? @estebank

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 17, 2022
@RalfJung
Copy link
Member Author

r? @oli-obk

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot assigned oli-obk and unassigned estebank Nov 17, 2022
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 17, 2022
@bors
Copy link
Contributor

bors commented Nov 17, 2022

⌛ Trying commit 99f7e94 with merge aebbf9c9cf7efd5662be875859c8b3e600ec2c20...

@bors
Copy link
Contributor

bors commented Nov 17, 2022

☀️ Try build successful - checks-actions
Build commit: aebbf9c9cf7efd5662be875859c8b3e600ec2c20 (aebbf9c9cf7efd5662be875859c8b3e600ec2c20)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (aebbf9c9cf7efd5662be875859c8b3e600ec2c20): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.6% [1.6%, 1.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.2% [-4.2%, -4.2%] 1
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-1.6%, -1.1%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.3% [-1.6%, -1.1%] 2

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 17, 2022
@RalfJung
Copy link
Member Author

So this makes coercions a tiny bit slower, but a significance factor of 1.07x means it is barely significant. And it's a secondary benchmark. Might be worth it for catching these subtle bugs?

@oli-obk
Copy link
Contributor

oli-obk commented Nov 17, 2022

that is llvm noise:

one run: 15_000_000 regression

-10,494,000  ???:llvm::ConstantUniqueMap<llvm::ConstantStruct>::getOrCreate(llvm::StructType*, llvm::ConstantAggrKeyType<llvm::ConstantStruct>)
 10,196,598  ???:llvm::MCAsmLayout::layoutFragment(llvm::MCFragment*)
  9,039,266  ???:llvm::ConstantStruct::get(llvm::StructType*, llvm::ArrayRef<llvm::Constant*>)
 -7,327,344  ???:llvm::SmallPtrSetImplBase::insert_imp_big(void const*)
  6,148,876  ???:llvm::MCAsmLayout::getFragmentOffset(llvm::MCFragment const*) const
  3,931,702  ???:llvm::MCAssembler::layout(llvm::MCAsmLayout&)
 -2,228,326  ???:llvm::PointerType::get(llvm::LLVMContext&, unsigned int)
  1,915,470  ???:(anonymous namespace)::Verifier::visitGlobalValue(llvm::GlobalValue const&)
    720,929  ???:llvm::ConstantFoldGetElementPtr(llvm::Type*, llvm::Constant*, bool, llvm::Optional<unsigned int>, llvm::ArrayRef<llvm::Value*>)
    595,337  /build/glibc-sMfBJT/glibc-2.31/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:__memcpy_avx_unaligned_erms
   -262,238  library/core/src/error.rs:LLVMRustVersionMinor
    262,238  /tmp/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/streambuf:LLVMRustVersionMinor
    196,627  ???:<rustc_target::abi::TyAndLayout<rustc_middle::ty::Ty>>::field::<rustc_const_eval::interpret::eval_context::InterpCx<rustc_const_eval::const_eval::machine::CompileTimeInterpreter>>
    137,702  ???:_rjem_je_emap_update_edata_state
    131,216  ???:llvm::MCStreamer::emitValue(llvm::MCExpr const*, unsigned int, llvm::SMLoc)
    131,092  ???:llvm::StructLayout::StructLayout(llvm::StructType*, llvm::DataLayout const&)

second run, 60_000_000 improvement:

-78,876,684  ???:llvm::SmallPtrSetImplBase::insert_imp_big(void const*)
-10,497,883  ???:llvm::ConstantUniqueMap<llvm::ConstantStruct>::getOrCreate(llvm::StructType*, llvm::ConstantAggrKeyType<llvm::ConstantStruct>)
  9,068,004  ???:llvm::ConstantStruct::get(llvm::StructType*, llvm::ArrayRef<llvm::Constant*>)
  3,263,837  ???:emap_try_acquire_edata_neighbor_impl
  2,694,071  ???:_rjem_je_emap_update_edata_state
  2,581,935  /build/glibc-sMfBJT/glibc-2.31/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:__memcpy_avx_unaligned_erms
 -2,228,326  ???:llvm::PointerType::get(llvm::LLVMContext&, unsigned int)
  1,740,426  ???:(anonymous namespace)::Verifier::visitGlobalValue(llvm::GlobalValue const&)
  1,224,782  /build/glibc-sMfBJT/glibc-2.31/nptl/../nptl/pthread_mutex_trylock.c:pthread_mutex_trylock

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Nov 17, 2022

📌 Commit 99f7e94 has been approved by oli-obk

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 17, 2022

🌲 The tree is currently closed for pull requests below priority 1. This pull request will be tested once the tree is reopened.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 17, 2022
@bors
Copy link
Contributor

bors commented Nov 20, 2022

⌛ Testing commit 99f7e94 with merge 7477c1f...

@bors
Copy link
Contributor

bors commented Nov 20, 2022

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 7477c1f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 20, 2022
@bors bors merged commit 7477c1f into rust-lang:master Nov 20, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 20, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7477c1f): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

@RalfJung RalfJung deleted the try_normalize_after_erasing_regions branch November 20, 2022 08:57
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…_regions, r=oli-obk

try_normalize_after_erasing_regions: promote an assertion to always run

In rust-lang/miri#2433 this assertion has been seen to trigger, so it might be worth actually checking this? Regressing debug assertions are very easy to miss until much later, and then they become quite hard to debug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants