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

rustc_metadata: Encode even less doc comments #103496

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

petrochenkov
Copy link
Contributor

The fact that def_id is in the tcx.privacy_access_levels(()) table is not very meaningful, especially after #102026, is_exported (or is_reachable in the worst case) is what you need.

Follow up to #98450.
r? @GuillaumeGomez @lqd

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 24, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2022
@lqd
Copy link
Member

lqd commented Oct 24, 2022

r=me if a perf run comes back clean

The reachability query however, was too much of a pessimization for incremental runs, when it was tried on the previous PR.

@petrochenkov
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 24, 2022
@bors
Copy link
Contributor

bors commented Oct 24, 2022

⌛ Trying commit cd0977e2d8b58f702e1fafc0e794a238263aaf1f with merge 925fac1518f23cd489a35e7f477a78539f1a475c...

@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2022
@bors
Copy link
Contributor

bors commented Oct 24, 2022

☀️ Try build successful - checks-actions
Build commit: 925fac1518f23cd489a35e7f477a78539f1a475c (925fac1518f23cd489a35e7f477a78539f1a475c)

@rust-timer
Copy link
Collaborator

Queued 925fac1518f23cd489a35e7f477a78539f1a475c with parent c07a6a9, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (925fac1518f23cd489a35e7f477a78539f1a475c): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.3% [2.4%, 5.6%] 3
Improvements ✅
(primary)
-1.4% [-1.6%, -1.3%] 2
Improvements ✅
(secondary)
-2.6% [-2.6%, -2.6%] 1
All ❌✅ (primary) -1.4% [-1.6%, -1.3%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 25, 2022
@petrochenkov
Copy link
Contributor Author

@bors
Copy link
Contributor

bors commented Oct 25, 2022

📌 Commit cd0977e2d8b58f702e1fafc0e794a238263aaf1f has been approved by lqd

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 Oct 25, 2022
@lqd
Copy link
Member

lqd commented Oct 25, 2022

Awesome, thanks a bunch @petrochenkov.

What I was particularly interested in the previous work was the impact on libstd/libcore (with the eventual goal of removing more of the unused/unexpected metadata), and on x86_64-unknown-linux-gnu we see from pre-#98450 to this PR:

item nightly-2022-10-20 nightly with #98450 this PR total
libstd.rmeta 10652720 10363296 10142392 -4.8%
libcore.rmeta 60157032 59557024 59435328 -1.2%
libstd.rlib 20904980 20614708 20394284 -2.4%
libcore.rlib 64008136 63413340 63286316 -1.1%

Most of libcore's doc comments are surely exported anyways (stdarch's intel intrinsics), but that's another nice improvement on libstd. Getting the rest of the way to the expected >= 15% on libstd, and >= 10% on libcore will require finding a way to have tool-specific metadata either out of band, computed on demand via -Zbuild-std, or a different mechanism (maybe related to miri's custom sysroot build, in case it's not using build-std and/or xargo).

@bors

This comment was marked as resolved.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 29, 2022
@petrochenkov
Copy link
Contributor Author

@bors r=lqd

@bors
Copy link
Contributor

bors commented Oct 29, 2022

📌 Commit d080532 has been approved by lqd

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 29, 2022
@bors
Copy link
Contributor

bors commented Oct 31, 2022

⌛ Testing commit d080532 with merge b3379a02362387aa52e162391500aeaadc04ab80...

@bors
Copy link
Contributor

bors commented Oct 31, 2022

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 31, 2022
@lqd
Copy link
Member

lqd commented Oct 31, 2022

@bors retry

@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 Oct 31, 2022
@rust-log-analyzer

This comment was marked as outdated.

@bors
Copy link
Contributor

bors commented Nov 1, 2022

⌛ Testing commit d080532 with merge c2e493e84bd3dbf2f2bab89f23fd40f6520e0d3c...

@bors
Copy link
Contributor

bors commented Nov 1, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 1, 2022
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-aux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
error: process exited with code 101 (expected 0)
--- stdout

--- stderr
error: could not execute process `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/cit/t2500/lib/./foo -vV` (never executed)
Caused by:
  Text file busy (os error 26)
', src/tools/cargo/tests/testsuite/workspaces.rs:2176:42

---
test result: FAILED. 2530 passed; 1 failed; 142 ignored; 0 measured; 0 filtered out; finished in 112.03s

error: test failed, to rerun pass `--test testsuite`
Build completed unsuccessfully in 0:26:16
make: *** [Makefile:44: check-aux] Error 1

@cjgillot
Copy link
Contributor

cjgillot commented Nov 1, 2022

@bors retry

@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 Nov 1, 2022
@bors
Copy link
Contributor

bors commented Nov 1, 2022

⌛ Testing commit d080532 with merge 4c736a2...

@bors
Copy link
Contributor

bors commented Nov 1, 2022

☀️ Test successful - checks-actions
Approved by: lqd
Pushing 4c736a2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 1, 2022
@bors bors merged commit 4c736a2 into rust-lang:master Nov 1, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 1, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4c736a2): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.7% [1.7%, 1.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-1.3%, -1.3%] 1
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) -1.3% [-1.3%, -1.3%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
rustc_metadata: Encode even less doc comments

The fact that `def_id` is in the `tcx.privacy_access_levels(())` table is not very meaningful, especially after rust-lang#102026, `is_exported` (or `is_reachable` in the worst case) is what you need.

Follow up to rust-lang#98450.
r? `@GuillaumeGomez` `@lqd`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants