|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 04/10] x86/oprofile: use unambiguous register names
This is in preparation of eliminating the mis-naming of 64-bit fields
with 32-bit register names (eflags instead of rflags etc).
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/arch/x86/oprofile/backtrace.c
+++ b/xen/arch/x86/oprofile/backtrace.c
@@ -150,7 +150,7 @@ static int valid_hypervisor_stack(const
void xenoprof_backtrace(struct vcpu *vcpu, const struct cpu_user_regs *regs,
unsigned long depth, int mode)
{
- const struct frame_head *head = (void *)regs->ebp;
+ const struct frame_head *head = (void *)regs->rbp;
if (mode > 1) {
while (depth-- && valid_hypervisor_stack(head, regs))
--- a/xen/arch/x86/oprofile/op_model_athlon.c
+++ b/xen/arch/x86/oprofile/op_model_athlon.c
@@ -316,22 +316,20 @@ static int athlon_check_ctrs(unsigned in
uint64_t msr_content;
int i;
int ovf = 0;
- unsigned long eip = regs->eip;
+ unsigned long eip = regs->rip;
int mode = 0;
struct vcpu *v = current;
struct cpu_user_regs *guest_regs = guest_cpu_user_regs();
unsigned int const nr_ctrs = model->num_counters;
if (!guest_mode(regs) &&
- (regs->eip == (unsigned long)svm_stgi_label)) {
+ (eip == (unsigned long)svm_stgi_label)) {
/* SVM guest was running when NMI occurred */
ASSERT(is_hvm_vcpu(v));
- eip = guest_regs->eip;
+ eip = guest_regs->rip;
mode = xenoprofile_get_mode(v, guest_regs);
- } else {
- eip = regs->eip;
+ } else
mode = xenoprofile_get_mode(v, regs);
- }
for (i = 0 ; i < nr_ctrs; ++i) {
CTR_READ(msr_content, msrs, i);
--- a/xen/arch/x86/oprofile/op_model_p4.c
+++ b/xen/arch/x86/oprofile/op_model_p4.c
@@ -617,7 +617,7 @@ static int p4_check_ctrs(unsigned int co
uint64_t msr_content;
int i;
int ovf = 0;
- unsigned long eip = regs->eip;
+ unsigned long eip = regs->rip;
int mode = xenoprofile_get_mode(current, regs);
stag = get_stagger();
--- a/xen/arch/x86/oprofile/op_model_ppro.c
+++ b/xen/arch/x86/oprofile/op_model_ppro.c
@@ -135,7 +135,7 @@ static int ppro_check_ctrs(unsigned int
u64 val;
int i;
int ovf = 0;
- unsigned long eip = regs->eip;
+ unsigned long eip = regs->rip;
int mode = xenoprofile_get_mode(current, regs);
struct arch_msr_pair *msrs_content = vcpu_vpmu(current)->context;
Attachment:
x86-regnames-oprofile.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |