From 6b187af33712498196233883f8a20588eb314685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Thu, 22 Apr 2021 21:25:29 +0300 Subject: Add profiling spans under cargo_to_crate_graph --- crates/proc_macro_api/Cargo.toml | 7 ++++--- crates/proc_macro_api/src/lib.rs | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'crates/proc_macro_api') diff --git a/crates/proc_macro_api/Cargo.toml b/crates/proc_macro_api/Cargo.toml index 16fd56c7e..1ba1e4abd 100644 --- a/crates/proc_macro_api/Cargo.toml +++ b/crates/proc_macro_api/Cargo.toml @@ -15,10 +15,11 @@ serde_json = { version = "1.0", features = ["unbounded_depth"] } log = "0.4.8" crossbeam-channel = "0.5.0" jod-thread = "0.1.1" +memmap = "0.7.0" +object = { version = "0.23.0", default-features = false, features = ["std", "read_core", "elf", "macho", "pe", "unaligned"] } +snap = "1.0" tt = { path = "../tt", version = "0.0.0" } base_db = { path = "../base_db", version = "0.0.0" } stdx = { path = "../stdx", version = "0.0.0" } -snap = "1" -object = { version = "0.23.0", default-features = false, features = ["std", "read_core", "elf", "macho", "pe", "unaligned"] } -memmap = "0.7.0" +profile = { path = "../profile", version = "0.0.0" } diff --git a/crates/proc_macro_api/src/lib.rs b/crates/proc_macro_api/src/lib.rs index 2dd2a8541..654bd9943 100644 --- a/crates/proc_macro_api/src/lib.rs +++ b/crates/proc_macro_api/src/lib.rs @@ -77,6 +77,7 @@ impl ProcMacroClient { } pub fn by_dylib_path(&self, dylib_path: &Path) -> Vec { + let _p = profile::span("ProcMacroClient::by_dylib_path"); match version::read_dylib_info(dylib_path) { Ok(info) => { if info.version.0 < 1 || info.version.1 < 47 { -- cgit v1.2.3