locked
Using regions of interest files in WPT 8.1 RRS feed

  • Question

  • The Regions of Interest feature in Windows Performance Toolkit (WPT) 8.1 looks promising, but I can't figure out how to make it work with our events.

    We mark time ranges with generic begin/end events and we allow nesting. If I create a regions of interest file using "Regions based on events" as described at http://msdn.microsoft.com/en-us/library/dn450840.aspx then the nesting of events is not respected and the begin/end events are not matched up correctly. That's not surprising since WPA can't be expected to understand my nesting. If I could tell it to only match up events whose descriptive names and 'depth' fields matched then I might be able to make this work, but that doesn't appear to be an option.

    I then tried creating a region based on duration. My end events contain the end time (implicitly by their location in the trace) and the event duration (as a custom field). That seemed perfect, but the implementation doesn't seem to make sense. The documentation suggests that I should have the Duration tag in the Start tag, and then have an Event Provider tag in the Stop tag. That would work if WPA would use the same event for the start and stop events, but it doesn't. If I have three stop events in my trace then WPA seems to grab the durations from all three, grab the stop times from all three, and then combine them in almost every way possible. I end up with five to eight different regions from the three events!

    This makes no sense. There must be a way to tell WPA to just grab the duration and stop time from the same event. Otherwise this cool new feature appears to be useless.

    Okay, not entirely useless. I can use the PayloadIdentifier to specify particular events and get them to match up better. However this means that whenever I add a new named region to my game I have to add it to the regions-of-interest file. That takes what should be an elegant an awesome feature and makes it cumbersome and annoying. And, if the names get reused there is still no guarantee that WPA will match them up correctly.

    Please advise on how to use this correctly. For an example of the sort of nested begin/end event pairs that I use (and that I recommend others use) see this blog post:

    http://randomascii.wordpress.com/2013/04/20/xperf-basics-recording-a-trace-the-easy-way/

    Sunday, October 27, 2013 5:47 PM