Allow variable length raw event hex values
Currently we only allow -e <RAW_EVENT>
where <RAW_EVENT>
is rXXXX
.
Value XXXX
is hexadecimal value without leading 0x
and it's fixed to 4 digits.
This patch allows users to pass e.g. r1b
to represent 0x1B
instead of r001b
.
This feature is also available for counting, see !184 (merged).
Testing
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========
========== Rebuild started at 2:01 PM and took 15.091 seconds ==========
vstest.console x64\Debug\wperf-test.dll
Microsoft (R) Test Execution Command Line Tool Version 17.5.0 (x64)
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Passed test_check_cores_in_pmu_ctl_hdr_p_null [< 1 ms]
Passed test_check_cores_in_pmu_ctl_hdr_p_cores_count [< 1 ms]
Passed test_check_cores_in_pmu_ctl_hdr_p_cores_no_error [< 1 ms]
Passed test_check_cores_in_pmu_ctl_hdr_p_cores_no [< 1 ms]
Passed test_parse_events_str_for_sample_rf [< 1 ms]
Passed test_parse_events_str_for_sample_r1b [< 1 ms]
Passed test_parse_events_str_for_sample_r12_rab [< 1 ms]
Passed test_parse_events_str_for_sample_raw_7_Events [< 1 ms]
Passed test_gen_pdb_name_dll [< 1 ms]
Passed test_gen_pdb_name_exe [< 1 ms]
Passed test_gen_pdb_name_dll_path [< 1 ms]
Passed test_gen_pdb_name_multiple_dll_dots [< 1 ms]
Passed test_MultiByteFromWideString [< 1 ms]
Passed test_IntToHexWideString [< 1 ms]
Passed test_IntToHexWideString_wchar_t [< 1 ms]
Passed test_IntToDecWideString [< 1 ms]
Passed test_DoubleToWideString [< 1 ms]
Passed test_DoubleToWideStringExt [< 1 ms]
Passed test_TokenizeWideStringOfInts_error [< 1 ms]
Passed test_TokenizeWideStringOfInts_empty [< 1 ms]
Passed test_TokenizeWideStringOfInts_clear_output [< 1 ms]
Passed test_TokenizeWideStringOfInts_0 [< 1 ms]
Passed test_TokenizeWideStringOfInts_012 [< 1 ms]
Passed test_TokenizeWideStringOfInts_fibb [< 1 ms]
Passed test_ReplaceFileExtension [< 1 ms]
Passed test_IntToDecWithCommas [< 1 ms]
Passed test_IntToDecWithCommas_neg [< 1 ms]
Passed test_IntToDecWithCommas_Ramanujan_Tau [< 1 ms]
Passed test_tablejson_char [< 1 ms]
Passed test_tablejson_wchar [< 1 ms]
Passed test_jsonobject_char [< 1 ms]
Passed test_jsonobject_wchar [< 1 ms]
Test Run Successful.
Total tests: 32
Passed: 32
Total time: 0.3138 Seconds
Edited by Przemyslaw Wirkus