arm-developer-tools / windowsperf-vs-extension

WindowsPerf GUI is a Visual Studio extension that aims to provide a GUI for WindowsPerf
https://marketplace.visualstudio.com/items?itemName=Arm.WindowsPerfGUI
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

Add GUI option to cover wperf CLI `--sample-display-row` flag #15

Closed PrzemekWirkus closed 3 weeks ago

PrzemekWirkus commented 1 month ago

Description

Add --sample-display-row <N> to the extension. This flag sets how many samples you want to see in the summary (50 by default). <N> is a positive number. There's no programmatic way to check default value of this setting, unfortunately - we can add new wperf test option for this if really needed.

User should have option to define --sample-display-row <N> or if not defined - not set by user - should be skipped (not added to wperf ...).

This feature is only valid with sampling, same as --sample-display-long.

Example

Filter five most frequent samples from the output with --sample-display-row.

>wperf record -e ld_spec:100000 -c 1 --sample-display-row 5  --sample-display-long --timeout 30 -- cpython\PCbuild\arm64\python_d.exe -c 10**10**100
base address of 'cpython\PCbuild\arm64\python_d.exe': 0x7ff765fe1288, runtime delta: 0x7ff625fe0000
sampling .....e..e..e..e..e done!
======================== sample source: ld_spec, top 5 hot functions ========================
           93.75%  1200  top 5 in total
        overhead  count  symbol
        ========  =====  ======
           80.86   1035  static struct _longobject * x_mul(struct _longobject *, struct _longobject *):python312_d.dll
            5.08     65  static unsigned int v_isub(unsigned int *, __int64, unsigned int *, __int64):python312_d.dll
            3.52     45  _Py_atomic_load_32bit_impl:python312_d.dll
            2.19     28  static unsigned int v_iadd(unsigned int *, __int64, unsigned int *, __int64):python312_d.dll
            2.11     27  PyErr_CheckSignals:python312_d.dll

              17.297 seconds time elapsed