Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): Trace core cargo operations #13532

Merged
merged 1 commit into from
Mar 4, 2024
Merged

fix(cli): Trace core cargo operations #13532

merged 1 commit into from
Mar 4, 2024

Conversation

epage
Copy link
Contributor

@epage epage commented Mar 4, 2024

What does this PR try to resolve?

This is preparation for #13399 and covers hot spots I found as well as areas currently covered by profile::start(...).

This is split out to avoid conflicts while working through the remaining issues for #13399.
Maybe it will also serve to help debugging...

How should we test and review this PR?

Additional information

$ rg profile::start src/
src/cargo/ops/cargo_compile/mod.rs:    let _p = profile::start("compiling");
src/cargo/ops/resolve.rs:        let _p = profile::start("resolving with overrides...");
src/cargo/util/rustc.rs:        let _p = profile::start("Rustc::new");
src/cargo/core/global_cache_tracker.rs:        let _p = crate::util::profile::start("cleaning global cache files");
src/cargo/core/global_cache_tracker.rs:        let _p = crate::util::profile::start("global cache db sync");
src/cargo/core/global_cache_tracker.rs:        let _p = crate::util::profile::start(format!(
src/cargo/core/global_cache_tracker.rs:        let _p = crate::util::profile::start(format!("update db for removed {table_name}"));
src/cargo/core/global_cache_tracker.rs:        let _p = crate::util::profile::start(format!(
src/cargo/core/global_cache_tracker.rs:        let _p = crate::util::profile::start("populate untracked crate");
src/cargo/core/global_cache_tracker.rs:        let _p = crate::util::profile::start(format!("populate untracked {table_name}"));
src/cargo/core/global_cache_tracker.rs:        let _p = crate::util::profile::start(format!("update NULL sizes {table_name}"));
src/cargo/core/global_cache_tracker.rs:        let _p = crate::util::profile::start("saving last-use data");
src/cargo/core/resolver/features.rs:        let _p = profile::start("resolve features");
src/cargo/core/resolver/mod.rs:    let _p = profile::start("resolving");
src/cargo/core/compiler/fingerprint/mod.rs:    let _p = profile::start(format!(
src/cargo/core/compiler/mod.rs:    let p = profile::start(format!("preparing: {}/{}", unit.pkg, unit.target.name()));
src/cargo/core/compiler/build_runner/mod.rs:        let _p = profile::start("preparing layout");
src/cargo/core/compiler/custom_build.rs:    let _p = profile::start(format!(
src/cargo/core/compiler/job_queue/mod.rs:        let _p = profile::start("executing the job graph");

This is preparation for rust-lang#13339 and covers hot spots I found as well as
areas currently covered by `profile::start(...)`.

This is split out to avoid conflicts while working through the remaining
issues for rust-lang#13339.
Maybe it will also serve to help debugging...
@rustbot
Copy link
Collaborator

rustbot commented Mar 4, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-build-execution Area: anything dealing with executing the compiler A-build-scripts Area: build.rs scripts A-cache-messages Area: caching of compiler messages A-cli Area: Command-line interface, option parsing, etc. A-configuration Area: cargo config files and env vars A-dependency-resolution Area: dependency resolution and the resolver A-features2 Area: issues specifically related to the v2 feature resolver A-lockfile Area: Cargo.lock issues A-manifest Area: Cargo.toml issues A-rebuild-detection Area: rebuild detection and fingerprinting S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 4, 2024
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

BTW, this shouldn't impact too much on performance, right?

@weihanglo
Copy link
Member

This is preparation for #13337 and covers hot spots I found as well as areas currently covered by profile::start(...).

You meant #13399?

@epage
Copy link
Contributor Author

epage commented Mar 4, 2024

Bah, too many tabs open

@weihanglo
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Mar 4, 2024

📌 Commit df18c53 has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 4, 2024
@bors
Copy link
Contributor

bors commented Mar 4, 2024

⌛ Testing commit df18c53 with merge a0cad1e...

@bors
Copy link
Contributor

bors commented Mar 4, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing a0cad1e to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Mar 4, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing a0cad1e to master...

@bors bors merged commit a0cad1e into rust-lang:master Mar 4, 2024
21 checks passed
@bors
Copy link
Contributor

bors commented Mar 4, 2024

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

@epage epage deleted the t branch March 5, 2024 14:42
epage added a commit to epage/cargo that referenced this pull request Mar 5, 2024
epage added a commit to epage/cargo that referenced this pull request Mar 5, 2024
bors added a commit that referenced this pull request Mar 5, 2024
fix(log): Trace parameters to align with profile

This is a follow up to #13532 and prep for #13399
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 6, 2024
Update cargo

11 commits in f772ec0224d3755ce52ac5128a80319fb2eb45d0..c3c417b85e01a1de1633317fa55e4f1a31e346d4
2024-03-01 22:57:35 +0000 to 2024-03-06 01:16:08 +0000
- fix(rustdoc-map): dedup `--extern-html-too-url` for same unit (rust-lang/cargo#13544)
- test: Add test for packaging a public dependency (rust-lang/cargo#13536)
- doc: Edits for git/path dependency sections (rust-lang/cargo#13341)
- feat(cli): Allow logging to chrome traces (rust-lang/cargo#13399)
- fix(log): Trace parameters to align with profile (rust-lang/cargo#13538)
- fix(toml): Don't warn on unset Edition if only 2015 is compatible (rust-lang/cargo#13533)
- fix(cli): Trace core cargo operations (rust-lang/cargo#13532)
- chore: update pulldown-cmark to 0.10.0 (rust-lang/cargo#13517)
- feat(add): Fallback to `rustc -v` when no MSRV is set (rust-lang/cargo#13516)
- chore(ci): Ensure lockfile is respected during MSRV testing (rust-lang/cargo#13523)
- feat: Use consistent colors when testing (rust-lang/cargo#13520)

r? ghost
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2024
Update cargo

14 commits in f772ec0224d3755ce52ac5128a80319fb2eb45d0..a4c63fe5388beaa09e5f91196c86addab0a03580
2024-03-01 22:57:35 +0000 to 2024-03-06 22:15:17 +0000
- fix(cli): Skip tracing-chrome for platforms without 64bit atomics (rust-lang/cargo#13551)
- chore: downgrade to openssl v1.1.1 (again) (rust-lang/cargo#13550)
- fix(cli): Add traces to clarify where time is going (rust-lang/cargo#13545)
- fix(rustdoc-map): dedup `--extern-html-too-url` for same unit (rust-lang/cargo#13544)
- test: Add test for packaging a public dependency (rust-lang/cargo#13536)
- doc: Edits for git/path dependency sections (rust-lang/cargo#13341)
- feat(cli): Allow logging to chrome traces (rust-lang/cargo#13399)
- fix(log): Trace parameters to align with profile (rust-lang/cargo#13538)
- fix(toml): Don't warn on unset Edition if only 2015 is compatible (rust-lang/cargo#13533)
- fix(cli): Trace core cargo operations (rust-lang/cargo#13532)
- chore: update pulldown-cmark to 0.10.0 (rust-lang/cargo#13517)
- feat(add): Fallback to `rustc -v` when no MSRV is set (rust-lang/cargo#13516)
- chore(ci): Ensure lockfile is respected during MSRV testing (rust-lang/cargo#13523)
- feat: Use consistent colors when testing (rust-lang/cargo#13520)
@ehuss ehuss added this to the 1.78.0 milestone Mar 10, 2024
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Apr 7, 2024
Update cargo

14 commits in f772ec0224d3755ce52ac5128a80319fb2eb45d0..a4c63fe5388beaa09e5f91196c86addab0a03580
2024-03-01 22:57:35 +0000 to 2024-03-06 22:15:17 +0000
- fix(cli): Skip tracing-chrome for platforms without 64bit atomics (rust-lang/cargo#13551)
- chore: downgrade to openssl v1.1.1 (again) (rust-lang/cargo#13550)
- fix(cli): Add traces to clarify where time is going (rust-lang/cargo#13545)
- fix(rustdoc-map): dedup `--extern-html-too-url` for same unit (rust-lang/cargo#13544)
- test: Add test for packaging a public dependency (rust-lang/cargo#13536)
- doc: Edits for git/path dependency sections (rust-lang/cargo#13341)
- feat(cli): Allow logging to chrome traces (rust-lang/cargo#13399)
- fix(log): Trace parameters to align with profile (rust-lang/cargo#13538)
- fix(toml): Don't warn on unset Edition if only 2015 is compatible (rust-lang/cargo#13533)
- fix(cli): Trace core cargo operations (rust-lang/cargo#13532)
- chore: update pulldown-cmark to 0.10.0 (rust-lang/cargo#13517)
- feat(add): Fallback to `rustc -v` when no MSRV is set (rust-lang/cargo#13516)
- chore(ci): Ensure lockfile is respected during MSRV testing (rust-lang/cargo#13523)
- feat: Use consistent colors when testing (rust-lang/cargo#13520)
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
Update cargo

14 commits in f772ec0224d3755ce52ac5128a80319fb2eb45d0..a4c63fe5388beaa09e5f91196c86addab0a03580
2024-03-01 22:57:35 +0000 to 2024-03-06 22:15:17 +0000
- fix(cli): Skip tracing-chrome for platforms without 64bit atomics (rust-lang/cargo#13551)
- chore: downgrade to openssl v1.1.1 (again) (rust-lang/cargo#13550)
- fix(cli): Add traces to clarify where time is going (rust-lang/cargo#13545)
- fix(rustdoc-map): dedup `--extern-html-too-url` for same unit (rust-lang/cargo#13544)
- test: Add test for packaging a public dependency (rust-lang/cargo#13536)
- doc: Edits for git/path dependency sections (rust-lang/cargo#13341)
- feat(cli): Allow logging to chrome traces (rust-lang/cargo#13399)
- fix(log): Trace parameters to align with profile (rust-lang/cargo#13538)
- fix(toml): Don't warn on unset Edition if only 2015 is compatible (rust-lang/cargo#13533)
- fix(cli): Trace core cargo operations (rust-lang/cargo#13532)
- chore: update pulldown-cmark to 0.10.0 (rust-lang/cargo#13517)
- feat(add): Fallback to `rustc -v` when no MSRV is set (rust-lang/cargo#13516)
- chore(ci): Ensure lockfile is respected during MSRV testing (rust-lang/cargo#13523)
- feat: Use consistent colors when testing (rust-lang/cargo#13520)
charmitro pushed a commit to charmitro/cargo that referenced this pull request Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-execution Area: anything dealing with executing the compiler A-build-scripts Area: build.rs scripts A-cache-messages Area: caching of compiler messages A-cli Area: Command-line interface, option parsing, etc. A-configuration Area: cargo config files and env vars A-dependency-resolution Area: dependency resolution and the resolver A-features2 Area: issues specifically related to the v2 feature resolver A-lockfile Area: Cargo.lock issues A-manifest Area: Cargo.toml issues A-rebuild-detection Area: rebuild detection and fingerprinting S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants