none
Custom ETW Sources on Phone 8.1 Store Apps RRS feed

  • Question

  • Windows Phone 8.1 seems to provide APIs to generate custom ETW events. For example, if you write a C# Windows Store Phone app, the EventSource class in the System.Diagnostics.Tracing namespace is available. You can derive a class from this, and define customs events in the same way you would on the full .NET framework. And you can also use an EventListener-derived class to collect the events.

    But what I want to be able to do is analyse both my custom events and some system events simultaneously - I want to be able to see my custom events in context in a trace of the kind you can collect with the Performance Recorder in the Windows Phone Developer Power Tools. (I'd like to see when my custom events occur in relation to system events to understand how my code interacts with the system.)

    But I can't see a way of doing this. The Performance Recorder only seems to support some predefined profiles--there doesn't seem to be a way to define a custom profile at all (let alone include custom events in a profile). This is possible using the desktop performance tools, but apparently it's not possible with the Windows Phone tools?

    Is there some in-process way to manage this? Is there a way I could add code to my app that will collect to a .ETL file (rather than just invoking methods on my custom EventListener-derived class)? If I could do that, then it would then be possible to save that .ETL file out, and then use xperf to merge it into the .ETL of system events collected by the Performance Recorder in the Power Tools?

    Or is there some other way I can get custom ETW events into the perf analysis tools?

    Monday, June 9, 2014 8:13 AM

All replies

  • I don't believe there is any way to pick up custom ETW logs using the SDK tools but I have not yet had a chance to look into other methods of collecting the trace logs.


    Eric Fleck, Windows Store and Windows Phone Developer Support. If you would like to provide feedback or suggestions for future improvements to the Windows Phone SDK please go to http://wpdev.uservoice.com/ where you can post your suggestions and/or cast your votes for existing suggestions.

    Tuesday, June 10, 2014 7:51 PM
  • ok, it is possible with the App Field Medic.

    You'll have to create a Windows Performance recorder Profile (.wprp). connect the phone to the PC via USB and store it under This PC\Windows Phone\Phone\FieldMedic\CustomProfiles

    When now start the Field Medic App, go to advanced and here you find the new profile under Custom Group. Select this and start logging.

    This way you can capture custom events.

    Source:

    https://mmaitre314.github.io/2014/12/01/field-medic-custom-logging.html

    Monday, December 29, 2014 10:23 AM