Skip to content

msSinceInput reports incorrectly #194

@VoeSo

Description

@VoeSo

I wanted to see the latency between ISR of USB and when the game registers input, so I ran a wpr trace and presentmon trace at the same time.
It seems that msSinceInput reports input as happening well before the USB ISR even ran.

Presentmon:
pmissue1
By substracting msSinceInput from TimeInSeconds we get 2024-1-17 13:49:56.8100508

WPR:
pmissue2
You can see that there is a fragment every 1s while there was no input and then every 1 ms when I moved the mouse as expected.
So the first ISR caused by input happened at 2024.01.17 13:49:56.8108321.
Thats 0.7813ms AFTER what presentmon reports.

To recreate:

  1. run presentmon and wpr at the same time while ingame. Stay clear of any inputs for a few seconds then move your mouse
    -run presentmon with -track_input and -date_time
    -run wpr like this
    pmissue3
  2. Look for the the first frame that received input in the presentmon report and calculate time of input by substracting msSinceInput from TimeInSeconds
    pmissue1
  3. Open the wpr trace and apply this profile https://github.com/VoeSo/Twix/blob/main/fet.wpaProfile
  4. Expand "Interrupt", then expand the correct driver and cpu.
  5. Scroll down to the approximate timepoint you calculated in step 2). You will see very little interrupts and then a lot of interrupts(every 1ms for 1khz mouse). In my example you can see that there is a fragment every 1s while there was no input and then every 1 ms when I moved the mouse
    pmissue2
  6. Write down the time of the first fragment caused by actual input and compare it to the time calculated in step 2)

Metadata

Metadata

Labels

PresentDataRelates to the collection/analysis library (PresentData/)PresentMon-ConsoleApplicationRelates to the console application (PresentMon/)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions