HV:debug:profiling Fixed inappropriate condition check
Fixed the condition to be able to collect MSR sample data Also populating addition information to help identifity appropriate data Tracked-On: #1693 Signed-off-by: Manisha Chinthapally <manisha.chinthapally@intel.com>
This commit is contained in:
parent
7f57a74fe7
commit
ee918f8533
|
@ -336,6 +336,7 @@ static int profiling_generate_data(int32_t collector, uint32_t type)
|
|||
pkt_header.collector_id = collector;
|
||||
pkt_header.cpu_id = get_cpu_id();
|
||||
pkt_header.data_type = 1U << type;
|
||||
pkt_header.reserved = MAGIC_NUMBER;
|
||||
|
||||
switch (type) {
|
||||
case CORE_PMU_SAMPLING:
|
||||
|
@ -534,7 +535,7 @@ static void profiling_handle_msrops(void)
|
|||
* if 'param' is 0, then skip generating a sample since it is
|
||||
* an immediate MSR read operation.
|
||||
*/
|
||||
if (my_msr_node->entries[0].param == 0UL) {
|
||||
if (my_msr_node->entries[0].param != 0UL) {
|
||||
for (j = 0U; j < my_msr_node->num_entries; ++j) {
|
||||
sw_msrop->core_msr[j]
|
||||
= my_msr_node->entries[j].value;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define SEP_BUF_ENTRY_SIZE 32U
|
||||
#define SOCWATCH_MSR_OP 100U
|
||||
|
||||
#define MAGIC_NUMBER 0x99999988U
|
||||
enum MSR_CMD_STATUS {
|
||||
MSR_OP_READY = 0,
|
||||
MSR_OP_REQUESTED,
|
||||
|
|
Loading…
Reference in New Issue