Re: [PATCH v28 8/8] trace-cmd [POC]: Add KVM timestamp synchronization plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon,  8 Feb 2021 08:17:43 +0200
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote:

> index 00000000..03a4fd73
> --- /dev/null
> +++ b/lib/trace-cmd/trace-timesync-kvm.c
> @@ -0,0 +1,460 @@
> +// SPDX-License-Identifier: LGPL-2.1
> +/*
> + * Copyright (C) 2020, VMware, Tzvetomir Stoyanov tz.stoyanov@xxxxxxxxx>
> + *
> + */
> +
> +#include <fcntl.h>
> +#include <stdlib.h>
> +#include <unistd.h>
> +#include <sys/stat.h>
> +#include <dirent.h>
> +
> +#include "trace-cmd.h"
> +#include "trace-cmd-private.h"
> +#include "tracefs.h"
> +#include "trace-tsync-local.h"
> +
> +#define KVM_DEBUG_FS "/sys/kernel/debug/kvm"
> +#define KVM_DEBUG_OFFSET_FILE	"tsc-offset"
> +#define KVM_DEBUG_SCALING_FILE	"tsc-scaling-ratio"
> +#define KVM_DEBUG_VCPU_DIR	"vcpu"
> +
> +#define KVM_SYNC_PKT_REQUEST	1
> +#define KVM_SYNC_PKT_RESPONSE	2
> +
> +typedef __s64 s64;

I get:

trace-timesync-kvm.c:26:1: error: unknown type name ‘__s64’
 typedef __s64 s64;
 ^

On one of my machines without the below patch:

-- Steve

> +
> +// equal to /sys/kernel/debug/kvm/<VM ID>/vcpu0/tsc-offset
> +#define KVM_ACCURACY	0
> +#define KVM_NAME	"kvm"
> +


diff --git a/lib/trace-cmd/trace-timesync-kvm.c b/lib/trace-cmd/trace-timesync-kvm.c
index 03a4fd7..0b0267b 100644
--- a/lib/trace-cmd/trace-timesync-kvm.c
+++ b/lib/trace-cmd/trace-timesync-kvm.c
@@ -8,6 +8,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/stat.h>
+#include <linux/types.h>
 #include <dirent.h>
 
 #include "trace-cmd.h"



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux