Skip to content

Commit

Permalink
trace: Add event "guest_cpu_reset"
Browse files Browse the repository at this point in the history
Signals the reset of the state a virtual (guest) CPU.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Message-id: 147428971851.15111.8799439252178273840.stgit@fimbulvetr.bsc.es
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
Lluís Vilanova authored and stefanhaRH committed Sep 28, 2016
1 parent b9d7221 commit 2cc2d08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qom/cpu.c
Expand Up @@ -29,6 +29,7 @@
#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
#include "hw/qdev-properties.h"
#include "trace.h"

bool cpu_exists(int64_t id)
{
Expand Down Expand Up @@ -245,6 +246,8 @@ void cpu_reset(CPUState *cpu)
if (klass->reset != NULL) {
(*klass->reset)(cpu);
}

trace_guest_cpu_reset(cpu);
}

static void cpu_common_reset(CPUState *cpu)
Expand Down
5 changes: 5 additions & 0 deletions trace-events
Expand Up @@ -148,6 +148,11 @@ colo_filter_rewriter_conn_offset(uint32_t offset) ": offset=%u\n"
# Targets: all
vcpu guest_cpu_enter(void)

# Reset the state of a virtual (guest) CPU
#
# Targets: all
vcpu guest_cpu_reset(void)

# @vaddr: Access' virtual address.
# @info : Access' information (see below).
#
Expand Down

0 comments on commit 2cc2d08

Please sign in to comment.