added a lightweight GC profiling option (dotnet/coreclr#22866)
authorMaoni Stephens <Maoni0@users.noreply.github.com>
Thu, 28 Feb 2019 00:35:03 +0000 (16:35 -0800)
committerGitHub <noreply@github.com>
Thu, 28 Feb 2019 00:35:03 +0000 (16:35 -0800)
commitd0c8b8cb3553ede4dd23e09a1f92e31c146242b4
treee16c22e7d297022c5b0ec010b3c1e4989aead239
parent9a910456b8d6c515f750239b384f28c070c3a018
added a lightweight GC profiling option (dotnet/coreclr#22866)

added a profiling event mask in the high 32-bit, COR_PRF_HIGH_BASIC_GC, for basic GC monitoring. it can be set via `ICorProfilerInfo5::SetEventMask2`. all this gives you is

    * GC start callback

    * GC end callback

    * update generational bounds

note that one different behavior between this and the existing COR_PRF_MONITOR_GC is, aside from the obvious that it doesn't give you any info beyond the above, is that the GC end callback + update generational bounds are enabled for _all_ GCs, not just non concurrent GCs. I kept the behavior the same for COR_PRF_MONITOR_GC because I don't want to risk breaking existing profiling tools that do not anticipate these for concurrent GCs.

Commit migrated from https://github.com/dotnet/coreclr/commit/ea099fba14da84c3e81eb8d5ad93ecae7c659489
src/coreclr/src/inc/corprof.idl
src/coreclr/src/inc/profilepriv.inl
src/coreclr/src/pal/prebuilt/inc/corprof.h
src/coreclr/src/vm/eetoprofinterfaceimpl.cpp
src/coreclr/src/vm/gcenv.ee.cpp
src/coreclr/src/vm/proftoeeinterfaceimpl.cpp