首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PerfView -当文件已经存在时不能创建该文件。(HRESULT例外: 0x800700B7)

PerfView -当文件已经存在时不能创建该文件。(HRESULT例外: 0x800700B7)
EN

Stack Overflow用户
提问于 2017-07-12 22:11:52
回答 2查看 1.5K关注 0票数 0

当我尝试使用PerfView v1.9.0.0 (收集->收集->启动集,带有默认参数)创建ETL文件时,操作失败,说明“发生了异常情况,请参阅日志获取详细信息.”。

下面是我在日志中看到的内容:

代码语言:javascript
复制
Started with command line: "C:\Users\XYZ\Desktop\PerfView.exe" 
PerfView Version: 1.9.0.0  BuildDate: Fri 02/12/2016 11:19:34.83
Started: View
Warning: PdbScope not found at C:\Users\XYZ\Desktop\PerfViewExtensions\PdbScope.exe
Disabling the Image Size Menu Item.
Warning: ILSize not found at C:\Users\XYZ\Desktop\PerfViewExtensions\ILSize.dll
Disabling the IL Size Menu Item.
Completed: View   (Elapsed Time: 0.021 sec)
Collection Dialog open.
Started: Collecting data C:\Users\XYZ\Desktop\PerfViewData.etl
[Kernel Log: C:\Users\XYZ\Desktop\PerfViewData.kernel.etl]
Kernel keywords enabled: Default
Aborting tracing for sessions 'NT Kernel Logger' and 'PerfViewSession'.
Insuring .NET Allocation profiler not installed.
Completed: Collecting data C:\Users\XYZ\Desktop\PerfViewData.etl   (Elapsed Time: 1.300 sec)
Exception Occurred: System.Runtime.InteropServices.COMException (0x800700B7): Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.EnableKernelProvider(Keywords flags, Keywords stackCapture)
   at PerfView.CommandProcessor.Start(CommandLineArgs parsedArgs)
   at PerfView.CommandProcessor.Collect(CommandLineArgs parsedArgs)
   at PerfView.MainWindow.<>c__DisplayClass13_0.<ExecuteCommand>b__0()
   at PerfView.StatusBar.<>c__DisplayClass19_0.<StartWork>b__0(Object <state>)
An exceptional condition occurred, see log for details.

当然,该文件以前从未存在过,在(失败)操作之后也不存在。无论我提供的文件名或目录如何,每次尝试收集时都会发生这种情况。

我做错了什么?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-07-14 15:11:23

在Windows 7之前,只能使用名为NT内核记录器的一个内核会话。从Windows 8开始,您可以使用不同的名称创建新会话。

在Windows8、Windows 2012和更高版本上,SystemTraceProvider最多可复用8个记录器会话。记录器会话的前两个插槽是为NT内核logger和循环内核上下文Logger保留的。

因此,停止使用NT Kernel Logger (如Process、Process、Resmon)解决问题的工具。

票数 2
EN

Stack Overflow用户

发布于 2017-07-13 21:37:24

谢谢magicandre1981的建议。我确实使用的是Windows 7,我运行的是过程黑客。在停止Process之后,PerfView能够成功地执行该集合。干杯。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45068332

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档