Make queries traceable again
This commit is contained in:
parent
c55d1ee8d4
commit
81e37743a5
1 changed files with 9 additions and 1 deletions
|
@ -531,6 +531,8 @@ macro_rules! define_queries {
|
||||||
key: queries::$name::Key<'tcx>,
|
key: queries::$name::Key<'tcx>,
|
||||||
mode: QueryMode,
|
mode: QueryMode,
|
||||||
) -> Option<Erase<queries::$name::Value<'tcx>>> {
|
) -> Option<Erase<queries::$name::Value<'tcx>>> {
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
|
let _guard = tracing::span!(tracing::Level::TRACE, stringify!($name), ?key).entered();
|
||||||
get_query_incr(
|
get_query_incr(
|
||||||
QueryType::config(tcx),
|
QueryType::config(tcx),
|
||||||
QueryCtxt::new(tcx),
|
QueryCtxt::new(tcx),
|
||||||
|
@ -571,10 +573,16 @@ macro_rules! define_queries {
|
||||||
cache_on_disk: |tcx, key| ::rustc_middle::query::cached::$name(tcx, key),
|
cache_on_disk: |tcx, key| ::rustc_middle::query::cached::$name(tcx, key),
|
||||||
execute_query: |tcx, key| erase(tcx.$name(key)),
|
execute_query: |tcx, key| erase(tcx.$name(key)),
|
||||||
compute: |tcx, key| {
|
compute: |tcx, key| {
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
|
let _guard = tracing::span!(tracing::Level::TRACE, stringify!($name), ?key).entered();
|
||||||
__rust_begin_short_backtrace(||
|
__rust_begin_short_backtrace(||
|
||||||
queries::$name::provided_to_erased(
|
queries::$name::provided_to_erased(
|
||||||
tcx,
|
tcx,
|
||||||
call_provider!([$($modifiers)*][tcx, $name, key])
|
{
|
||||||
|
let ret = call_provider!([$($modifiers)*][tcx, $name, key]);
|
||||||
|
tracing::trace!(?ret);
|
||||||
|
ret
|
||||||
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue