What does RtlInitializeExceptionChain do, and how can I reduce its execution overhead?(RtlInitializeExceptionChain 有什么作用,如何减少它的执行开销?)
问题描述
我正在尝试在我的程序中找到瓶颈(目前处于唾手可得"阶段),并使用分析器得到如下结果:
I am trying to find bottlenecks in my program (currently in the "low-hanging fruit" stage), and using a profiler I get something like the following:
我在这里看到的是 RtlInitializeExceptionChain 占用了大部分时间,而我实际程序中的函数甚至没有进入这个顶级列表.我想知道是否有人知道 RtlInitializeExceptionChain 是做什么的,它是如何被调用的,以及我如何重新组织我的程序以减少调用它的次数?
The thing I see in this is that RtlInitializeExceptionChain takes up the far majority of the time, and functions from my actual program don't even make it onto this top list. I would like to know if anyone knows what RtlInitializeExceptionChain does, how it is called, and how I can reorganize my program to not call it so much?
关于我的项目的一些其他信息:它是一个使用 ATL 的 COM API,被分析的程序是一个使用这个 API 的测试"C++ 程序.
Some other information about my project: it is a COM API using ATL, and the program being profiled is a "testing" C++ program which consumes this API.
谢谢!
推荐答案
RtlInitializeExceptionChain 是运行时库中的一个内部函数,是内核模式驱动程序和操作系统本身使用的内核模式支持函数的集合.它是 C 运行时库的内核模式版本.
RtlInitializeExceptionChain is an internal function in the Run-Time Library, a collection of kernel-mode support functions used by kernel-mode drivers and the OS itself. It's kind of the kernel-mode version of the C run-time library.
如果您的应用程序是 32 位的,并且您在 64 位机器上对其进行分析,那么在 32 位机器上对其进行分析或构建 64 位版本可能会将 RtlInitializeExceptionChain 移出前 10 名,因为它是总是用于thunking.
If your application is 32-bit and you're profiling it on a 64-bit machine, profiling it on a 32-bit machine or building a 64-bit version will probably move RtlInitializeExceptionChain out of the top 10 list since it's always used in thunking.
否则,您几乎肯定无能为力.
Otherwise, there's almost certainly nothing you can do about it.
这篇关于RtlInitializeExceptionChain 有什么作用,如何减少它的执行开销?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:RtlInitializeExceptionChain 有什么作用,如何减少它的执行开销?
- 静态初始化顺序失败 2022-01-01
- 与 int by int 相比,为什么执行 float by float 矩阵乘法更快? 2021-01-01
- 从python回调到c++的选项 2022-11-16
- 使用/clr 时出现 LNK2022 错误 2022-01-01
- Stroustrup 的 Simple_window.h 2022-01-01
- 如何对自定义类的向量使用std::find()? 2022-11-07
- 近似搜索的工作原理 2021-01-01
- C++ 协变模板 2021-01-01
- 一起使用 MPI 和 OpenCV 时出现分段错误 2022-01-01
- STL 中有 dereference_iterator 吗? 2022-01-01
