Skip to content

Add counting timer period as part of driver <-> user-space protocol

This patch is adding counting timer period value as part of the protocol between driver and user space. Please note that this period is set in PMU_CTL_START and only there it's set (user space) and get (driver PMU_CTL_START handler).

User can adjust count timer period from 10ms to 100ms. This value has to be set for each count separately.

Note: now we can't from user space change this value. I will add separate MR to add setting to change this counting period value.

In this patch:

  • Add period field to pmu_ctl_hdr structure.
  • Add default period values to macros.h - as this is common interface between driver and user space.
  • Refactored DueTime time (negative value, see KeSetTimerEx function (wdm.h).

[in] DueTime

Specifies the absolute or relative time at which the timer is to expire. If the value of the DueTime parameter is negative, the expiration time is relative to the current system time.

Related to: WPERF-327

Testing

>pytest
=========================== test session starts ============================
platform win32 -- Python 3.11.0rc2, pytest-7.2.0, pluggy-1.0.0
collected 99 items

wperf_cli_common_test.py ....                                         [  4%]
wperf_cli_extra_events_test.py ....                                   [  8%]
wperf_cli_json_validator_test.py ....                                 [ 12%]
wperf_cli_list_test.py .....                                          [ 17%]
wperf_cli_metrics_test.py ..s....sssssssss                            [ 33%]
wperf_cli_padding_test.py ...........                                 [ 44%]
wperf_cli_stat_test.py ...........................................    [ 87%]
wperf_cli_test_test.py .....                                          [ 92%]
wperf_cli_timeline_test.py ......                                     [ 98%]
wperf_lib_app_test.py s                                               [100%]

================ 88 passed, 11 skipped in 125.78s (0:02:05) ================
Edited by Przemyslaw Wirkus

Merge request reports

Loading