profiling: enable to capture dropped samples while buffering

Since the profiling utilizes the limited size of buffer to capture
sample data, dropping samples could happen while collecting data
if data is generated faster than flushing by consumer. Capturing
the dropped sample info is critical to understand how much the data
is reliable to use.

To capture the information, the new hypercall "PROFILING_GET_STATUS"
is introduced.

Tracked-On: #2474
Signed-off-by: Manisha Chinthapally <manisha.chinthapally@intel.com>
Signed-off-by: Min Lim <min.yeol.lim@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Min Lim
2019-01-30 16:02:15 -08:00
committed by wenlingz
parent 18b04451e1
commit ec4dd2284c
4 changed files with 54 additions and 9 deletions

View File

@@ -174,6 +174,12 @@ struct guest_vm_info {
uint16_t guest_vm_id;
int32_t external_vector;
};
struct profiling_status {
uint32_t samples_logged;
uint32_t samples_dropped;
};
struct sep_state {
sep_pmu_state pmu_state;
@@ -304,6 +310,7 @@ int32_t profiling_set_control(struct acrn_vm *vm, uint64_t addr);
int32_t profiling_configure_pmi(struct acrn_vm *vm, uint64_t addr);
int32_t profiling_configure_vmsw(struct acrn_vm *vm, uint64_t addr);
void profiling_ipi_handler(void *data);
int32_t profiling_get_status_info(struct acrn_vm *vm, uint64_t addr);
#endif