-
Notifications
You must be signed in to change notification settings - Fork 509
Conversation
Looks like I'm still failing a test on OSX locally - will investigate. |
@@ -96,7 +96,7 @@ inline HRESULT HRESULT_FROM_WIN32(unsigned long x) | |||
#define UNREFERENCED_PARAMETER(P) (void)(P) | |||
|
|||
#ifdef PLATFORM_UNIX | |||
#define _vsnprintf vsnprintf | |||
#define _vsnprintf_s(string, sizeInBytes, count, format, args) vsnprintf(string, sizeInBytes, format, args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am surprised that this compiles - args can be variable number of arguments. Does this need to use some kind of open args syntax to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the usage it seems like args
is always a va_list
(and that seems consistent with the Windows CRT definition of _vsnprintf_s).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see.
The failure is an assert in gc.cpp:
|
Removing the assert sounds good to me. Separately, I think it would be useful to get rid of IsGCThread method completely in the GC - it should be possible looking at the few places where it is used. |
@@ -1148,6 +1167,180 @@ Thread* GCToEEInterface::CreateBackgroundThread(GCBackgroundThreadFunction threa | |||
return threadStubArgs.m_pThread; | |||
} | |||
|
|||
void GCToEEInterface::DiagGCStart(int gen, bool isInduced) | |||
{ | |||
#ifdef GC_PROFILING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think that GC_PROFILING
is ever defined in CoreRT/ProjectN. These methods should have empty implementations; or have just the event trace stuff in them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok!
You should build this change in the ProjectN tree and make sure that perfview for GC analysis still works. I do not think that what you have has the event tracing done correctly (because of it is under GC_PROFILING define). |
@jkotas why would you want to remove IsGCThread? it's useful - we want to be sure that certain things are only called on the GC threads or the thread that did the suspension. |
If you think IsGCThread is useful, it would be best for the GC to keep track of it itself. I do not see a good reason why the EE should keep track of it for the GC. |
the name is misleading - it's not just checking if it's a GC thread; it's also checking if it's the thread that did the suspension. so it's not that EE is keeping track of it - it's just a general util in the common header that checks for thread types and both GC and EE use. I do think it makes more sense for the GC side to keep track of it. |
@jkotas I'm seeing that I'm going to need to make some modifications to ProjectN in order for this to compile (apparently I was not building correctly when I was validating this earlier) - should I close this PR and do a code review/check everything into ProjectN instead and let it propagate back to this repo? |
CoreCLR kept track of thread types for historic reasons, and we have bolted the GC thread types onto it. There is nothing like that in MRT because of it does not need it - that's why it has a dummy implementation of it. |
Yes, it would make things easier. (You can still use this PR to verify that what you get passes CI on Unix.) |
@swgillespie |
@jkotas fixed, thanks! |
… number of GC changes done within the last month or two from CoreCLR to CoreRT. The only changes to anything in Native/gc are: 1. Move an assert under #ifndef FEATURE_REDHAWK since it only is a useful assert on CoreCLR (#2485 (comment)) 2. Add UNREFERENCED_PARAMETERs to things in gc.cpp and elsewhere that were producing warnings All other changes in Native/gc are directly from CoreCLR without modification. I have validated that I am able to do PerfView GC analysis with these changes (since the CoreCLR changes touched ETW eventing). [tfs-changeset: 1644465]
Checked in via mirror |
This PR contains code for CoreCLR PRs dotnet/coreclr#8605. dotnet/coreclr#8709, dotnet/coreclr#8568, dotnet/coreclr#8336, and dotnet/coreclr#8199.
Minimal modifications were required on the runtime side to accommodate these GC changes. The largest changes came from moving some GC diagnostics to the runtime (from Maoni's PR) - I am unsure about the changes that I brought to
gcrhenv.cpp
since I lack some of the context regarding theGC_PROFILING
feature define, so I would welcome feedback on that. Other than that change, there should not be any surprises in this PR.