【问题标题】:Is it possible to use the dotnet tracing libraries on macOS?是否可以在 macOS 上使用 dotnet 跟踪库?
【发布时间】:2020-04-08 18:26:09
【问题描述】:

我浏览了位于https://github.com/microsoft/eventtracing-processing-samples 的示例事件跟踪项目并成功构建了这些项目。我遇到了丢失的dll。例如,在运行 CountProcesses 示例时,我遇到了以下堆栈跟踪:

mono CountProcesses.exe test.etl

Unhandled Exception:
System.DllNotFoundException: msi.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Microsoft.Windows.EventTracing.NativeMethods.MsiGetSummaryInformationW(uint,string,uint,uint&)
  at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetRevisionNumber (System.String msiPath) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0 
  at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetOrCreateDefaultToolkitPath (System.IO.TextWriter output) [0x00054] in <bdfe3783769b4c6f90b3788d264e0262>:0 
  at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings, Microsoft.Windows.EventTracing.ITraceProcessorSettings& effectiveSettings) [0x000a8] in <bdfe3783769b4c6f90b3788d264e0262>:0 
  at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0 
  at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0 
  at Program.Run (System.String tracePath) [0x00001] in <2e2989aba7be4139841be131a5e978bb>:0 
  at Program.Main (System.String[] args) [0x00027] in <2e2989aba7be4139841be131a5e978bb>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: msi.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Microsoft.Windows.EventTracing.NativeMethods.MsiGetSummaryInformationW(uint,string,uint,uint&)
  at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetRevisionNumber (System.String msiPath) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0 
  at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetOrCreateDefaultToolkitPath (System.IO.TextWriter output) [0x00054] in <bdfe3783769b4c6f90b3788d264e0262>:0 
  at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings, Microsoft.Windows.EventTracing.ITraceProcessorSettings& effectiveSettings) [0x000a8] in <bdfe3783769b4c6f90b3788d264e0262>:0 
  at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0 
  at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0 
  at Program.Run (System.String tracePath) [0x00001] in <2e2989aba7be4139841be131a5e978bb>:0 
  at Program.Main (System.String[] args) [0x00027] in <2e2989aba7be4139841be131a5e978bb>:0 

在深入挖掘缺失的库之前,跟踪处理是否旨在跨平台?还是依赖于 Windows 中的平台相关库?

系统设置:

  • 操作系统:macOS Catalina 10.15.4
  • Mono JIT 编译器版本 6.8.0.105(2019-10/82fffe07497 Tue Feb 4 10:09:51 EST 2020)
  • .NET Core SDK (3.1.201)

【问题讨论】:

    标签: .net-traceprocessing


    【解决方案1】:

    (我是 Microsoft 的一名开发人员,从事 TraceProcessor 项目。)

    目前,该库依赖于一些仅限 Windows 的组件,无法在 Mac 上运行。

    【讨论】:

    • 您知道是否有任何用于处理 ETW(特别是 .etl 文件)的 macos/linux 替代方案?
    • 不幸的是,我所知道的没有。包含破解打开 ETL 文件所需的 OpenTraceProcessTrace 方法的库是 Windows 特定的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-15
    • 1970-01-01
    • 1970-01-01
    • 2023-03-12
    • 1970-01-01
    • 2012-11-30
    相关资源
    最近更新 更多