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

analysis-stats: run Salsa's LRU at the end of analysis #19378

Conversation

davidbarsky
Copy link
Contributor

Should help with #18964 (comment) bit.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 16, 2025
@davidbarsky davidbarsky requested a review from lnicola March 16, 2025 17:44
@lnicola
Copy link
Member

lnicola commented Mar 16, 2025

I can't test it right now, does it reduce the memory usage as displayed?

@lnicola
Copy link
Member

lnicola commented Mar 16, 2025

I don't think it does:

# baseline
Database loaded:     21.03s, 529minstr, 96mb (metadata 179.81ms, 5466kinstr, 972kb; build 20.51s, 13minstr, 46kb)
  item trees: 1289
Item Tree Collection: 691.76ms, 7589minstr, 126mb
  crates: 58, mods: 1140, decls: 29642, bodies: 28783, adts: 2045, consts: 1719
Item Collection:     10.29s, 83ginstr, 1487mb
Body lowering:       4.16s, 27ginstr, 641mb                                                                                                                                       
  exprs: 875276, ??ty: 66 (0%), ?ty: 131 (0%), !ty: 4                                                                                                                             
  pats: 192444, ??ty: 6 (0%), ?ty: 6 (0%), !ty: 0
Inference:           76.89s, 512ginstr, 1227mb
MIR lowering:        14.17s, 95ginstr, 451mb
Mir failed bodies: 45 (0%)
Data layouts:        73.56ms, 378minstr, 19mb
Failed data layouts: 0 (0%)
Const evaluation:    38.08ms, 234minstr, 4mb
Failed const evals: 3 (0%)
Total:               106.40s, 728ginstr, 3958mb

# pr
Database loaded:     667.81ms, 528minstr, 96mb (metadata 299.37ms, 5472kinstr, 972kb; build 165.04ms, 13minstr, 47kb)
  item trees: 1289
Item Tree Collection: 715.85ms, 7590minstr, 126mb
  crates: 58, mods: 1140, decls: 29642, bodies: 28783, adts: 2045, consts: 1719
Item Collection:     10.53s, 83ginstr, 1487mb
Body lowering:       4.18s, 27ginstr, 642mb                                                                                                                                       
  exprs: 875276, ??ty: 66 (0%), ?ty: 131 (0%), !ty: 4                                                                                                                             
  pats: 192444, ??ty: 6 (0%), ?ty: 6 (0%), !ty: 0
Inference:           79.91s, 531ginstr, 1227mb
MIR lowering:        14.10s, 97ginstr, 451mb
Mir failed bodies: 45 (0%)
Data layouts:        75.20ms, 378minstr, 19mb
Failed data layouts: 0 (0%)
Const evaluation:    39.37ms, 230minstr, 4mb
Failed const evals: 3 (0%)
Total:               109.64s, 748ginstr, 3959mb

@davidbarsky davidbarsky force-pushed the davidbarsky/run-lru-at-end-of-analysis-stats branch from 334680d to fa89f29 Compare March 17, 2025 14:45
@davidbarsky
Copy link
Contributor Author

davidbarsky commented Mar 17, 2025

Fixed the incorrect placement of db.trigger_lru_eviction! That brought analysis-stats on Salsa from 1529mb to 937mb. On rust-analyzer (when run atop of #19359), the correct placement of db.trigger_lru_eviction brought analysis-stats from 4169mb to 2496mb.

@Veykril Veykril enabled auto-merge March 17, 2025 14:57
@Veykril Veykril added this pull request to the merge queue Mar 17, 2025
Merged via the queue into rust-lang:master with commit ef60b78 Mar 17, 2025
9 checks passed
@davidbarsky davidbarsky deleted the davidbarsky/run-lru-at-end-of-analysis-stats branch March 17, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants