这是什么CopyPDBs功能(从clr.dll)在做什么? [英] What is this CopyPDBs function (from clr.dll) doing?

查看:711
本文介绍了这是什么CopyPDBs功能(从clr.dll)在做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用进程资源管理器来分析运行IIS的生产环境中的ASP.NET MVC应用程序,我发现了很多电话本 CopyPDBs 功能从 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll

When using Process Explorer to analyze an ASP.NET MVC application in a production environment running IIS, I've noticed a lot of calls to this CopyPDBs function from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll:

所有这些都具有完全相同的堆栈跟踪:

All of them are having the exact same stack trace:

ntdll.dll!ZwWaitForSingleObject+0xa
KERNELBASE.dll!WaitForSingleObjectEx+0x98
clr.dll!GetMetaDataInternalInterface+0x3064a
clr.dll!GetMetaDataInternalInterface+0x30732
clr.dll!GetMetaDataInternalInterface+0x306e5
clr.dll!CopyPDBs+0x44a2
KERNEL32.DLL!BaseThreadInitThunk+0x22
ntdll.dll!RtlUserThreadStart+0x34

我的问题是:什么是从 CopyPDBs 功能> clr.dll 究竟在做什么?

My question is: What is this CopyPDBs function from the clr.dll exactly doing?

我已经搜查了很多,但仍无法找到任何exaplanation和/或。本函数的文档

I've searched a lot but still can't find any exaplanation and/or documentation of this function.

注:这个问题以某种方式与我的前一个问题,问ServerFault:的http://serverfault.com/questions/684554/high -cpu使用率-的-IIS-进程W3WP-EXE-因为-的一对多慢-CLR-dllcopypdbs

推荐答案

它没有做任何事情。进程资源管理器无法访问为clr.dll PDB文件,因此它不会不够了解的代码。总是很明显的,当你在指令从已知的符号偏移, + 0x44a2 长,早已过了CopyPDBs()函数。所有你从clr.dll看到符号的都是垃圾。从ntdll.dll中的符号都不错,注意小偏移。

It is not doing anything. Process Explorer does not have access to the PDB file for clr.dll so it doesn't know enough about the code. Always very evident when you look at the instruction offset from the known symbol, +0x44a2 is long, long past the CopyPDBs() function. All of the symbols you see from clr.dll are junk. The symbols from ntdll.dll are good, note the small offsets.

如果没有提供一个DLL的内部函数符号的PDB文件,调试器只能依靠出口功能。 Clr.dll没有多少人。

Without a PDB file that provides symbols for internal functions in a DLL, a debugger can only rely on exported functions. Clr.dll does not have many of them.

帮助Process Explorer中表现出更好的堆栈跟踪是的this博客文章

Helping Process Explorer show better stack traces is the subject of this blog post.

WinDBG的是不是唯一的方法,你也可以使用Visual Studio做到这一点:

Windbg isn't the only way, you can also do it with Visual Studio:


  1. 工具>选项>调试>符号。勾选Microsoft符号
    服务器复选框,并选择一个缓存目录。

  2. 项目>属性>调试>勾选启用本地代码调试选项。

  3. 按F5,你会看到调试器下载的符号。需要一段时间,就发生一次。

  4. 告诉Process Explorer的关于您的选项>配置符号挑的缓存目录。

  1. Tools > Options > Debugging > Symbols. Tick the "Microsoft Symbol Servers" checkbox and select a cache directory.
  2. Project > Properties > Debug > tick the "Enable native code debugging" option.
  3. Press F5, you'll see the debugger downloading the symbols. Takes a while, it happens just once.
  4. Tell Process Explorer about the cache directory you picked with Options > Configure Symbols.

这篇关于这是什么CopyPDBs功能(从clr.dll)在做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆