Liu, Eric E wrote: > >From 0d7f1ee470fe907e00ac6246bfa11e5322bc64fb Mon Sep 17 00:00:00 2001 > From: Feng (Eric) Liu <[EMAIL PROTECTED]> > Date: Sat, 15 Mar 2008 06:07:33 -0400 > Subject: [PATCH] KVM: Add some trace entries in current code, when the > KVM_TRACE > compilation option is enabled, it outputs the data info thrace > buffer. Define some interfaces for userspace tools to use the > buffer and analyze the trace data. >
> > +#ifdef CONFIG_KVM_TRACE > +#define KVMTRACE_ND(evt, vcpu, cycles, count, d1, d2, d3, d4) > \ > + do { > \ > + if (unlikely(kvm_trace_enable_flag)) { > \ > + if (KVM_TRC_##evt == KVM_TRC_VMEXIT || > \ > + KVM_TRC_##evt == KVM_TRC_PAGE_FAULT) { > \ > + struct { > \ > + u32 pid:16, vid:16; > pids can be 32-bit, I think... > \ > + u32 data1; > \ > + unsigned long data2; > \ > + } _d; > \ > + _d.pid = (u16)current->tgid; > \ > + _d.vid = (vcpu)->vcpu_id; > \ > + _d.data1 = d1; > \ > + _d.data2 = d2; > \ > + kvm_trace_var(KVM_TRC_ ## evt, cycles, > \ > + sizeof(_d), (unsigned char *)&_d); > \ > + } else { > \ > This special-casing of exits and page faults is probably unnecessary. Zeroing a couple of variables in a developer-only environment isn't worth it. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel