Closed PrzemekWirkus closed 3 weeks ago
The wperf has command line option --sample-display-long that is related to all sampling functionalities. This flag should be only used in sampling (not counting)
wperf
--sample-display-long
See flag name and description.
--sample-display-long Display decorated symbol name
This flag will de-mangle sampling symbols from:
x_mul:python312_d.dll
to:
static struct _longobject * x_mul(struct _longobject *, struct _longobject *):python312_d.dll
C
Without the flag:
>wperf record -e ld_spec:100000 -c 1 --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 done! ======================== sample source: ld_spec, top 50 hot functions ======================== overhead count symbol ======== ===== ====== 80.08 615 x_mul:python312_d.dll 5.47 42 v_isub:python312_d.dll 2.86 22 _Py_atomic_load_32bit_impl:python312_d.dll 2.73 21 v_iadd:python312_d.dll 2.73 21 PyErr_CheckSignals:python312_d.dll 1.95 15 unknown 1.04 8 _Py_ThreadCanHandleSignals:python312_d.dll 1.04 8 x_add:python312_d.dll 0.39 3 PyThread_get_thread_ident:python312_d.dll 0.39 3 _Py_atomic_load_64bit_impl:python312_d.dll 0.39 3 _PyMem_DebugCheckAddress:python312_d.dll 0.26 2 read_size_t:python312_d.dll 0.26 2 _PyErr_CheckSignalsTstate:python312_d.dll 0.13 1 write_size_t:python312_d.dll 0.13 1 PyThread_tss_get:python312_d.dll 0.13 1 _PyMem_DebugRawAlloc:python312_d.dll 100.00% 768 top 16 in total 10.5 seconds time elapsed
>wperf record -e ld_spec:100000 -c 1 --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.. done! ======================== sample source: ld_spec, top 50 hot functions ======================== overhead count symbol ======== ===== ====== 80.66 826 static struct _longobject * x_mul(struct _longobject *, struct _longobject *):python312_d.dll 4.59 47 static unsigned int v_isub(unsigned int *, __int64, unsigned int *, __int64):python312_d.dll 3.12 32 _Py_atomic_load_32bit_impl:python312_d.dll 2.64 27 static unsigned int v_iadd(unsigned int *, __int64, unsigned int *, __int64):python312_d.dll 2.34 24 PyErr_CheckSignals:python312_d.dll 1.76 18 unknown 1.46 15 static struct _longobject * x_add(struct _longobject *, struct _longobject *):python312_d.dll 1.07 11 static int _Py_ThreadCanHandleSignals(struct _is *):python312_d.dll 0.59 6 _Py_atomic_load_64bit_impl:python312_d.dll 0.29 3 PyGILState_Check:python312_d.dll 0.29 3 static unsigned __int64 read_size_t(const void *):python312_d.dll 0.20 2 static void _PyMem_DebugCheckAddress(const char *, char, const void *):python312_d.dll 0.20 2 PyThread_tss_get:python312_d.dll 0.20 2 _PyErr_CheckSignalsTstate:python312_d.dll 0.10 1 static void _PyObject_Init(struct _object *, struct _typeobject *):python312_d.dll 0.10 1 static int kmul_split(struct _longobject *, __int64, struct _longobject * *, struct _longobject * *):python312_d.dll 0.10 1 static struct _longobject * k_mul(struct _longobject *, struct _longobject *):python312_d.dll 0.10 1 _PyMem_DebugRawFree:python312_d.dll 0.10 1 PyThread_get_thread_ident:python312_d.dll 0.10 1 static struct _longobject * long_normalize(struct _longobject *):python312_d.dll 100.00% 1024 top 20 in total 12.618 seconds time elapsed
Description
The
wperf
has command line option--sample-display-long
that is related to all sampling functionalities. This flag should be only used in sampling (not counting)See flag name and description.
This flag will de-mangle sampling symbols from:
to:
Definition of done
C
style) can reside correctly in all widgets.How it works
Without the flag:
With the flag