Mailing List Archive

privop.c:
ChangeSet 1.1277.1.6, 2005/04/14 13:34:21-06:00, djm@kirby.fc.hp.com

privop.c:
properly count privified mov_from_ar



privop.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)


diff -Nru a/xen/arch/ia64/privop.c b/xen/arch/ia64/privop.c
--- a/xen/arch/ia64/privop.c 2005-04-20 05:03:38 -04:00
+++ b/xen/arch/ia64/privop.c 2005-04-20 05:03:38 -04:00
@@ -524,6 +524,7 @@
struct {
unsigned long mov_to_ar_imm;
unsigned long mov_to_ar_reg;
+ unsigned long mov_from_ar;
unsigned long ssm;
unsigned long rsm;
unsigned long rfi;
@@ -617,7 +618,9 @@
else if (inst.generic.major != 1) break;
x6 = inst.M29.x6;
if (x6 == 0x2a) {
- privcnt.mov_to_ar_reg++;
+ if (inst.M29.r2 > 63 && inst.M29.ar3 < 8)
+ privcnt.mov_from_ar++; // privified mov from kr
+ else privcnt.mov_to_ar_reg++;
return priv_mov_to_ar_reg(vcpu,inst);
}
if (inst.M29.x3 != 0) break;
@@ -663,7 +666,9 @@
#endif
if (inst.I26.x3 != 0) break; // I26.x3 == I27.x3
if (inst.I26.x6 == 0x2a) {
- privcnt.mov_to_ar_reg++;
+ if (inst.I26.r2 > 63 && inst.I26.ar3 < 8)
+ privcnt.mov_from_ar++; // privified mov from kr
+ else privcnt.mov_to_ar_reg++;
return priv_mov_to_ar_reg(vcpu,inst);
}
if (inst.I27.x6 == 0x0a) {
@@ -800,6 +805,9 @@
if (privcnt.mov_to_ar_reg)
s += sprintf(s,"%10d %s [%d%%]\r\n", privcnt.mov_to_ar_reg,
"mov_to_ar_reg", (privcnt.mov_to_ar_reg*100L)/sum);
+ if (privcnt.mov_from_ar)
+ s += sprintf(s,"%10d %s [%d%%]\r\n", privcnt.mov_from_ar,
+ "privified-mov_from_ar", (privcnt.mov_from_ar*100L)/sum);
if (privcnt.ssm)
s += sprintf(s,"%10d %s [%d%%]\r\n", privcnt.ssm,
"ssm", (privcnt.ssm*100L)/sum);
@@ -852,6 +860,7 @@
// this is ugly and should probably produce sorted output
// but it will have to do for now
privcnt.mov_to_ar_imm = 0; privcnt.mov_to_ar_reg = 0;
+ privcnt.mov_from_ar = 0;
privcnt.ssm = 0; privcnt.rsm = 0;
privcnt.rfi = 0; privcnt.bsw0 = 0;
privcnt.bsw1 = 0; privcnt.cover = 0;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xensource.com
http://lists.xensource.com/xen-changelog