diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml
index d6360335a..f0cd9e8b0 100644
--- a/tokio/Cargo.toml
+++ b/tokio/Cargo.toml
@@ -116,6 +116,9 @@ mio = { version = "1.2.0", default-features = false, features = ["os-poll", "os-
slab = { version = "0.4.9", optional = true }
backtrace = { version = "0.3.58", optional = true }
+[target.'cfg(all(tokio_unstable, target_os = "linux"))'.dev-dependencies]
+backtrace = "0.3.58"
+
[target.'cfg(unix)'.dependencies]
libc = { version = "0.2.168", optional = true }
signal-hook-registry = { version = "1.1.1", optional = true }
diff --git a/tokio/src/runtime/dump.rs b/tokio/src/runtime/dump.rs
index 57df2ca44..40f364f91 100644
--- a/tokio/src/runtime/dump.rs
+++ b/tokio/src/runtime/dump.rs
@@ -5,7 +5,7 @@
use crate::task::Id;
use std::{fmt, future::Future, path::Path};
-pub use crate::runtime::task::trace::Root;
+pub use crate::runtime::task::trace::{trace_with, Root, TraceMeta};
/// A snapshot of a runtime's state.
///
diff --git a/tokio/src/runtime/task/trace/mod.rs b/tokio/src/runtime/task/trace/mod.rs
index 7b018185c..5455e1133 100644
--- a/tokio/src/runtime/task/trace/mod.rs
+++ b/tokio/src/runtime/task/trace/mod.rs
@@ -10,10 +10,11 @@ use std::ffi::c_void;
use std::fmt;
use std::future::Future;
use std::pin::Pin;
-use std::ptr::{self, NonNull};
+use std::ptr::NonNull;
use std::task::{self, Poll};
mod symbol;
+mod trace_impl;
mod tree;
use symbol::Symbol;
@@ -29,8 +30,11 @@ pub(crate) struct Context {
/// The address of [`Trace::root`] establishes an upper unwinding bound on
/// the backtraces in `Trace`.
active_frame: Cell