< prev index next >

src/share/vm/memory/threadLocalAllocBuffer.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 198,208 **** NULL, // top NULL); // end set_desired_size(initial_desired_size()); ! // Following check is needed because at startup the main (primordial) // thread is initialized before the heap is. The initialization for // this thread is redone in startup_initialization below. if (Universe::heap() != NULL) { size_t capacity = Universe::heap()->tlab_capacity(myThread()) / HeapWordSize; double alloc_frac = desired_size() * target_refills() / (double) capacity; --- 198,208 ---- NULL, // top NULL); // end set_desired_size(initial_desired_size()); ! // Following check is needed because at startup the main // thread is initialized before the heap is. The initialization for // this thread is redone in startup_initialization below. if (Universe::heap() != NULL) { size_t capacity = Universe::heap()->tlab_capacity(myThread()) / HeapWordSize; double alloc_frac = desired_size() * target_refills() / (double) capacity;
*** 221,231 **** _target_refills = 100 / (2 * TLABWasteTargetPercent); _target_refills = MAX2(_target_refills, (unsigned)1U); _global_stats = new GlobalTLABStats(); ! // During jvm startup, the main (primordial) thread is initialized // before the heap is initialized. So reinitialize it now. guarantee(Thread::current()->is_Java_thread(), "tlab initialization thread not Java thread"); Thread::current()->tlab().initialize(); if (PrintTLAB && Verbose) { --- 221,231 ---- _target_refills = 100 / (2 * TLABWasteTargetPercent); _target_refills = MAX2(_target_refills, (unsigned)1U); _global_stats = new GlobalTLABStats(); ! // During jvm startup, the main thread is initialized // before the heap is initialized. So reinitialize it now. guarantee(Thread::current()->is_Java_thread(), "tlab initialization thread not Java thread"); Thread::current()->tlab().initialize(); if (PrintTLAB && Verbose) {
< prev index next >