Mercurial > hg > truffle
comparison src/share/vm/gc_interface/collectedHeap.hpp @ 3774:c9ca3f51cf41
6994322: Remove the is_tlab and is_noref / is_large_noref parameters from the CollectedHeap
Summary: Remove two unused parameters from the mem_allocate() method and update its uses accordingly.
Reviewed-by: stefank, johnc
author | tonyp |
---|---|
date | Thu, 16 Jun 2011 15:51:57 -0400 |
parents | 6747fd0512e0 |
children | a92cdbac8b9e |
comparison
equal
deleted
inserted
replaced
3773:5130fa1b24f1 | 3774:c9ca3f51cf41 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
91 // This code could perhaps be moved into initialize() but would | 91 // This code could perhaps be moved into initialize() but would |
92 // be slightly more awkward because we want the latter to be a | 92 // be slightly more awkward because we want the latter to be a |
93 // pure virtual. | 93 // pure virtual. |
94 void pre_initialize(); | 94 void pre_initialize(); |
95 | 95 |
96 // Create a new tlab | 96 // Create a new tlab. All TLAB allocations must go through this. |
97 virtual HeapWord* allocate_new_tlab(size_t size); | 97 virtual HeapWord* allocate_new_tlab(size_t size); |
98 | 98 |
99 // Accumulate statistics on all tlabs. | 99 // Accumulate statistics on all tlabs. |
100 virtual void accumulate_statistics_all_tlabs(); | 100 virtual void accumulate_statistics_all_tlabs(); |
101 | 101 |
107 inline static HeapWord* allocate_from_tlab(Thread* thread, size_t size); | 107 inline static HeapWord* allocate_from_tlab(Thread* thread, size_t size); |
108 static HeapWord* allocate_from_tlab_slow(Thread* thread, size_t size); | 108 static HeapWord* allocate_from_tlab_slow(Thread* thread, size_t size); |
109 | 109 |
110 // Allocate an uninitialized block of the given size, or returns NULL if | 110 // Allocate an uninitialized block of the given size, or returns NULL if |
111 // this is impossible. | 111 // this is impossible. |
112 inline static HeapWord* common_mem_allocate_noinit(size_t size, bool is_noref, TRAPS); | 112 inline static HeapWord* common_mem_allocate_noinit(size_t size, TRAPS); |
113 | 113 |
114 // Like allocate_init, but the block returned by a successful allocation | 114 // Like allocate_init, but the block returned by a successful allocation |
115 // is guaranteed initialized to zeros. | 115 // is guaranteed initialized to zeros. |
116 inline static HeapWord* common_mem_allocate_init(size_t size, bool is_noref, TRAPS); | 116 inline static HeapWord* common_mem_allocate_init(size_t size, TRAPS); |
117 | 117 |
118 // Same as common_mem version, except memory is allocated in the permanent area | 118 // Same as common_mem version, except memory is allocated in the permanent area |
119 // If there is no permanent area, revert to common_mem_allocate_noinit | 119 // If there is no permanent area, revert to common_mem_allocate_noinit |
120 inline static HeapWord* common_permanent_mem_allocate_noinit(size_t size, TRAPS); | 120 inline static HeapWord* common_permanent_mem_allocate_noinit(size_t size, TRAPS); |
121 | 121 |
320 virtual void preload_and_dump(TRAPS) { ShouldNotReachHere(); } | 320 virtual void preload_and_dump(TRAPS) { ShouldNotReachHere(); } |
321 | 321 |
322 // General obj/array allocation facilities. | 322 // General obj/array allocation facilities. |
323 inline static oop obj_allocate(KlassHandle klass, int size, TRAPS); | 323 inline static oop obj_allocate(KlassHandle klass, int size, TRAPS); |
324 inline static oop array_allocate(KlassHandle klass, int size, int length, TRAPS); | 324 inline static oop array_allocate(KlassHandle klass, int size, int length, TRAPS); |
325 inline static oop large_typearray_allocate(KlassHandle klass, int size, int length, TRAPS); | |
326 | 325 |
327 // Special obj/array allocation facilities. | 326 // Special obj/array allocation facilities. |
328 // Some heaps may want to manage "permanent" data uniquely. These default | 327 // Some heaps may want to manage "permanent" data uniquely. These default |
329 // to the general routines if the heap does not support such handling. | 328 // to the general routines if the heap does not support such handling. |
330 inline static oop permanent_obj_allocate(KlassHandle klass, int size, TRAPS); | 329 inline static oop permanent_obj_allocate(KlassHandle klass, int size, TRAPS); |
343 inline static oop permanent_array_allocate(KlassHandle klass, int size, int length, TRAPS); | 342 inline static oop permanent_array_allocate(KlassHandle klass, int size, int length, TRAPS); |
344 | 343 |
345 // Raw memory allocation facilities | 344 // Raw memory allocation facilities |
346 // The obj and array allocate methods are covers for these methods. | 345 // The obj and array allocate methods are covers for these methods. |
347 // The permanent allocation method should default to mem_allocate if | 346 // The permanent allocation method should default to mem_allocate if |
348 // permanent memory isn't supported. | 347 // permanent memory isn't supported. mem_allocate() should never be |
348 // called to allocate TLABs, only individual objects. | |
349 virtual HeapWord* mem_allocate(size_t size, | 349 virtual HeapWord* mem_allocate(size_t size, |
350 bool is_noref, | |
351 bool is_tlab, | |
352 bool* gc_overhead_limit_was_exceeded) = 0; | 350 bool* gc_overhead_limit_was_exceeded) = 0; |
353 virtual HeapWord* permanent_mem_allocate(size_t size) = 0; | 351 virtual HeapWord* permanent_mem_allocate(size_t size) = 0; |
354 | |
355 // The boundary between a "large" and "small" array of primitives, in words. | |
356 virtual size_t large_typearray_limit() = 0; | |
357 | 352 |
358 // Utilities for turning raw memory into filler objects. | 353 // Utilities for turning raw memory into filler objects. |
359 // | 354 // |
360 // min_fill_size() is the smallest region that can be filled. | 355 // min_fill_size() is the smallest region that can be filled. |
361 // fill_with_objects() can fill arbitrary-sized regions of the heap using | 356 // fill_with_objects() can fill arbitrary-sized regions of the heap using |