File tree Expand file tree Collapse file tree 1 file changed +3
-20
lines changed
src/hotspot/share/interpreter/zero Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -1995,30 +1995,13 @@ void BytecodeInterpreter::run(interpreterState istate) {
1995
1995
if (ik->is_initialized () && ik->can_be_fastpath_allocated () ) {
1996
1996
size_t obj_size = ik->size_helper ();
1997
1997
oop result = NULL ;
1998
- // If the TLAB isn't pre-zeroed then we'll have to do it
1999
- bool need_zero = !ZeroTLAB;
2000
1998
if (UseTLAB) {
2001
1999
result = (oop) THREAD->tlab ().allocate (obj_size);
2002
2000
}
2003
- // Disable non-TLAB-based fast-path, because profiling requires that all
2004
- // allocations go through InterpreterRuntime::_new() if THREAD->tlab().allocate
2005
- // returns NULL.
2006
- if (result == NULL ) {
2007
- need_zero = true ;
2008
- // Try allocate in shared eden
2009
- retry:
2010
- HeapWord* compare_to = *Universe::heap ()->top_addr ();
2011
- HeapWord* new_top = compare_to + obj_size;
2012
- if (new_top <= *Universe::heap ()->end_addr ()) {
2013
- if (Atomic::cmpxchg (Universe::heap ()->top_addr (), compare_to, new_top) != compare_to) {
2014
- goto retry;
2015
- }
2016
- result = (oop) compare_to;
2017
- }
2018
- }
2019
2001
if (result != NULL ) {
2020
- // Initialize object (if nonzero size and need) and then the header
2021
- if (need_zero ) {
2002
+ // Initialize object (if nonzero size and need) and then the header.
2003
+ // If the TLAB isn't pre-zeroed then we'll have to do it.
2004
+ if (!ZeroTLAB) {
2022
2005
HeapWord* to_zero = cast_from_oop<HeapWord*>(result) + sizeof (oopDesc) / oopSize;
2023
2006
obj_size -= sizeof (oopDesc) / oopSize;
2024
2007
if (obj_size > 0 ) {
You can’t perform that action at this time.
0 commit comments