Search Unity

Logging custom ETW events (IL2CPP)

Discussion in 'Windows' started by briank, Jan 17, 2019.

  1. briank

    briank

    Joined:
    Mar 25, 2017
    Posts:
    74
    I've been trying to diagnose a performance issue and am digging deep into ETW traces, but it's hard to make progress without having some custom ETW events to provide more context to the trace. Unfortunately I haven't found any guidance about tracing custom ETW events from Unity (UWP/IL2CPP).

    I did try the .NET EventSource API, and while that can be translated to IL2CPP and built successfully, it appears to do nothing.

    Is there a quick way to log some custom ETW events? Otherwise, I think native plugin is the only way to go.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Native plugin might be the right way to do this today. EventSource APIs seem to be unimplemented in Mono class libraries, although we do have an active bug on that and will address it at some point.
     
  3. briank

    briank

    Joined:
    Mar 25, 2017
    Posts:
    74
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    I'm glad you found a solution! I wasn't aware that there was an API in Windows Runtime for this.
     
    briank likes this.