Repository navigation
Profiler: F# match code keeps its file, and the FsOrderLedger burn loop is sampled where it runs - #409
Merged
Conversation
…op is sampled where it runs (#408)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Fixes two defects that made the F# profiler suites flaky (#408). An F# CPU sample in a
match's decision tree now keeps its method's file, and FsOrderLedger's burn loop is now sampled where it actually runs.Details
lspkite6e4172 → 3cd5896 (Profiler: a CPU sample in hidden F# match code keeps its method's file lspkit#19, fixes lspkit#18):Symbolizergives a frame on a hidden sequence point its method's nearest visible sequence point, or the method's first, read from the PDB throughSourceLocator. A method with no visible point, such as a compiler-generated closure, stays unlocated.Csv.parseLine, and it failed the Windows profiler chunk on Razor review fixes (#399–#407) and Blazor and Razor docs, film and post #406 (run 39364686929).HotLeakAppFsgainsMatching.fsand aclassifycommand. The Program.fs lines SharpLsp'sprofiler-fsharp-e2epins (up to 97) are unchanged.FsOrderLedgerGate.fsandProgram.fs: the burn tick no longer takes the process-wide gate.priceAllsnapshots under the ledger's own lock).priceAllat the 2% hot-function threshold, and "the burn loop is hot" failed two runs in three on macOS.PRICE_ALL(Ledger.fs 63–70) still holds.docs/plans/PROFILER-PLAN.md: both defects join the F# real-program list.How Do The Automated Tests Prove It Works?
cpu_samples_in_fsharp_match_code_keep_their_file: before the fix,Matching.classifycame back twice, with 948 samples located and 179 unlocated. After the fix it passes unchanged. lspkit CI is green on the PR (run 39371497743) and on main (run 39371510065).run parse):Csv.parseLinewent from 1592 located and 2507 unlocated samples to 3271 located and none unlocated.profiler-fsharp-soak-cpu-e2e):priceAllon 100% of the burn thread's samples, up from 1.6%.profilerVS Code chunk passes locally on macOS against this branch: 323/323. This PR's pipeline re-checks it on Linux and Windows, where the F# CPU and soak suites assert each named function's file.Closes #408.