mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-27 23:15:00 +00:00
hv: trace: show cpu usage of vms in pcpu sharing case
To maximize the cpu utilization, core 0 is usually shared by service vm and guest vm. But there are no statistics to show the cpu occupation of each vm. This patch is to provide cpu usage statistic for users. To calculate it, a new trace event is added and marked in scheduling context switch, accompanying with a new python script to analyze the data from acrntrace output. Tracked-On: #8621 Signed-off-by: nacui <na.cui@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com> Reviewed-by: Haiwei Li <haiwei.li@intel.com>
This commit is contained in:
@@ -111,7 +111,7 @@ void TRACE_6C(uint32_t evid, uint8_t a1, uint8_t a2, uint8_t a3, uint8_t a4, uin
|
||||
#define TRACE_ENTER TRACE_16STR(TRACE_FUNC_ENTER, __func__)
|
||||
#define TRACE_EXIT TRACE_16STR(TRACE_FUNC_EXIT, __func__)
|
||||
|
||||
static inline void TRACE_16STR(uint32_t evid, const char name[])
|
||||
void TRACE_16STR(uint32_t evid, const char name[])
|
||||
{
|
||||
struct trace_entry entry;
|
||||
uint16_t cpu_id = get_pcpu_id();
|
||||
|
||||
Reference in New Issue
Block a user