src/share/vm/runtime/handles.cpp

changeset 4037
da91efe96a93
parent 3900
d2a62e0f25eb
child 4178
bdb5f8c9978b
     1.1 --- a/src/share/vm/runtime/handles.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/runtime/handles.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -24,6 +24,7 @@
    1.11  
    1.12  #include "precompiled.hpp"
    1.13  #include "memory/allocation.inline.hpp"
    1.14 +#include "oops/constantPool.hpp"
    1.15  #include "oops/oop.inline.hpp"
    1.16  #include "runtime/handles.inline.hpp"
    1.17  #ifdef TARGET_OS_FAMILY_linux
    1.18 @@ -70,8 +71,10 @@
    1.19    // during GC phase 3, a handle may be a forward pointer that
    1.20    // is not yet valid, so loosen the assertion
    1.21    while (bottom < top) {
    1.22 -//    assert((*bottom)->is_oop(), "handle should point to oop");
    1.23 -      assert(Universe::heap()->is_in(*bottom), "handle should be valid heap address");
    1.24 +    // This test can be moved up but for now check every oop.
    1.25 +
    1.26 +    assert((*bottom)->is_oop(), "handle should point to oop");
    1.27 +
    1.28      f->do_oop(bottom++);
    1.29    }
    1.30    return handles_visited;
    1.31 @@ -148,6 +151,8 @@
    1.32        // Note: _nof_handlemarks is only set in debug mode
    1.33        warning("%d: Allocated in HandleMark : %d", _nof_handlemarks, handles);
    1.34      }
    1.35 +
    1.36 +    tty->print_cr("Handles %d", handles);
    1.37    }
    1.38  #endif
    1.39  

mercurial