Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/heapRegion.hpp @ 12355:cefad50507d8
Merge with hs25-b53
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 11 Oct 2013 10:38:03 +0200 |
parents | 40136aa2cdb1 |
children | 96b1c2e06e25 |
comparison
equal
deleted
inserted
replaced
12058:ccb4f2af2319 | 12355:cefad50507d8 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2013, 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. |
50 class ContiguousSpace; | 50 class ContiguousSpace; |
51 class HeapRegionRemSet; | 51 class HeapRegionRemSet; |
52 class HeapRegionRemSetIterator; | 52 class HeapRegionRemSetIterator; |
53 class HeapRegion; | 53 class HeapRegion; |
54 class HeapRegionSetBase; | 54 class HeapRegionSetBase; |
55 class nmethod; | |
55 | 56 |
56 #define HR_FORMAT "%u:(%s)["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]" | 57 #define HR_FORMAT "%u:(%s)["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]" |
57 #define HR_FORMAT_PARAMS(_hr_) \ | 58 #define HR_FORMAT_PARAMS(_hr_) \ |
58 (_hr_)->hrs_index(), \ | 59 (_hr_)->hrs_index(), \ |
59 (_hr_)->is_survivor() ? "S" : (_hr_)->is_young() ? "E" : \ | 60 (_hr_)->is_survivor() ? "S" : (_hr_)->is_young() ? "E" : \ |
352 static size_t align_up_to_region_byte_size(size_t sz) { | 353 static size_t align_up_to_region_byte_size(size_t sz) { |
353 return (sz + (size_t) GrainBytes - 1) & | 354 return (sz + (size_t) GrainBytes - 1) & |
354 ~((1 << (size_t) LogOfHRGrainBytes) - 1); | 355 ~((1 << (size_t) LogOfHRGrainBytes) - 1); |
355 } | 356 } |
356 | 357 |
358 static size_t max_region_size(); | |
359 | |
357 // It sets up the heap region size (GrainBytes / GrainWords), as | 360 // It sets up the heap region size (GrainBytes / GrainWords), as |
358 // well as other related fields that are based on the heap region | 361 // well as other related fields that are based on the heap region |
359 // size (LogOfHRGrainBytes / LogOfHRGrainWords / | 362 // size (LogOfHRGrainBytes / LogOfHRGrainWords / |
360 // CardsPerRegion). All those fields are considered constant | 363 // CardsPerRegion). All those fields are considered constant |
361 // throughout the JVM's execution, therefore they should only be set | 364 // throughout the JVM's execution, therefore they should only be set |
362 // up once during initialization time. | 365 // up once during initialization time. |
363 static void setup_heap_region_size(uintx min_heap_size); | 366 static void setup_heap_region_size(size_t initial_heap_size, size_t max_heap_size); |
364 | 367 |
365 enum ClaimValues { | 368 enum ClaimValues { |
366 InitialClaimValue = 0, | 369 InitialClaimValue = 0, |
367 FinalCountClaimValue = 1, | 370 FinalCountClaimValue = 1, |
368 NoteEndClaimValue = 2, | 371 NoteEndClaimValue = 2, |
369 ScrubRemSetClaimValue = 3, | 372 ScrubRemSetClaimValue = 3, |
370 ParVerifyClaimValue = 4, | 373 ParVerifyClaimValue = 4, |
371 RebuildRSClaimValue = 5, | 374 RebuildRSClaimValue = 5, |
372 ParEvacFailureClaimValue = 6, | 375 ParEvacFailureClaimValue = 6, |
373 AggregateCountClaimValue = 7, | 376 AggregateCountClaimValue = 7, |
374 VerifyCountClaimValue = 8 | 377 VerifyCountClaimValue = 8, |
378 ParMarkRootClaimValue = 9 | |
375 }; | 379 }; |
376 | 380 |
377 inline HeapWord* par_allocate_no_bot_updates(size_t word_size) { | 381 inline HeapWord* par_allocate_no_bot_updates(size_t word_size) { |
378 assert(is_young(), "we can only skip BOT updates on young regions"); | 382 assert(is_young(), "we can only skip BOT updates on young regions"); |
379 return ContiguousSpace::par_allocate(word_size); | 383 return ContiguousSpace::par_allocate(word_size); |
794 | 798 |
795 virtual CompactibleSpace* next_compaction_space() const; | 799 virtual CompactibleSpace* next_compaction_space() const; |
796 | 800 |
797 virtual void reset_after_compaction(); | 801 virtual void reset_after_compaction(); |
798 | 802 |
803 // Routines for managing a list of code roots (attached to the | |
804 // this region's RSet) that point into this heap region. | |
805 void add_strong_code_root(nmethod* nm); | |
806 void remove_strong_code_root(nmethod* nm); | |
807 | |
808 // During a collection, migrate the successfully evacuated | |
809 // strong code roots that referenced into this region to the | |
810 // new regions that they now point into. Unsuccessfully | |
811 // evacuated code roots are not migrated. | |
812 void migrate_strong_code_roots(); | |
813 | |
814 // Applies blk->do_code_blob() to each of the entries in | |
815 // the strong code roots list for this region | |
816 void strong_code_roots_do(CodeBlobClosure* blk) const; | |
817 | |
818 // Verify that the entries on the strong code root list for this | |
819 // region are live and include at least one pointer into this region. | |
820 void verify_strong_code_roots(VerifyOption vo, bool* failures) const; | |
821 | |
799 void print() const; | 822 void print() const; |
800 void print_on(outputStream* st) const; | 823 void print_on(outputStream* st) const; |
801 | 824 |
802 // vo == UsePrevMarking -> use "prev" marking information, | 825 // vo == UsePrevMarking -> use "prev" marking information, |
803 // vo == UseNextMarking -> use "next" marking information | 826 // vo == UseNextMarking -> use "next" marking information |