-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJZZI3OAAoJEJykq7OBq3PIlyUH/A3Fdd40aA0e0N2DEGs+K8FG 9Uu/KwoumRG/RTezuLQkek1TD/86cRsktTFWEY9TAKTrTS0tqnSUvWS4au1unaaf dfaEjNQ36eFu/QWkANtD0eBNEif5kHsVgvCCEsy1yFFaSQg5Gh6EyAGTN/FeJEvR SLc+k6oyhDf/6Cq0oe+wASmwpXxzQJjnvOyqH9PVeLtbCXr3AuHMHA1C+Wpfe7it G3FNwu92UGz052Ks8WWwIvhFwdNSJayv1lY9ZtP98Ea7CSmVambPcgLe9ZzsHJo2 Dw+tjZfX24u2EuT5BlNcfC5rKrfJOfEcwfeaIip8B/BFOdk724yw6yONIcMHuog= =hzBY -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging # gpg: Signature made Tue 11 Jul 2017 09:35:26 BST # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/tracing-pull-request: backends: remove empty trace-events file trace: Fix early setting of events with the "vcpu" property Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
31fe1c4145
@ -122,7 +122,6 @@ trace-events-subdirs += crypto
|
||||
trace-events-subdirs += io
|
||||
trace-events-subdirs += migration
|
||||
trace-events-subdirs += block
|
||||
trace-events-subdirs += backends
|
||||
trace-events-subdirs += chardev
|
||||
trace-events-subdirs += hw/block
|
||||
trace-events-subdirs += hw/block/dataplane
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Interface for configuring and controlling the state of tracing events.
|
||||
*
|
||||
* Copyright (C) 2014-2016 Lluís Vilanova <vilanova@ac.upc.edu>
|
||||
* Copyright (C) 2014-2017 Lluís Vilanova <vilanova@ac.upc.edu>
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
@ -38,12 +38,16 @@ void trace_event_set_state_dynamic(TraceEvent *ev, bool state)
|
||||
{
|
||||
CPUState *vcpu;
|
||||
assert(trace_event_get_state_static(ev));
|
||||
if (trace_event_is_vcpu(ev)) {
|
||||
if (trace_event_is_vcpu(ev) && likely(first_cpu != NULL)) {
|
||||
CPU_FOREACH(vcpu) {
|
||||
trace_event_set_vcpu_state_dynamic(vcpu, ev, state);
|
||||
}
|
||||
} else {
|
||||
/* Without the "vcpu" property, dstate can only be 1 or 0 */
|
||||
/*
|
||||
* Without the "vcpu" property, dstate can only be 1 or 0. With it, we
|
||||
* haven't instantiated any vCPU yet, so we will set a global state
|
||||
* instead, and trace_init_vcpu will reconcile it afterwards.
|
||||
*/
|
||||
bool state_pre = *ev->dstate;
|
||||
if (state_pre != state) {
|
||||
if (state) {
|
||||
|
Loading…
Reference in New Issue
Block a user