comparison src/share/vm/gc_implementation/g1/heapRegion.hpp @ 12080:5888334c9c24

7145569: G1: optimize nmethods scanning Summary: Add a list of nmethods to the RSet for a region that contain references into the region. Skip scanning the code cache during root scanning and scan the nmethod lists during RSet scanning instead. Reviewed-by: tschatzl, brutisso, mgerdin, twisti, kvn
author johnc
date Thu, 15 Aug 2013 10:52:18 +0200
parents db9981fd3124
children 84683e78e713
comparison
equal deleted inserted replaced
12033:bd902affe102 12080:5888334c9c24
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" : \
369 ScrubRemSetClaimValue = 3, 370 ScrubRemSetClaimValue = 3,
370 ParVerifyClaimValue = 4, 371 ParVerifyClaimValue = 4,
371 RebuildRSClaimValue = 5, 372 RebuildRSClaimValue = 5,
372 ParEvacFailureClaimValue = 6, 373 ParEvacFailureClaimValue = 6,
373 AggregateCountClaimValue = 7, 374 AggregateCountClaimValue = 7,
374 VerifyCountClaimValue = 8 375 VerifyCountClaimValue = 8,
376 ParMarkRootClaimValue = 9
375 }; 377 };
376 378
377 inline HeapWord* par_allocate_no_bot_updates(size_t word_size) { 379 inline HeapWord* par_allocate_no_bot_updates(size_t word_size) {
378 assert(is_young(), "we can only skip BOT updates on young regions"); 380 assert(is_young(), "we can only skip BOT updates on young regions");
379 return ContiguousSpace::par_allocate(word_size); 381 return ContiguousSpace::par_allocate(word_size);
794 796
795 virtual CompactibleSpace* next_compaction_space() const; 797 virtual CompactibleSpace* next_compaction_space() const;
796 798
797 virtual void reset_after_compaction(); 799 virtual void reset_after_compaction();
798 800
801 // Routines for managing a list of code roots (attached to the
802 // this region's RSet) that point into this heap region.
803 void add_strong_code_root(nmethod* nm);
804 void remove_strong_code_root(nmethod* nm);
805
806 // During a collection, migrate the successfully evacuated
807 // strong code roots that referenced into this region to the
808 // new regions that they now point into. Unsuccessfully
809 // evacuated code roots are not migrated.
810 void migrate_strong_code_roots();
811
812 // Applies blk->do_code_blob() to each of the entries in
813 // the strong code roots list for this region
814 void strong_code_roots_do(CodeBlobClosure* blk) const;
815
816 // Verify that the entries on the strong code root list for this
817 // region are live and include at least one pointer into this region.
818 void verify_strong_code_roots(VerifyOption vo, bool* failures) const;
819
799 void print() const; 820 void print() const;
800 void print_on(outputStream* st) const; 821 void print_on(outputStream* st) const;
801 822
802 // vo == UsePrevMarking -> use "prev" marking information, 823 // vo == UsePrevMarking -> use "prev" marking information,
803 // vo == UseNextMarking -> use "next" marking information 824 // vo == UseNextMarking -> use "next" marking information