ICorProfilerCallback::JITCachedFunctionSearchFinished 方法ICorProfilerCallback::JITCachedFunctionSearchFinished Method

通知探查器搜索已完成先前使用本机映像生成器(Ngen.exe)编译的函数。Notifies the profiler that a search has finished for a function that was compiled previously using the Native Image Generator (NGen.exe).


HRESULT JITCachedFunctionSearchFinished(  
    [in] FunctionID        functionId,  
    [in] COR_PRF_JIT_CACHE result);  


  • functionId

    [in] 执行搜索的函数的 ID。[in] The ID of the function for which the search was performed.

  • result

    [in] 指示搜索结果的COR_PRF_JIT_CACHE枚举的值。[in] A value of the COR_PRF_JIT_CACHE enumeration that indicates the result of the search.


在 .NET Framework 版本2.0 中,将不会对常规 NGen 映像中的所有函数执行ICorProfilerCallback:: JITCachedFunctionSearchStartedJITCachedFunctionSearchFinished 回调。In the .NET Framework version 2.0, the ICorProfilerCallback::JITCachedFunctionSearchStarted and JITCachedFunctionSearchFinished callbacks will not be made for all functions in regular NGen images. 只有针对探查器优化的 NGen 映像将为映像中的所有函数生成回调。Only NGen images optimized for a profiler will generate callbacks for all functions in the image. 但是,由于额外的开销,如果探查器打算使用这些回调来强制实时(JIT)编译函数,则它应请求探查器优化的 NGen 映像。However, due to the additional overhead, a profiler should request profiler-optimized NGen images only if it intends to use these callbacks to force a function to be compiled just-in-time (JIT). 否则,探查器应使用延迟策略来收集函数信息。Otherwise, the profiler should use a lazy strategy for gathering function information.


平台: 请参阅系统要求Platforms: See System Requirements.

头文件: CorProf.idl、CorProf.hHeader: CorProf.idl, CorProf.h

库: CorGuids.libLibrary: CorGuids.lib

.NET Framework 版本:自 2.0 之后可用Available since 2.0.NET Framework Versions: 自 2.0 之后可用Available since 2.0

另请参阅See also