PerfView-当文件已存在时,无法创建该文件。(来自HRESULT的异常:0x800700B7)

PerfView-当文件已存在时,无法创建该文件。(来自HRESULT的异常:0x800700B7),perfview,Perfview,当我尝试使用PerfView v1.9.0.0(Collect->Collect->Start Collection,使用默认参数)创建ETL文件时,操作失败,说明“发生了异常情况,请参阅日志了解详细信息。” 以下是我在日志中看到的内容: 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 S

当我尝试使用PerfView v1.9.0.0(Collect->Collect->Start Collection,使用默认参数)创建ETL文件时,操作失败,说明“发生了异常情况,请参阅日志了解详细信息。

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

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.
从命令行开始:“C:\Users\XYZ\Desktop\PerfView.exe”
PerfView版本:1.9.0.0构建日期:2016年12月2日星期五11:19:34.83
开始:查看
警告:在C:\Users\XYZ\Desktop\PerfViewExtensions\PdbScope.exe中找不到PdbScope
禁用“图像大小”菜单项。
警告:在C:\Users\XYZ\Desktop\PerfViewExtensions\ILSize.dll中找不到ILSize
禁用IL大小菜单项。
已完成:查看(运行时间:0.021秒)
“收集”对话框打开。
已开始:收集数据C:\Users\XYZ\Desktop\PerfViewData.etl
[内核日志:C:\Users\XYZ\Desktop\PerfViewData.Kernel.etl]
已启用内核关键字:默认值
正在中止对会话“NT内核记录器”和“PerfViewSession”的跟踪。
确保未安装.NET分配探查器。
已完成:收集数据C:\Users\XYZ\Desktop\PerfViewData.etl(运行时间:1.300秒)
发生异常:System.Runtime.InteropServices.COMException(0x800700B7):当文件已存在时,无法创建该文件。(来自HRESULT的异常:0x800700B7)
在System.Runtime.InteropServices.Marshal.ThroweExceptionForhr内部(Int32 errorCode,IntPtr errorInfo)
位于Microsoft.Diagnostics.Tracing.Session.TraceeEventSession.EnableKernelProvider(关键字标志、关键字捕获)
在PerfView.CommandProcessor.Start(CommandLineArgs-parsedArgs)
在PerfView.CommandProcessor.Collect(CommandLineArgs-parsedArgs)上
在PerfView.MainWindow.c__;u DisplayClass13_0.b_u0()中
在PerfView.StatusBar.c_uuuu显示器上Class19_0.b_uu0(对象)
发生异常情况,有关详细信息,请参阅日志。
当然,该文件以前不存在,在(失败)操作之后也不存在。无论我提供的文件名或目录如何,每次尝试收集时都会发生这种情况


我做错了什么?谢谢你的建议。我确实在使用Windows7,而且我正在运行。停止Process Hacker后,PerfView能够成功执行收集。干杯。

在Windows 7之前,您只能使用一个名为的内核会话。从Windows 8开始,您可以使用其他名称创建新会话

在Windows 8、Windows Server 2012及更高版本上,SystemTraceProvider 最多可多路传输8个记录器会话。前两个插槽 for logger会话是为NT内核记录器和 循环内核上下文记录器


因此,请停止使用
NT内核记录器的工具(如Process Explorer、Process Hacker、Resmon)来解决此问题。

如果使用Windows 7,请停止使用ETW(Process Explorer、Resmon)的其他工具,谢谢。我一直在Windows7上运行Process Explorer,从未想过这是个问题。杀了它,我突然可以运行分析器了!