mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-03 20:59:53 +00:00
tools: acrntrace: Remove unused function get_cpu_freq
Function get_cpu_freq is not used anymore. This patch remove it. Signed-off-by: Kaige Fu <kaige.fu@intel.com> Reviewed-by: Yan, Like <like.yan@intel.com>
This commit is contained in:
parent
f81fcf2f07
commit
a2a412244c
@ -185,30 +185,6 @@ static int get_cpu_num(void)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static double get_cpu_freq(void)
|
|
||||||
{
|
|
||||||
char cmd[] =
|
|
||||||
"cat /proc/cpuinfo | grep -m 1 \"cpu MHz\" | awk '{print $4}'";
|
|
||||||
char buf[16];
|
|
||||||
int ret;
|
|
||||||
double freq = 0;
|
|
||||||
|
|
||||||
ret = shell_cmd(cmd, buf, sizeof(buf));
|
|
||||||
|
|
||||||
if (ret <= 0) {
|
|
||||||
pr_err("Faile to get cpu freq, use default 1920MHz\n");
|
|
||||||
return 1920.00;
|
|
||||||
}
|
|
||||||
|
|
||||||
freq = atof(buf);
|
|
||||||
if (freq <= 0) {
|
|
||||||
pr_err("Invalid cpu freq string, use default 1920MHz\n");
|
|
||||||
return 1920.00;
|
|
||||||
}
|
|
||||||
|
|
||||||
return freq;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int create_trace_file_dir(char *dir)
|
static int create_trace_file_dir(char *dir)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
Loading…
Reference in New Issue
Block a user