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 the places where we are still using Gens.GenLargeObj incorrectly #2024

Open
Maoni0 opened this issue Apr 17, 2024 · 0 comments
Open

fix the places where we are still using Gens.GenLargeObj incorrectly #2024

Maoni0 opened this issue Apr 17, 2024 · 0 comments

Comments

@Maoni0
Copy link
Contributor

Maoni0 commented Apr 17, 2024

there are still places that mention Gens.GenLargeObj but should include POH. in TraceManagedProcess.cs -

  • SurvivalPercent
  • OnEnd - when we update UserAllocated and GenSizeBeforeMB.
  • GetFreeListEfficiency - should filter out POH
  • GetAllocedSinceLastGCMB
  • GetUserAllocated - only in assert
  • AllocedSinceLastGCBasedOnAllocTickMB
  • GetUserAllocatedPerHeap - there's a remark about LOH; on new enough versions we always fill in size_before/size_after (but I don't remember if this was changed before or after we added POH)
  • GetHeapSizeBeforeMB - this one needs to get all generations. however while changing it I discovered it problems with PerHeapHistories. PerHeapHistories.Count is still 0 for BGC at OnEnd time because BGC' OnEnd is called during the processing of the HeapStats event while for blocking GCs it's at RestartEEStop. PerHeapHistories.Count is still 0 for BGC's HeapStats event because we have't called fire_pevents yet. I think we should fix this on the runtime side and call fire_pevents before calling do_post_gc in bgc_thread_function. also the handling of PerHeapHistories is questionable, for example, we should not have this line

if (_event.PerHeapHistories == null) { _event.PerHeapHistories = new List<GCPerHeapHistory>(); }
in ProcessPerHeapHistory as it should always be allocated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant