I use xperf to capture an ETW to a file.
As I set it, it only seems to write data on disc whenever -MaxFileLimit is reached.
xperf -start MySession -f Log.etl -on {GUID} -MaxFile 10 -FileMode Circular
Can I set it so it will write to file more frequent? I would like to be able to get the logs as soon as the events are happening.
LE: I want to log a trace to file, but also to keep the file from exceeding a size limit. And I want to be able to get copy of the file to see latest logged information without interrupting the logging session. (currently in order to get the useful info I have 2 options: to stop the session or to wait for the MaxFile to be reached). Hopefully my intent is clear now.
Look at the -flushtimer option in https://learn.microsoft.com/en-us/windows-hardware/test/wpt/start
If you just want to make sure the logs are synced before you copy them (without stopping the session), you can issue a -flush command.
In most cases, I strongly suggest you let xperf do its thing. Otherwise you'll risk writing to disk so often it could have an impact on the performance problem you may be investigating, and you'll skew what ever it is you are measuring.