Skip to content

Commit e529f73

Browse files
bors[bot]lnicola
andauthored
Merge #8627
8627: Add profiling spans under cargo_to_crate_graph r=lnicola a=lnicola bors r+ Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 parents 576f506 + 6b187af commit e529f73

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/proc_macro_api/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ serde_json = { version = "1.0", features = ["unbounded_depth"] }
1515
log = "0.4.8"
1616
crossbeam-channel = "0.5.0"
1717
jod-thread = "0.1.1"
18+
memmap = "0.7.0"
19+
object = { version = "0.23.0", default-features = false, features = ["std", "read_core", "elf", "macho", "pe", "unaligned"] }
20+
snap = "1.0"
1821

1922
tt = { path = "../tt", version = "0.0.0" }
2023
base_db = { path = "../base_db", version = "0.0.0" }
2124
stdx = { path = "../stdx", version = "0.0.0" }
22-
snap = "1"
23-
object = { version = "0.23.0", default-features = false, features = ["std", "read_core", "elf", "macho", "pe", "unaligned"] }
24-
memmap = "0.7.0"
25+
profile = { path = "../profile", version = "0.0.0" }

crates/proc_macro_api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ impl ProcMacroClient {
7777
}
7878

7979
pub fn by_dylib_path(&self, dylib_path: &Path) -> Vec<ProcMacro> {
80+
let _p = profile::span("ProcMacroClient::by_dylib_path");
8081
match version::read_dylib_info(dylib_path) {
8182
Ok(info) => {
8283
if info.version.0 < 1 || info.version.1 < 47 {

crates/rust-analyzer/src/reload.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ impl GlobalState {
322322
let loader = &mut self.loader;
323323
let mem_docs = &self.mem_docs;
324324
let mut load = |path: &AbsPath| {
325+
let _p = profile::span("GlobalState::load");
325326
let vfs_path = vfs::VfsPath::from(path.to_path_buf());
326327
if !mem_docs.contains_key(&vfs_path) {
327328
let contents = loader.handle.load_sync(path);

0 commit comments

Comments
 (0)