1. 23 2月, 2016 1 次提交
  2. 09 2月, 2016 1 次提交
    • J
      scripts/kvm/kvm_stat: Fix tracefs access checking · e3dd68df
      Janosch Frank 提交于
      On kernels build without CONFIG_TRACING kvm_stat will bail out even
      when traces are not used. This is not very helpful, especially if the
      user can't install a new kernel. Instead, we should warn the user and
      fall back to debugfs statistics.
      
      These changes check if trace statistics were selected without kernel
      support, warn with a small timeout, set the debugfs statistics option
      to True and the tracefs one to False.
      
      Fixes: 7aa4ee5a ('scripts/kvm/kvm_stat: Improve debugfs access checking')
      Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com>
      Message-Id: <1454485291-43849-2-git-send-email-frankja@linux.vnet.ibm.com>
      [Exit if -t is passed explicitly. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e3dd68df
  3. 26 1月, 2016 34 次提交
  4. 10 3月, 2015 1 次提交
  5. 12 2月, 2015 1 次提交
    • W
      kvm_stat: Add kvm_exit reasons for aarch64 · edecf5ec
      Wei Huang 提交于
      This patch defines the list of kvm_exit reasons for aarch64. This list is
      based on the Exception Class (EC) field of HSR register. With this patch
      users can trace the execution of guest VMs better. A sample output from
      command "kvm_stat -1 -t" is shown as the following:
      <...>
      kvm_exit(WATCHPT_HYP)          0         0
      kvm_exit(WFI)               9422      9361
      
      NOTE: This patch requires TRACE_EVENT(kvm_exit) to include exit_reason
      field in TP_ARGS. A patch to upstream kernel has been submitted.
      Signed-off-by: NWei Huang <wei@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      edecf5ec
  6. 26 1月, 2015 2 次提交
    • W
      kvm_stat: Add RESET support for perf event ioctl · fc116efa
      Wei Huang 提交于
      While running kvm_stat using tracepoint on ARM64 hardware (e.g. "kvm_stat
      -1 -t"), the initial values of some kvm_userspace_exit counters were found
      to be very suspecious. For instance the tracing tool showed that S390_TSCH
      was called many times on ARM64 machine, which apparently was wrong.
      
      This patch adds RESET ioctl support for perf monitoring. Before calling
      ioctl to enable a perf event, this patch resets the counter first. With
      this patch, the init counter values become correct on ARM64 hardware.
      
      Example:
      
      ==== before patch ====
      kvm_userspace_exit(S390_SIEIC)      1426         0
      kvm_userspace_exit(S390_TSCH)       339         0
      
      ==== after patch ====
      kvm_userspace_exit(S390_SIEIC)         0         0
      kvm_userspace_exit(S390_TSCH)         0         0
      Signed-off-by: NWei Huang <wei@redhat.com>
      fc116efa
    • W
      kvm_stat: Print errno when syscall to perf_event_open() fails · 874b1cfa
      Wei Huang 提交于
      kvm_stat uses syscall() to call perf_event_open(). If this function
      call fails, the returned value is -1, which doesn't tell the details
      of such failure (i.e. ENOSYS or EINVAL). This patch retrieves errno
      and prints it when syscall() fails. The error message will look like
      "Exception: perf_event_open failed, errno = 38".
      Signed-off-by: NWei Huang <wei@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      874b1cfa