direct-io.hg

changeset 4525:5efd21a0b625

bitkeeper revision 1.1277.1.6 (425ec5bdKDQlu1_DPb1ljfjDxNUUkw)

privop.c:
properly count privified mov_from_ar
author djm@kirby.fc.hp.com
date Thu Apr 14 19:34:21 2005 +0000 (2005-04-14)
parents 1f457fed92df
children 195fcaf1958f
files xen/arch/ia64/privop.c
line diff
     1.1 --- a/xen/arch/ia64/privop.c	Thu Apr 14 18:57:42 2005 +0000
     1.2 +++ b/xen/arch/ia64/privop.c	Thu Apr 14 19:34:21 2005 +0000
     1.3 @@ -524,6 +524,7 @@ PPEFCN Mpriv_funcs[64] = {
     1.4  struct {
     1.5  	unsigned long mov_to_ar_imm;
     1.6  	unsigned long mov_to_ar_reg;
     1.7 +	unsigned long mov_from_ar;
     1.8  	unsigned long ssm;
     1.9  	unsigned long rsm;
    1.10  	unsigned long rfi;
    1.11 @@ -617,7 +618,9 @@ priv_handle_op(VCPU *vcpu, REGS *regs, i
    1.12  		else if (inst.generic.major != 1) break;
    1.13  		x6 = inst.M29.x6;
    1.14  		if (x6 == 0x2a) {
    1.15 -			privcnt.mov_to_ar_reg++;
    1.16 +			if (inst.M29.r2 > 63 && inst.M29.ar3 < 8)
    1.17 +				privcnt.mov_from_ar++; // privified mov from kr
    1.18 +			else privcnt.mov_to_ar_reg++;
    1.19  			return priv_mov_to_ar_reg(vcpu,inst);
    1.20  		}
    1.21  		if (inst.M29.x3 != 0) break;
    1.22 @@ -663,7 +666,9 @@ priv_handle_op(VCPU *vcpu, REGS *regs, i
    1.23  #endif
    1.24  		if (inst.I26.x3 != 0) break;  // I26.x3 == I27.x3
    1.25  		if (inst.I26.x6 == 0x2a) {
    1.26 -			privcnt.mov_to_ar_reg++;
    1.27 +			if (inst.I26.r2 > 63 && inst.I26.ar3 < 8)
    1.28 +				privcnt.mov_from_ar++; // privified mov from kr
    1.29 +			else privcnt.mov_to_ar_reg++;
    1.30  			return priv_mov_to_ar_reg(vcpu,inst);
    1.31  		}
    1.32  		if (inst.I27.x6 == 0x0a) {
    1.33 @@ -800,6 +805,9 @@ int dump_privop_counts(char *buf)
    1.34  	if (privcnt.mov_to_ar_reg)
    1.35  		s += sprintf(s,"%10d  %s [%d%%]\r\n", privcnt.mov_to_ar_reg,
    1.36  			"mov_to_ar_reg", (privcnt.mov_to_ar_reg*100L)/sum);
    1.37 +	if (privcnt.mov_from_ar)
    1.38 +		s += sprintf(s,"%10d  %s [%d%%]\r\n", privcnt.mov_from_ar,
    1.39 +			"privified-mov_from_ar", (privcnt.mov_from_ar*100L)/sum);
    1.40  	if (privcnt.ssm)
    1.41  		s += sprintf(s,"%10d  %s [%d%%]\r\n", privcnt.ssm,
    1.42  			"ssm", (privcnt.ssm*100L)/sum);
    1.43 @@ -852,6 +860,7 @@ int zero_privop_counts(char *buf)
    1.44  	// this is ugly and should probably produce sorted output
    1.45  	// but it will have to do for now
    1.46  	privcnt.mov_to_ar_imm = 0; privcnt.mov_to_ar_reg = 0;
    1.47 +	privcnt.mov_from_ar = 0;
    1.48  	privcnt.ssm = 0; privcnt.rsm = 0;
    1.49  	privcnt.rfi = 0; privcnt.bsw0 = 0;
    1.50  	privcnt.bsw1 = 0; privcnt.cover = 0;