From: bors Date: Mon, 23 May 2022 06:46:46 +0000 (+0000) Subject: Auto merge of #2139 - saethlin:lazy-current-span, r=RalfJung X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=d60aa4771b98a32b12ba5506dfaba6b368efe9e8;p=rust.git Auto merge of #2139 - saethlin:lazy-current-span, r=RalfJung Factor current-span logic into a caching handle After https://github.com/rust-lang/miri/pull/2030 and while working on https://github.com/rust-lang/miri/pull/1935 it became quite clear that we need to do some caching here, because some retag operations generate many calls to `log_invalidation`, and would thus search the current thread's stack _many_ times for a local crate. This caching fixes that. This handle type also has the nice benefit of tucking away all the `ThreadManager` + `CrateNum` logic. --- d60aa4771b98a32b12ba5506dfaba6b368efe9e8