google / UIforETW

User interface for recording and managing ETW traces
https://randomascii.wordpress.com/2015/04/14/uiforetw-windows-performance-made-easier/
Apache License 2.0
1.55k stars 201 forks source link

Question: is it possible to capture trace info for a single process? #117

Closed amaiorano closed 6 years ago

amaiorano commented 6 years ago

I was wondering if xperf can be told to filter trace info for a specific process (or say a list of named processes). I'm capturing traces to profile a well known large video game engine at high CPU frequency, and WPA chugs pretty slowly on all that data. My first step after opening the trace, which itself can take some time, is to filter in only that process. So I'm wondering if we can pre-filter the capture to avoid all that extra data in hopes of improving WPA's performance? I looked at the args for xperf start and I wonder if the pid-related args might do the trick?

randomascii commented 6 years ago

I am not aware of a way to filter to just one process. You could try the Visual Studio profiler to see if it works better - it might incorporate filtering as it captures.

My understanding is that the pid-related args are only for heap tracing, which can be configured per-process.

amaiorano commented 6 years ago

Yeah, I think you're right. There's an open question on technet about it, and a question on SO that seems to indicate the same thing.

You're right that VS's profiler limits itself to the launching process. I guess it doesn't invoke xperf, but does its own thing using a lower level API.

Anyway, thanks for the reply. We can close this if you like!

randomascii commented 6 years ago

I commented on the technet and SO questions and I'll close this now.