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

Replace Memoryblock with NonNull<[u8]> #75152

Merged
merged 3 commits into from
Aug 5, 2020

Conversation

TimDiekmann
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 4, 2020
Copy link
Member

@Amanieu Amanieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @RalfJung since this new API is pretty dependent on having NonNull slice methods available (#74265)

library/core/src/alloc/mod.rs Outdated Show resolved Hide resolved
@Amanieu
Copy link
Member

Amanieu commented Aug 4, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Aug 4, 2020

📌 Commit 93d9832 has been approved by Amanieu

@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 Aug 4, 2020
@bors
Copy link
Contributor

bors commented Aug 4, 2020

⌛ Testing commit 93d9832 with merge 8d188d8fa7066ffe69511440d73ea6099eaefaf4...

@bors
Copy link
Contributor

bors commented Aug 4, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 4, 2020
@rust-log-analyzer
Copy link
Collaborator

The job i686-gnu of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@JohnTitor
Copy link
Member

The failure is spurious: rust-lang/cargo#8517
@bors retry

@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 Aug 4, 2020
Manishearth added a commit to Manishearth/rust that referenced this pull request Aug 5, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 5, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#75139 (Remove log alias from librustdoc)
 - rust-lang#75140 (Clean up E0745)
 - rust-lang#75149 (Correct a typo in interpret/memory.rs)
 - rust-lang#75152 (Replace `Memoryblock` with `NonNull<[u8]>`)
 - rust-lang#75168 (Update books)

Failed merges:

r? @ghost
@bors bors merged commit 5f87ee0 into rust-lang:master Aug 5, 2020
@TimDiekmann TimDiekmann deleted the replace_memblock branch August 5, 2020 05:13
bors bot added a commit to softdevteam/libgc that referenced this pull request Aug 7, 2020
19: Update after recent rust-nightly changes. r=jacob-hughes a=ltratt

There are two PRs which affect us:

  rust-lang/rust#74850
  rust-lang/rust#75152

Henceforth, we should probably be keeping a close eye on and contributing to:

  https://github.com/rust-lang/wg-allocators/issues

Co-authored-by: Laurence Tratt <laurie@tratt.net>
bors bot added a commit to softdevteam/libgc that referenced this pull request Aug 10, 2020
19: Update after recent rust-nightly changes. r=vext01 a=ltratt

There are two PRs which affect us:

  rust-lang/rust#74850
  rust-lang/rust#75152

Henceforth, we should probably be keeping a close eye on and contributing to:

  https://github.com/rust-lang/wg-allocators/issues

Co-authored-by: Laurence Tratt <laurie@tratt.net>
@Mark-Simulacrum
Copy link
Member

This appears to have been a slight regression, though very slight so hard to be certain: https://perf.rust-lang.org/compare.html?start=32d14eba47ee8bb0b5edb04bcf652517f81c4cf5&end=119d2a1a98fe87d4ae6cabf12134a0ef2fb95851. @Amanieu, do you think it's plausible this is slowing something down? It looks pretty innocuous to me...

@Amanieu
Copy link
Member

Amanieu commented Aug 12, 2020

Perhaps it's because we call NonNull::slice_from_raw_parts now instead of constructing a MemoryBlock directly? I'm not sure how much of an effect this can have on compile times in practice.

@Mark-Simulacrum
Copy link
Member

Hm yeah I don't really know that we'll be able to narrow it down, the cachegrind diff doesn't look obviously indicative of anything on deeply-nested-debug at least. My guess is that deeply-nested-debug is actually just nondeterministic or something, because this PR (or anything in the rollup) shouldn't have caused query count differences.

--------------------------------------------------------------------------------
Ir
--------------------------------------------------------------------------------
10,308,357  PROGRAM TOTALS

--------------------------------------------------------------------------------
Ir         file:function
--------------------------------------------------------------------------------
  398,374  ???:llvm::SmallPtrSetImplBase::insert_imp_big(void const*)
  311,046  ???:<rustc_span::SourceFile as rustc_serialize::serialize::Decodable>::decode
  154,679  ???:llvm::MVT::getVectorElementType() const
  145,790  //obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-4c993ce4ad70adcc/out/build/../jemalloc/src/jemalloc.c:malloc
  143,616  /build/glibc-YYA7BZ/glibc-2.31/string/../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:__memset_avx2_erms
  135,694  ???:llvm::PassRegistry::enumerateWith(llvm::PassRegistrationListener*)
  126,612  ???:llvm::PMTopLevelManager::findAnalysisPassInfo(void const*) const
  126,273  ???:llvm::StringMapImpl::LookupBucketFor(llvm::StringRef)
  125,144  ???:llvm::MCAsmLayout::ensureValid(llvm::MCFragment const*) const
  117,186  //obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-4c993ce4ad70adcc/out/build/../jemalloc/src/jemalloc.c:free
  113,873  //obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-4c993ce4ad70adcc/out/build/../jemalloc/src/arena.c:arena_dalloc_bin_locked_impl
  112,558  ???:llvm::PMTopLevelManager::setLastUser(llvm::ArrayRef<llvm::Pass*>, llvm::Pass*)
 -110,845  //obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-4c993ce4ad70adcc/out/build/../jemalloc/src/extent.c:_rjem_je_extent_heap_remove_first
  108,405  ???:rustc_query_system::query::plumbing::get_query_impl
  107,618  ???:llvm::X86TargetLowering::X86TargetLowering(llvm::X86TargetMachine const&, llvm::X86Subtarget const&)
 -103,836  //obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-4c993ce4ad70adcc/out/build/../jemalloc/src/base.c:base_alloc_impl
  100,592  ???:llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int)
   97,981  ???:llvm::MCAsmLayout::layoutFragment(llvm::MCFragment*)
   92,925  ???:llvm::MachineInstr::addOperand(llvm::MachineFunction&, llvm::MachineOperand const&)
   90,072  //obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-4c993ce4ad70adcc/out/build/../jemalloc/include/jemalloc/internal/rtree.h:free
   88,974  ???:llvm::PMDataManager::removeNotPreservedAnalysis(llvm::Pass*)
   88,818  ???:(anonymous namespace)::Verifier::visitInstruction(llvm::Instruction&)
   87,498  ???:llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level)
   87,261  ///library/alloc/src/vec.rs:<alloc::vec::Vec<T> as alloc::vec::SpecExtend<&T,core::slice::Iter<T>>>::spec_extend
  -83,674  ???:(anonymous namespace)::LiveDebugValues::ExtendRanges(llvm::MachineFunction&)
   83,183  ???:alloc::raw_vec::RawVec<T,A>::reserve
   80,536  ???:???
   79,336  //obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-4c993ce4ad70adcc/out/build/../jemalloc/src/tcache.c:_rjem_je_tcache_bin_flush_small
   78,556  /build/glibc-YYA7BZ/glibc-2.31/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:__memcpy_sse2_unaligned_erms
   77,930  ???:llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>::Allocate(unsigned long, llvm::Align)
   74,249  //obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-4c993ce4ad70adcc/out/build/../jemalloc/include/jemalloc/internal/tcache_inlines.h:free
   73,708  //obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/jemalloc-sys-4c993ce4ad70adcc/out/build/../jemalloc/include/jemalloc/internal/cache_bin.h:malloc
   72,563  ???:llvm::PointerType::get(llvm::Type*, unsigned int)
   72,438  ???:SetImpliedBits(llvm::FeatureBitset&, llvm::FeatureBitset const&, llvm::ArrayRef<llvm::SubtargetFeatureKV>) [clone .llvm.16071190477537856655]
   71,532  /build/glibc-YYA7BZ/glibc-2.31/string/../sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S:__memcmp_avx2_movbe
   67,248  ???:(anonymous namespace)::Verifier::visitMDNode(llvm::MDNode const&)
   65,088  ???:llvm::TargetLoweringBase::computeRegisterProperties(llvm::TargetRegisterInfo const*)
   63,780  ???:llvm::AttributeSetNode::get(llvm::LLVMContext&, llvm::AttrBuilder const&)
   63,095  ???:alloc::raw_vec::RawVec<T,A>::allocate_in

JohnTitor added a commit to JohnTitor/nomicon that referenced this pull request Aug 18, 2020
Mark-Simulacrum added a commit to rust-lang/nomicon that referenced this pull request Aug 19, 2020
@ehuss ehuss mentioned this pull request Aug 19, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 20, 2020
Update books

## nomicon

2 commits in bfe1ab96d717d1dda50e499b360f2e2f57e1750a..25854752549d44d76fbd7650e17cb4f167a0b8fb
2020-06-05 13:19:42 -0400 to 2020-08-19 16:41:48 -0400
- Follow-up of rust-lang#75152 (rust-lang/nomicon#235)
- Follow-up for rust-lang#74850 (rust-lang/nomicon#233)

## reference

7 commits in c9b2736a059469043177e1e4ed41a55d7c63ac28..1b6c4b0afab97c0230433466c97167bbbe8445f6
2020-08-03 03:34:03 -0700 to 2020-08-18 17:04:28 -0700
- Some constant/static updates. (rust-lang/reference#867)
- Add casting rules from function items to other types (rust-lang/reference#878)
- Apply joshtriplett's suggestion
- Add note clarifying 16-bit support.
- Document min pointer width.
- Update to `dyn Trait` syntax in a couple places (rust-lang/reference#875)
- mention that `#[track_caller]` on `fn main` is forbidden (rust-lang/reference#872)

## book

2 commits in 363293c1c5ce9e84ea3935a5e29ce8624801208a..c0a6a61b8205da14ac955425f74258ffd8ee065d
2020-08-03 15:56:30 -0500 to 2020-08-14 14:21:49 -0500
- Correct listing 11-10: Take tests module out of main function. (rust-lang/book#2427)
- Update link to russian translation (rust-lang/book#2423)

## rust-by-example

5 commits in 2e9271981adc32613365810f3428334c07095215..80a10e22140e28392b99d24ed02f4c6d8cb770a0
2020-07-27 13:39:16 -0500 to 2020-08-08 09:56:46 -0300
- Add tuple `..` operator example (rust-lang/rust-by-example#1368)
- Clarify wording (rust-lang/rust-by-example#1366)
- Include arc (rust-lang/rust-by-example#1365)
- Modify supertraits sample code (rust-lang/rust-by-example#1361)
- Remove mention of `try!` in `Display` example (rust-lang/rust-by-example#1357)

## embedded-book

3 commits in b5256448a2a4c1bec68b93c0847066f92f2ff5a9..0cd2ca116274b915924c3a7e07c1e046b6f19b77
2020-07-24 23:09:29 +0000 to 2020-08-19 10:33:15 +0000
- Ignore unused argument in closure  (rust-embedded/book#261)
- Fix broken sentence  (rust-embedded/book#260)
- Add additional command to try when verifying installation.  (rust-embedded/book#259)
jacob-hughes added a commit to jacob-hughes/alloy that referenced this pull request Sep 8, 2020
There are two PRs which affect us:

    rust-lang#74850
    rust-lang#75152

Henceforth, we should probably be keeping a close eye on and contributing to:

    https://github.com/rust-lang/wg-allocators/issues
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace MemoryBlock with NonNull<[u8]>
8 participants