Eliminate the PROFILE_FIELD_ACCESS feature.
Change-Id: I27bf2d18c4c0735913ea8698825b05e393b046b2
diff --git a/vm/Debugger.cpp b/vm/Debugger.cpp
index 3fa7aa0..ae3bb77 100644
--- a/vm/Debugger.cpp
+++ b/vm/Debugger.cpp
@@ -494,10 +494,6 @@
dvmDumpAtomicCacheStats(gDvm.instanceofCache);
dvmDumpBootClassPath();
}
-#ifdef PROFILE_FIELD_ACCESS
- dvmDumpFieldAccessCounts();
-#endif
-
exit(status);
}
diff --git a/vm/Dvm.mk b/vm/Dvm.mk
index 4ebaba5..dfb554b 100644
--- a/vm/Dvm.mk
+++ b/vm/Dvm.mk
@@ -59,7 +59,6 @@
LOCAL_CFLAGS += -DWITH_TRACKREF_CHECKS
LOCAL_CFLAGS += -DWITH_EXTRA_GC_CHECKS=1
#LOCAL_CFLAGS += -DCHECK_MUTEX
- #LOCAL_CFLAGS += -DPROFILE_FIELD_ACCESS
LOCAL_CFLAGS += -DDVM_SHOW_EXCEPTION=3
# add some extra stuff to make it easier to examine with GDB
LOCAL_CFLAGS += -DEASY_GDB
diff --git a/vm/Init.cpp b/vm/Init.cpp
index a774cbb..c87aea9 100644
--- a/vm/Init.cpp
+++ b/vm/Init.cpp
@@ -169,9 +169,6 @@
#ifdef CHECK_MUTEX
" check_mutex"
#endif
-#ifdef PROFILE_FIELD_ACCESS
- " profile_field_access"
-#endif
#if defined(WITH_JIT)
" jit(" ARCH_VARIANT ")"
#endif
diff --git a/vm/mterp/c/header.cpp b/vm/mterp/c/header.cpp
index 06291e2..ca025e8 100644
--- a/vm/mterp/c/header.cpp
+++ b/vm/mterp/c/header.cpp
@@ -67,18 +67,6 @@
/* set and adjust ANDROID_LOG_TAGS='*:i jdwp:i dalvikvm:i dalvikvmi:i' */
/*
- * Keep a tally of accesses to fields. Currently only works if full DEX
- * optimization is disabled.
- */
-#ifdef PROFILE_FIELD_ACCESS
-# define UPDATE_FIELD_GET(_field) { (_field)->gets++; }
-# define UPDATE_FIELD_PUT(_field) { (_field)->puts++; }
-#else
-# define UPDATE_FIELD_GET(_field) ((void)0)
-# define UPDATE_FIELD_PUT(_field) ((void)0)
-#endif
-
-/*
* Export another copy of the PC on every instruction; this is largely
* redundant with EXPORT_PC and the debugger code. This value can be
* compared against what we have stored on the stack with EXPORT_PC to
diff --git a/vm/mterp/c/opcommon.cpp b/vm/mterp/c/opcommon.cpp
index 18cc575..25ea5e3 100644
--- a/vm/mterp/c/opcommon.cpp
+++ b/vm/mterp/c/opcommon.cpp
@@ -527,7 +527,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(2);
@@ -555,7 +554,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(5);
@@ -600,7 +598,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(2);
@@ -628,7 +625,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(5);
@@ -678,7 +674,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(2);
@@ -702,7 +697,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(4);
@@ -726,7 +720,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(2);
@@ -750,6 +743,5 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(4);
diff --git a/vm/mterp/common/asm-constants.h b/vm/mterp/common/asm-constants.h
index 336967b..4b091ca 100644
--- a/vm/mterp/common/asm-constants.h
+++ b/vm/mterp/common/asm-constants.h
@@ -124,21 +124,13 @@
#endif
/* InstField fields */
-#ifdef PROFILE_FIELD_ACCESS
-MTERP_OFFSET(offInstField_byteOffset, InstField, byteOffset, 24)
-#else
MTERP_OFFSET(offInstField_byteOffset, InstField, byteOffset, 16)
-#endif
/* Field fields */
MTERP_OFFSET(offField_clazz, Field, clazz, 0)
/* StaticField fields */
-#ifdef PROFILE_FIELD_ACCESS
-MTERP_OFFSET(offStaticField_value, StaticField, value, 24)
-#else
MTERP_OFFSET(offStaticField_value, StaticField, value, 16)
-#endif
/* Method fields */
MTERP_OFFSET(offMethod_clazz, Method, clazz, 0)
diff --git a/vm/mterp/out/InterpC-allstubs.cpp b/vm/mterp/out/InterpC-allstubs.cpp
index 1356597..8c3920e 100644
--- a/vm/mterp/out/InterpC-allstubs.cpp
+++ b/vm/mterp/out/InterpC-allstubs.cpp
@@ -74,18 +74,6 @@
/* set and adjust ANDROID_LOG_TAGS='*:i jdwp:i dalvikvm:i dalvikvmi:i' */
/*
- * Keep a tally of accesses to fields. Currently only works if full DEX
- * optimization is disabled.
- */
-#ifdef PROFILE_FIELD_ACCESS
-# define UPDATE_FIELD_GET(_field) { (_field)->gets++; }
-# define UPDATE_FIELD_PUT(_field) { (_field)->puts++; }
-#else
-# define UPDATE_FIELD_GET(_field) ((void)0)
-# define UPDATE_FIELD_PUT(_field) ((void)0)
-#endif
-
-/*
* Export another copy of the PC on every instruction; this is largely
* redundant with EXPORT_PC and the debugger code. This value can be
* compared against what we have stored on the stack with EXPORT_PC to
@@ -1045,7 +1033,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(2);
@@ -1073,7 +1060,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(5);
@@ -1118,7 +1104,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(2);
@@ -1146,7 +1131,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(5);
@@ -1196,7 +1180,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(2);
@@ -1220,7 +1203,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(4);
@@ -1244,7 +1226,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(2);
@@ -1268,7 +1249,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(4);
diff --git a/vm/mterp/out/InterpC-armv5te-vfp.cpp b/vm/mterp/out/InterpC-armv5te-vfp.cpp
index 4f69687..cd1eda1 100644
--- a/vm/mterp/out/InterpC-armv5te-vfp.cpp
+++ b/vm/mterp/out/InterpC-armv5te-vfp.cpp
@@ -74,18 +74,6 @@
/* set and adjust ANDROID_LOG_TAGS='*:i jdwp:i dalvikvm:i dalvikvmi:i' */
/*
- * Keep a tally of accesses to fields. Currently only works if full DEX
- * optimization is disabled.
- */
-#ifdef PROFILE_FIELD_ACCESS
-# define UPDATE_FIELD_GET(_field) { (_field)->gets++; }
-# define UPDATE_FIELD_PUT(_field) { (_field)->puts++; }
-#else
-# define UPDATE_FIELD_GET(_field) ((void)0)
-# define UPDATE_FIELD_PUT(_field) ((void)0)
-#endif
-
-/*
* Export another copy of the PC on every instruction; this is largely
* redundant with EXPORT_PC and the debugger code. This value can be
* compared against what we have stored on the stack with EXPORT_PC to
@@ -1045,7 +1033,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(2);
@@ -1073,7 +1060,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(5);
@@ -1118,7 +1104,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(2);
@@ -1146,7 +1131,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(5);
@@ -1196,7 +1180,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(2);
@@ -1220,7 +1203,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(4);
@@ -1244,7 +1226,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(2);
@@ -1268,7 +1249,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(4);
diff --git a/vm/mterp/out/InterpC-armv5te.cpp b/vm/mterp/out/InterpC-armv5te.cpp
index c55f481..9f7d1e9 100644
--- a/vm/mterp/out/InterpC-armv5te.cpp
+++ b/vm/mterp/out/InterpC-armv5te.cpp
@@ -74,18 +74,6 @@
/* set and adjust ANDROID_LOG_TAGS='*:i jdwp:i dalvikvm:i dalvikvmi:i' */
/*
- * Keep a tally of accesses to fields. Currently only works if full DEX
- * optimization is disabled.
- */
-#ifdef PROFILE_FIELD_ACCESS
-# define UPDATE_FIELD_GET(_field) { (_field)->gets++; }
-# define UPDATE_FIELD_PUT(_field) { (_field)->puts++; }
-#else
-# define UPDATE_FIELD_GET(_field) ((void)0)
-# define UPDATE_FIELD_PUT(_field) ((void)0)
-#endif
-
-/*
* Export another copy of the PC on every instruction; this is largely
* redundant with EXPORT_PC and the debugger code. This value can be
* compared against what we have stored on the stack with EXPORT_PC to
@@ -1045,7 +1033,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(2);
@@ -1073,7 +1060,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(5);
@@ -1118,7 +1104,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(2);
@@ -1146,7 +1131,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(5);
@@ -1196,7 +1180,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(2);
@@ -1220,7 +1203,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(4);
@@ -1244,7 +1226,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(2);
@@ -1268,7 +1249,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(4);
diff --git a/vm/mterp/out/InterpC-armv7-a-neon.cpp b/vm/mterp/out/InterpC-armv7-a-neon.cpp
index 18ebfd3..e1e2d8e 100644
--- a/vm/mterp/out/InterpC-armv7-a-neon.cpp
+++ b/vm/mterp/out/InterpC-armv7-a-neon.cpp
@@ -74,18 +74,6 @@
/* set and adjust ANDROID_LOG_TAGS='*:i jdwp:i dalvikvm:i dalvikvmi:i' */
/*
- * Keep a tally of accesses to fields. Currently only works if full DEX
- * optimization is disabled.
- */
-#ifdef PROFILE_FIELD_ACCESS
-# define UPDATE_FIELD_GET(_field) { (_field)->gets++; }
-# define UPDATE_FIELD_PUT(_field) { (_field)->puts++; }
-#else
-# define UPDATE_FIELD_GET(_field) ((void)0)
-# define UPDATE_FIELD_PUT(_field) ((void)0)
-#endif
-
-/*
* Export another copy of the PC on every instruction; this is largely
* redundant with EXPORT_PC and the debugger code. This value can be
* compared against what we have stored on the stack with EXPORT_PC to
@@ -1045,7 +1033,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(2);
@@ -1073,7 +1060,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(5);
@@ -1118,7 +1104,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(2);
@@ -1146,7 +1131,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(5);
@@ -1196,7 +1180,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(2);
@@ -1220,7 +1203,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(4);
@@ -1244,7 +1226,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(2);
@@ -1268,7 +1249,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(4);
diff --git a/vm/mterp/out/InterpC-armv7-a.cpp b/vm/mterp/out/InterpC-armv7-a.cpp
index e423623..f3a800d 100644
--- a/vm/mterp/out/InterpC-armv7-a.cpp
+++ b/vm/mterp/out/InterpC-armv7-a.cpp
@@ -74,18 +74,6 @@
/* set and adjust ANDROID_LOG_TAGS='*:i jdwp:i dalvikvm:i dalvikvmi:i' */
/*
- * Keep a tally of accesses to fields. Currently only works if full DEX
- * optimization is disabled.
- */
-#ifdef PROFILE_FIELD_ACCESS
-# define UPDATE_FIELD_GET(_field) { (_field)->gets++; }
-# define UPDATE_FIELD_PUT(_field) { (_field)->puts++; }
-#else
-# define UPDATE_FIELD_GET(_field) ((void)0)
-# define UPDATE_FIELD_PUT(_field) ((void)0)
-#endif
-
-/*
* Export another copy of the PC on every instruction; this is largely
* redundant with EXPORT_PC and the debugger code. This value can be
* compared against what we have stored on the stack with EXPORT_PC to
@@ -1045,7 +1033,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(2);
@@ -1073,7 +1060,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(5);
@@ -1118,7 +1104,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(2);
@@ -1146,7 +1131,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(5);
@@ -1196,7 +1180,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(2);
@@ -1220,7 +1203,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(4);
@@ -1244,7 +1226,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(2);
@@ -1268,7 +1249,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(4);
diff --git a/vm/mterp/out/InterpC-portable.cpp b/vm/mterp/out/InterpC-portable.cpp
index 5bc368f..9ce1dbf 100644
--- a/vm/mterp/out/InterpC-portable.cpp
+++ b/vm/mterp/out/InterpC-portable.cpp
@@ -74,18 +74,6 @@
/* set and adjust ANDROID_LOG_TAGS='*:i jdwp:i dalvikvm:i dalvikvmi:i' */
/*
- * Keep a tally of accesses to fields. Currently only works if full DEX
- * optimization is disabled.
- */
-#ifdef PROFILE_FIELD_ACCESS
-# define UPDATE_FIELD_GET(_field) { (_field)->gets++; }
-# define UPDATE_FIELD_PUT(_field) { (_field)->puts++; }
-#else
-# define UPDATE_FIELD_GET(_field) ((void)0)
-# define UPDATE_FIELD_PUT(_field) ((void)0)
-#endif
-
-/*
* Export another copy of the PC on every instruction; this is largely
* redundant with EXPORT_PC and the debugger code. This value can be
* compared against what we have stored on the stack with EXPORT_PC to
@@ -997,7 +985,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(2);
@@ -1025,7 +1012,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(5);
@@ -1070,7 +1056,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(2);
@@ -1098,7 +1083,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(5);
@@ -1148,7 +1132,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(2);
@@ -1172,7 +1155,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(4);
@@ -1196,7 +1178,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(2);
@@ -1220,7 +1201,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(4);
diff --git a/vm/mterp/out/InterpC-x86-atom.cpp b/vm/mterp/out/InterpC-x86-atom.cpp
index f91c1f8..96415cb 100644
--- a/vm/mterp/out/InterpC-x86-atom.cpp
+++ b/vm/mterp/out/InterpC-x86-atom.cpp
@@ -74,18 +74,6 @@
/* set and adjust ANDROID_LOG_TAGS='*:i jdwp:i dalvikvm:i dalvikvmi:i' */
/*
- * Keep a tally of accesses to fields. Currently only works if full DEX
- * optimization is disabled.
- */
-#ifdef PROFILE_FIELD_ACCESS
-# define UPDATE_FIELD_GET(_field) { (_field)->gets++; }
-# define UPDATE_FIELD_PUT(_field) { (_field)->puts++; }
-#else
-# define UPDATE_FIELD_GET(_field) ((void)0)
-# define UPDATE_FIELD_PUT(_field) ((void)0)
-#endif
-
-/*
* Export another copy of the PC on every instruction; this is largely
* redundant with EXPORT_PC and the debugger code. This value can be
* compared against what we have stored on the stack with EXPORT_PC to
@@ -1045,7 +1033,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(2);
@@ -1073,7 +1060,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(5);
@@ -1118,7 +1104,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(2);
@@ -1146,7 +1131,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(5);
@@ -1196,7 +1180,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(2);
@@ -1220,7 +1203,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(4);
@@ -1244,7 +1226,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(2);
@@ -1268,7 +1249,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(4);
diff --git a/vm/mterp/out/InterpC-x86.cpp b/vm/mterp/out/InterpC-x86.cpp
index 1f8d9f2..7f89d62 100644
--- a/vm/mterp/out/InterpC-x86.cpp
+++ b/vm/mterp/out/InterpC-x86.cpp
@@ -74,18 +74,6 @@
/* set and adjust ANDROID_LOG_TAGS='*:i jdwp:i dalvikvm:i dalvikvmi:i' */
/*
- * Keep a tally of accesses to fields. Currently only works if full DEX
- * optimization is disabled.
- */
-#ifdef PROFILE_FIELD_ACCESS
-# define UPDATE_FIELD_GET(_field) { (_field)->gets++; }
-# define UPDATE_FIELD_PUT(_field) { (_field)->puts++; }
-#else
-# define UPDATE_FIELD_GET(_field) ((void)0)
-# define UPDATE_FIELD_PUT(_field) ((void)0)
-#endif
-
-/*
* Export another copy of the PC on every instruction; this is largely
* redundant with EXPORT_PC and the debugger code. This value can be
* compared against what we have stored on the stack with EXPORT_PC to
@@ -1045,7 +1033,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(2);
@@ -1073,7 +1060,6 @@
dvmGetField##_ftype(obj, ifield->byteOffset)); \
ILOGV("+ IGET '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&ifield->field); \
} \
FINISH(5);
@@ -1118,7 +1104,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(2);
@@ -1146,7 +1131,6 @@
GET_REGISTER##_regsize(vdst)); \
ILOGV("+ IPUT '%s'=0x%08llx", ifield->field.name, \
(u8) GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&ifield->field); \
} \
FINISH(5);
@@ -1196,7 +1180,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(2);
@@ -1220,7 +1203,6 @@
SET_REGISTER##_regsize(vdst, dvmGetStaticField##_ftype(sfield)); \
ILOGV("+ SGET '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_GET(&sfield->field); \
} \
FINISH(4);
@@ -1244,7 +1226,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(2);
@@ -1268,7 +1249,6 @@
dvmSetStaticField##_ftype(sfield, GET_REGISTER##_regsize(vdst)); \
ILOGV("+ SPUT '%s'=0x%08llx", \
sfield->field.name, (u8)GET_REGISTER##_regsize(vdst)); \
- UPDATE_FIELD_PUT(&sfield->field); \
} \
FINISH(4);
diff --git a/vm/oo/Class.cpp b/vm/oo/Class.cpp
index 7f69f26..2311f8a 100644
--- a/vm/oo/Class.cpp
+++ b/vm/oo/Class.cpp
@@ -2355,10 +2355,6 @@
*/
//sfield->value.j = 0;
assert(sfield->value.j == 0LL); // cleared earlier with calloc
-
-#ifdef PROFILE_FIELD_ACCESS
- sfield->field.gets = sfield->field.puts = 0;
-#endif
}
/*
@@ -2380,10 +2376,6 @@
assert(ifield->byteOffset == 0); // cleared earlier with calloc
ifield->byteOffset = -1; // make it obvious if we fail to set later
#endif
-
-#ifdef PROFILE_FIELD_ACCESS
- ifield->field.gets = ifield->field.puts = 0;
-#endif
}
/*
@@ -4837,50 +4829,6 @@
#endif
}
-#ifdef PROFILE_FIELD_ACCESS
-/*
- * Dump the field access counts for all fields in this method.
- */
-static int dumpAccessCounts(void* vclazz, void* varg)
-{
- const ClassObject* clazz = (const ClassObject*) vclazz;
- int i;
-
- for (i = 0; i < clazz->ifieldCount; i++) {
- Field* field = &clazz->ifields[i].field;
-
- if (field->gets != 0)
- printf("GI %d %s.%s\n", field->gets,
- field->clazz->descriptor, field->name);
- if (field->puts != 0)
- printf("PI %d %s.%s\n", field->puts,
- field->clazz->descriptor, field->name);
- }
- for (i = 0; i < clazz->sfieldCount; i++) {
- Field* field = &clazz->sfields[i].field;
-
- if (field->gets != 0)
- printf("GS %d %s.%s\n", field->gets,
- field->clazz->descriptor, field->name);
- if (field->puts != 0)
- printf("PS %d %s.%s\n", field->puts,
- field->clazz->descriptor, field->name);
- }
-
- return 0;
-}
-
-/*
- * Dump the field access counts for all loaded classes.
- */
-void dvmDumpFieldAccessCounts()
-{
- dvmHashTableLock(gDvm.loadedClasses);
- dvmHashForeach(gDvm.loadedClasses, dumpAccessCounts, NULL);
- dvmHashTableUnlock(gDvm.loadedClasses);
-}
-#endif
-
/*
* ===========================================================================
* Method Prototypes and Descriptors
diff --git a/vm/oo/Class.h b/vm/oo/Class.h
index f0c853c..83f6622 100644
--- a/vm/oo/Class.h
+++ b/vm/oo/Class.h
@@ -184,10 +184,6 @@
void dvmDumpLoaderStats(const char* msg);
int dvmGetNumLoadedClasses();
-#ifdef PROFILE_FIELD_ACCESS
-void dvmDumpFieldAccessCounts(void);
-#endif
-
/* flags for dvmDumpClass / dvmDumpAllClasses */
#define kDumpClassFullDetail 1
#define kDumpClassClassLoader (1 << 1)
diff --git a/vm/oo/Object.h b/vm/oo/Object.h
index eed642a..55c4d1a 100644
--- a/vm/oo/Object.h
+++ b/vm/oo/Object.h
@@ -311,10 +311,6 @@
const char* name;
const char* signature; /* e.g. "I", "[C", "Landroid/os/Debug;" */
u4 accessFlags;
-#ifdef PROFILE_FIELD_ACCESS
- u4 gets;
- u4 puts;
-#endif
};
/*