6926697: "optimized" VM build failed: The type "AdapterHandlerTableIterator" is incomplete
Summary: Define AdapterHandlerTableIterator class as non product instead of debug.
Reviewed-by: never
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp Fri Feb 12 15:27:36 2010 -0800
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp Tue Feb 16 16:17:46 2010 -0800
@@ -1947,7 +1947,7 @@
private:
-#ifdef ASSERT
+#ifndef PRODUCT
static int _lookups; // number of calls to lookup
static int _buckets; // number of buckets checked
static int _equals; // number of buckets checked with matching hash
@@ -1983,16 +1983,16 @@
// Find a entry with the same fingerprint if it exists
AdapterHandlerEntry* lookup(int total_args_passed, BasicType* sig_bt) {
- debug_only(_lookups++);
+ NOT_PRODUCT(_lookups++);
AdapterFingerPrint fp(total_args_passed, sig_bt);
unsigned int hash = fp.compute_hash();
int index = hash_to_index(hash);
for (AdapterHandlerEntry* e = bucket(index); e != NULL; e = e->next()) {
- debug_only(_buckets++);
+ NOT_PRODUCT(_buckets++);
if (e->hash() == hash) {
- debug_only(_equals++);
+ NOT_PRODUCT(_equals++);
if (fp.equals(e->fingerprint())) {
-#ifdef ASSERT
+#ifndef PRODUCT
if (fp.is_compact()) _compact++;
_hits++;
#endif
@@ -2003,6 +2003,7 @@
return NULL;
}
+#ifndef PRODUCT
void print_statistics() {
ResourceMark rm;
int longest = 0;
@@ -2021,15 +2022,14 @@
}
tty->print_cr("AdapterHandlerTable: empty %d longest %d total %d average %f",
empty, longest, total, total / (double)nonempty);
-#ifdef ASSERT
tty->print_cr("AdapterHandlerTable: lookups %d buckets %d equals %d hits %d compact %d",
_lookups, _buckets, _equals, _hits, _compact);
+ }
#endif
- }
};
-#ifdef ASSERT
+#ifndef PRODUCT
int AdapterHandlerTable::_lookups;
int AdapterHandlerTable::_buckets;