Comments (6)
Hi, thanks for the report and sorry for the delay.
The main cause of the discrepancy here is that PresentMon is computing datetime differently than WPA. This is a PresentMon bug and I'll work on a fix, but for now this means that the msSinceInput delta is OK but you can't compare datetime's between PresentMon and WPA.
Note that there is another slight difference because PresentMon doesn't use the interrupt time, but the Win32K InputDeviceRead event which occurs slightly later (~100us later in a test I just ran).
from presentmon.
I was able to fix a few things, but I couldn't find a way to make your above methodology work (capturing PresentMon and ETL at the same time). With the latest change the datetime in PresentMon and WPA should be closer, but the only way to get them to match would be to:
- Capture an ETL
- Process it afterwards with PresentMon --etl_file
You can use the Tools\start_etl_collection.cmd and Tools\stop_etl_collection.cmd scripts to ensure that all the events PresentMon needs will be collected.
from presentmon.
Thanks for looking into this, I appreciate it!
You can use the Tools\start_etl_collection.cmd and Tools\stop_etl_collection.cmd scripts to ensure that all the events PresentMon needs will be collected.
I can confirm that this works, and using the cmd scripts, I get Win32K InputDeviceRead 20us after ISR.
One thing I have issue with is I can only open the etl file with WPA if I record the trace while using windowed mode ingame. If I use fullscreen, Presentmon can still read the etl fine, but opening in WPA gets stuck at 99% loading. Any idea how to fix that?
Note that there is another slight difference because PresentMon doesn't use the interrupt time, but the Win32K InputDeviceRead event which occurs slightly later (~100us later in a test I just ran).
I was wondering how do we know that Win32K InputDeviceRead is associatiated with the right frame? Is it just guessing based on the timing of the event and then associated to the next frame, or how does it work?
Thanks again, take care!
from presentmon.
I've seen WPA do that as well occasionally in different contexts. I'm not sure why or how to get around it, sorry. Sometimes it will eventually complete, so you could try waiting, but usually I'll recapture and hope it doesn't happen the next time 🤷.
I use the Win32k RetrieveInputMessage to associate the InputDeviceRead with a frame. This is when the input is available in the target processes' message queue, though it does make a couple assumptions:
- that all InputDeviceRead events since the last RetrieveInputMessage get into the queue
- that the application uses all the input events in the queue for that frame
AFAIK those are reasonable assumptions.
At some point in the future we can investigate using the ISR event instead to get a better measure. However, that requires a kernel trace session which is less flexible, and filtering all the interrupts will have more capture overhead so it's a trade off we'll have to evaluate.
from presentmon.
I've seen WPA do that as well occasionally in different contexts. I'm not sure why or how to get around it, sorry. Sometimes it will eventually complete, so you could try waiting, but usually I'll recapture and hope it doesn't happen the next time 🤷.
I narrowed the problem down to the win32k provider flag. If you change it from 0x8400000440c01000 to 0x4000000402E2000, WPA opens fine even when the trace was made while running fullscreen and it still gives you RetrieveInputMessage and InputDeviceRead messages. But for some reason using that flag makes PM unable to output a csv.
I use the Win32k RetrieveInputMessage to associate the InputDeviceRead with a frame. This is when the input is available in the target processes' message queue, though it does make a couple assumptions:
How does PM determine the sample point/actual cpu frame start? With some framelimiters the game doesn't sample input right after present ends, but stalls and collects input at a later point.
(Getting a stat for this, like mssincecpustart would be a good addition to PM I think, though this might already be on the way with the new intel beta?)
Thank you for the help and insight, appreciate it!
from presentmon.
Interesting; thanks! I'll look into those keyword changes.
PresentMon assumes that the cpu frame start is the the time that the previous frame's Present() call returned, which is a good default assumption. To do better we need an API for applications to tell PresentMon their own timing, which we're planning for a future version.
msSinceInput is not relative to the cpu frame start though, it is relative to the start of this frame's Present() call.
The ClickToPhotonLatency metric in v2.0 is the time between input and the frame being displayed (msSinceInput + msUntilDisplayed in v1.* metrics).
from presentmon.
Related Issues (20)
- PresentMon 2.0 & Phoenix Point game - Overlay not working HOT 2
- GPU Wait shows wrong data for some games in windowed mode HOT 2
- Request: Please still provide information about Present calls w/ 2.0 metrics` HOT 4
- Please add GPUStart QPC timestamp reporting to service/console application HOT 3
- No stdout flush in console PresentMon 2.0. Is it intended? HOT 5
- PresentMon console app report lower fps after system idle for a while on AMD GPU HOT 4
- PresentMon installer does not allow alternative installation paths HOT 4
- Lose iFlip if the overlay is brought up. HOT 1
- [Feature Request] show system RAM and SWAP usage
- can't track Unreal Engine HOT 1
- Display the Presented FPS (X%) metric as the Xth percentile of FPS, not the Xth percentile of (frame)times
- When Arc Control recording is on, 99% FPS is abnormally low
- [Feature Request] Change Location of Config Folder
- Hello, I would like to raise a question
- DisplayLatency HOT 1
- [Feature Request] GPU waittime between frames HOT 6
- Arena Breakout Infinite causes GPU busy metric to stop reporting
- Suspicious GPU numbers in apex legends HOT 10
- Vcpkg 1.10.x miss file GpuTrace.hpp HOT 4
- weird results HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from presentmon.