-
Notifications
You must be signed in to change notification settings - Fork 506
GC thread suspension #7807
Description
Maybe I just got something wrong here and I am looking at the wrong place.
My somewhat bigger test code finally runs stable for hours on my ARM64 system without trashing the heap or consuming all the physical memory. But so far it was only a single thread console application. For my use case I would need some threads.
As expected the GC need to suspend all managed threads to do a collection. For Windows there is some hijack code but the function for unix only contains a todo. I assume the reason for this is that the necessary os functions are missing. My target system has the same issue as I cannot suspend and resume threads there. As .net core should have the same issue on other posix systems I checked there and noticed that the jit engine has an option to inject gc probes. I assume that this is the only way to get the GC working in a multi thread environment were hijacking is not possible. Or did I missed something?
In the case I am right a short check showed me that the ilcompiler doesn't support the flags and callbacks for this yet?
Do I need to add this to get the GC working with multiple threads or have I looked at the wrong place?
If this the right place does it make any sense to aim for the inline version of the gc probe or can this never work with corert and the call variant is the only solution? I already checked the code and noticed that even if the inline variant can work the call needs still be implemented as it is used in more complicated cases.