Hi everybody. By chance, I had to develop my own profiler for the CLR and came across several incomprehensible points:

  1. As I understand it, the ICorProfilerCallback2::HandleCreated event is ICorProfilerCallback2::HandleCreated if a initialObjectId is generated for an object with an handleId , and the ICorProfilerCallback2::HandleDestroyed is called for a garbage collection handle if it was processed, that is, associated with The object has been deleted from memory. However, during the profiling process, I noticed that not all descriptors created by the HandleCreated call are called HandleDestroyed . What could be the cause and how should this be interpreted?
  2. When processing events, ICorProfilerCallback::MovedReferences noted the following: suppose we have two ranges of addresses A ... B and C ... D. During processing, objects from the C ... D range moved to E ... F, and what was in A ... B was destroyed. However, at the next garbage collection, the GC begins to actively move the memory blocks in the range A ... B, although they have already been cleared earlier and no objects were created in this address range. Is this some kind of feature of the GC or I do not take into account something? If I do not take into account something, then what? which way to look?
  3. And like a cherry on a cake: the objects corresponding to the range of addresses A ... B, which the GC trying to move so courageously, were found in the list of objects for which the garbage collection handle was not created.

All these 3 points do not allow to live in peace for the third day. Who faced similar help plizz)

    0