- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
ignore head usages from ignored candidates #144991
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
ignore head usages from ignored candidates #144991
Conversation
| r? @SparrowLii rustbot has assigned @SparrowLii. Use  | 
| 
 | 
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
| @bors2 try @rust-timer queue | 
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
…=<try> ignore usages from ignored candidates
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
420245d    to
    32de28a      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
| Finished benchmarking commit (5c09e88): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with  @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy. 
 Max RSS (memory usage)Results (primary 2.5%, secondary 2.8%)A less reliable metric. May be of interest, but not used to determine the overall result above. 
 CyclesResults (secondary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above. 
 Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 463.057s -> 466.661s (0.78%) | 
| @bors2 try @rust-timer queue | 
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
…=<try> ignore usages from ignored candidates
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
| Finished benchmarking commit (546cb5f): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with  @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy. 
 Max RSS (memory usage)Results (primary 1.3%, secondary 1.4%)A less reliable metric. May be of interest, but not used to determine the overall result above. 
 CyclesResults (primary -2.4%, secondary -4.9%)A less reliable metric. May be of interest, but not used to determine the overall result above. 
 Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 465.439s -> 465.953s (0.11%) | 
c2e2c9e    to
    37ebce3      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
37ebce3    to
    aa3691e      
    Compare
  
    7e3e956    to
    8afe306      
    Compare
  
    | r=me if CI passes | 
| @bors r=BoxyUwU uwu | 
| ☀️ Test successful - checks-actions | 
| What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing ba412a6 (parent) -> c018ae5 (this PR) Test differencesShow 20 test diffsStage 1
 Stage 2
 Additionally, 18 doctest diffs were found. These are ignored, as they are noisy. Job group index 
 Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard c018ae5389c49cc4bcb8343d80dd8e7323325410 --output-dir test-dashboardAnd then open  Job duration changes
 How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance | 
| Finished benchmarking commit (c018ae5): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps: 
 @rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy. 
 Max RSS (memory usage)Results (primary 7.3%, secondary 1.4%)A less reliable metric. May be of interest, but not used to determine the overall result above. 
 CyclesResults (primary -3.6%, secondary 2.8%)A less reliable metric. May be of interest, but not used to determine the overall result above. 
 Binary sizeResults (primary -0.5%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above. 
 Bootstrap: 471.246s -> 472.048s (0.17%) | 
| Regressions look like noise/bimodality to me. | 
Fixes rust-lang/trait-system-refactor-initiative#210. The test now takes 0.8s to compile, which seems good enough to me. We are actually still walking the entire graph here, we're just avoiding unnecessary reruns.
The basic idea is that if we've only accessed a cycle head inside of a candidate which didn't impact the final result of our goal, we don't need to rerun that cycle head even if is the used provisional result differs from the final result.
We also use this information when rebasing goals over their cycle heads. If a goal doesn't actually depend on the result of that cycle head, rebasing always succeeds. However, we still need to make sure we track the fact that we relied on the cycle head at all to avoid query instability.
It is implemented by tracking the number of
HeadUsagesfor every head while evaluating goals. We then also track the head usages while evaluating a single candidate, which the search graph returns asCandidateHeadUsages. If there is now an always applicable candidate candidate we know that all other candidates with that source did not matter. We then callfn ignore_candidate_head_usagesto remove the usages while evaluating this single candidate from the total. If the finalHeadUsagesend up empty, we know that the result of this cycle head did not matter when evaluating its nested goals.