Questions tagged [clr-profiling-api]

The Common Language Runtime (CLR) Profiling API is a set of native unmanaged interfaces useful for implementing .NET profilers. It primarily consists of the ICorProfilerCallback and ICorProfilerInfo interface families.

The Common Language Runtime (CLR) Profiling API is a set of native unmanaged interfaces useful for implementing .NET profilers.

The primary interfaces are:

  • ICorProfilerCallback - for receiving notifications regarding various events in the CLR, including Class Loading, Just-In-Time Compilation, and Garbage Collection.

  • ICorProfilerInfo- for querying information regarding the different application entities, such as objects, classes, functions, modules and assemblies.

For a complete reference, refer to Microsoft's official documentation:
Microsoft Unmanaged API Reference / Profiling Interfaces.

54 questions
0
votes
0 answers

Is there any profiling api available for applications hosted with clr version as no managed code in IIS

I'm using clr profiling api to track all the loaded assemblies, classes in the applications running in IIS. It works perfectly fine when my appication pool's .net clr version is set to v2.0 or v 4.0. But the clr profiling api is not working when…
Zader
  • 67
  • 7
0
votes
2 answers

ICorProfilerCallback2 : Unable to differentiate handled and unhandled exception from exception events

I'm using ICorProfilerCallback2 interface to implement a profiler to monitor all the unhandled/uncaught exceptions occurs in any .net application. The ExceptionThrown event helps me to find all the exceptions(caughed/uncaughed exceptions) occured in…
Zader
  • 67
  • 7
0
votes
0 answers

Code injection does not work along with FILE* for logging

In our project, we are injecting the code at various places by rewriting the IL using .Net CorProfiler APIs. Everything works fine. Now, for logging purpose, we have started opening a file using FILE* as shown below - FILE* ptLogFile =…
Hitesh
  • 1,067
  • 1
  • 10
  • 27
0
votes
1 answer

Code injection does not work with MSCorLib in .Net 2.x

In our .Net application, we want to keep track of a file that is getting opened through .Net Code. Any file that is getting opened, execution call always pass through an internal instance method FileStrem.Init(...) which available in mscorlib. To…
Hitesh
  • 1,067
  • 1
  • 10
  • 27
0
votes
1 answer

Define TypeSpec from TypeRef for .Net IL

I have built custom IL Rewriter that inject custom code into some methods. Part of this injection, I want to instantiate the object of List. I already found the mdTokenRef for List~1. From this mdTokenRef, how do I define or obtain TypeSpec? I…
Hitesh
  • 1,067
  • 1
  • 10
  • 27
0
votes
1 answer

C# icorprofilercallback4::SurvivingReferences

I would like to be able to find all the surviving references of some kind of object in any application without having to use an external memory profiler. My basic idea is that, I just want to be able to list all the alived UserControls inside my app…
pix
  • 1,264
  • 19
  • 32
0
votes
1 answer

CLR Profiling and Rewriting using ICLRProfiling::AttachProfiler()

I gather the main benefit of using the CLR Profiler ICLRProfiling::AttachProfiler method is that you now can attach your CLR profiler long after the target process has started and that you also don't have to pass the COR_ENABLE_PROFILING and…
user152949
0
votes
1 answer

.Net Profiling - Knowing the managed thread begin and end

I am developing a .Net profiler.. I use ILRewriting for this.. I need to trace the managed thread creations and destroys. Need to know the threading related function that will be called at the beginning of the thread and during the end of the…
Sel_va
  • 588
  • 5
  • 25
0
votes
0 answers

CLR Profiling API Version

I have a CLR profiler that I have written which injects code into methods at JIT time. The code I inject depends on .NET 3.5+. How can I detect the version of the .NET Framework that is available at profiler initialization time…
Micah Zoltu
  • 6,764
  • 5
  • 44
  • 72
1 2 3
4