add depth_limit in QueryVTable to avoid entering a new tcx in layout_of by SparrowLii · Pull Request #100748 · rust-lang/rust (original) (raw)
Most of the regressions are happening in html5ever-0.26.0 and deeply-nested-multi which have been noisy lately. The regressions are small enough that it's likely that we're seeing that noise here too. Subsequent changes show improvements of the same magnitude reversing the regressions here.
However, there are some regressions that seem like they might be real, and they are all in doc profile test cases. The common query across the potentially real regressions is the build_impl query. This change seems like strictly less work, so I'm confused why this might be.
The cachegrind diff doesn't show anythign immeadiately obvious:
1,606,140 ???:_rjem_je_arena_cache_bin_fill_small
1,534,640 ???:<alloc::vec::Vec<rustdoc::clean::types::GenericArg>>::into_boxed_slice
781,591 ???:_rjem_je_malloc_default
470,388 ???:rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, &[rustc_ast::ast::Attribute]>>
-373,310 /build/glibc-eX1tMB/glibc-2.31/string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:__memcpy_avx_unaligned_erms
301,962 ???:rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::explicit_predicates_of, rustc_query_impl::plumbing::QueryCtxt>
296,379 ???:<rustdoc::clean::types::GenericArg as alloc::slice::hack::ConvertVec>::to_vec::<alloc::alloc::Global>
-287,480 ???:<alloc::boxed::Box<[rustdoc::clean::types::GenericArg]> as core::clone::Clone>::clone
280,160 /build/glibc-eX1tMB/glibc-2.31/nptl/../nptl/pthread_mutex_trylock.c:pthread_mutex_trylock
275,582 ???:rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::generics_of, rustc_query_impl::plumbing::QueryCtxt>
271,458 ???:_rjem_je_tcache_alloc_small_hard
255,130 ???:_rjem_je_tcache_bin_flush_stashed
238,323 ???:rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::type_of, rustc_query_impl::plumbing::QueryCtxt>
234,287 ???:rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::visibility, rustc_query_impl::plumbing::QueryCtxt>
233,837 ???:rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::impl_trait_ref, rustc_query_impl::plumbing::QueryCtxt>
204,215 ???:rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, bool>>
179,493 ???:rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::def_ident_span, rustc_query_impl::plumbing::QueryCtxt>
172,787 ???:arena_choose
156,605 ???:rustdoc::clean::ut
@SparrowLii @cjgillot @nnethercote any ideas or shall we just accept this small hit to docs?