305 _perf_gc_cause->set_value(GCCause::to_string(v));
306 }
307 _gc_cause = v;
308 }
309 GCCause::Cause gc_cause() { return _gc_cause; }
310
311 // Number of threads currently working on GC tasks.
312 int n_par_threads() { return _n_par_threads; }
313
314 // May be overridden to set additional parallelism.
315 virtual void set_par_threads(int t) { _n_par_threads = t; };
316
317 // Preload classes into the shared portion of the heap, and then dump
318 // that data to a file so that it can be loaded directly by another
319 // VM (then terminate).
320 virtual void preload_and_dump(TRAPS) { ShouldNotReachHere(); }
321
322 // General obj/array allocation facilities.
323 inline static oop obj_allocate(KlassHandle klass, int size, TRAPS);
324 inline static oop array_allocate(KlassHandle klass, int size, int length, TRAPS);
325
326 // Special obj/array allocation facilities.
327 // Some heaps may want to manage "permanent" data uniquely. These default
328 // to the general routines if the heap does not support such handling.
329 inline static oop permanent_obj_allocate(KlassHandle klass, int size, TRAPS);
330 // permanent_obj_allocate_no_klass_install() does not do the installation of
331 // the klass pointer in the newly created object (as permanent_obj_allocate()
332 // above does). This allows for a delay in the installation of the klass
333 // pointer that is needed during the create of klassKlass's. The
334 // method post_allocation_install_obj_klass() is used to install the
335 // klass pointer.
336 inline static oop permanent_obj_allocate_no_klass_install(KlassHandle klass,
337 int size,
338 TRAPS);
339 inline static void post_allocation_install_obj_klass(KlassHandle klass,
340 oop obj,
341 int size);
342 inline static oop permanent_array_allocate(KlassHandle klass, int size, int length, TRAPS);
343
344 // Raw memory allocation facilities
|
305 _perf_gc_cause->set_value(GCCause::to_string(v));
306 }
307 _gc_cause = v;
308 }
309 GCCause::Cause gc_cause() { return _gc_cause; }
310
311 // Number of threads currently working on GC tasks.
312 int n_par_threads() { return _n_par_threads; }
313
314 // May be overridden to set additional parallelism.
315 virtual void set_par_threads(int t) { _n_par_threads = t; };
316
317 // Preload classes into the shared portion of the heap, and then dump
318 // that data to a file so that it can be loaded directly by another
319 // VM (then terminate).
320 virtual void preload_and_dump(TRAPS) { ShouldNotReachHere(); }
321
322 // General obj/array allocation facilities.
323 inline static oop obj_allocate(KlassHandle klass, int size, TRAPS);
324 inline static oop array_allocate(KlassHandle klass, int size, int length, TRAPS);
325 inline static oop array_allocate_nozero(KlassHandle klass, int size, int length, TRAPS);
326
327 // Special obj/array allocation facilities.
328 // Some heaps may want to manage "permanent" data uniquely. These default
329 // to the general routines if the heap does not support such handling.
330 inline static oop permanent_obj_allocate(KlassHandle klass, int size, TRAPS);
331 // permanent_obj_allocate_no_klass_install() does not do the installation of
332 // the klass pointer in the newly created object (as permanent_obj_allocate()
333 // above does). This allows for a delay in the installation of the klass
334 // pointer that is needed during the create of klassKlass's. The
335 // method post_allocation_install_obj_klass() is used to install the
336 // klass pointer.
337 inline static oop permanent_obj_allocate_no_klass_install(KlassHandle klass,
338 int size,
339 TRAPS);
340 inline static void post_allocation_install_obj_klass(KlassHandle klass,
341 oop obj,
342 int size);
343 inline static oop permanent_array_allocate(KlassHandle klass, int size, int length, TRAPS);
344
345 // Raw memory allocation facilities
|