Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/concurrentMark.cpp @ 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 | f2110083203d |
children | ff218fdb30ba |
comparison
equal
deleted
inserted
replaced
12033:bd902affe102 | 12080:5888334c9c24 |
---|---|
4527 : _out(out), | 4527 : _out(out), |
4528 _total_used_bytes(0), _total_capacity_bytes(0), | 4528 _total_used_bytes(0), _total_capacity_bytes(0), |
4529 _total_prev_live_bytes(0), _total_next_live_bytes(0), | 4529 _total_prev_live_bytes(0), _total_next_live_bytes(0), |
4530 _hum_used_bytes(0), _hum_capacity_bytes(0), | 4530 _hum_used_bytes(0), _hum_capacity_bytes(0), |
4531 _hum_prev_live_bytes(0), _hum_next_live_bytes(0), | 4531 _hum_prev_live_bytes(0), _hum_next_live_bytes(0), |
4532 _total_remset_bytes(0) { | 4532 _total_remset_bytes(0), _total_strong_code_roots_bytes(0) { |
4533 G1CollectedHeap* g1h = G1CollectedHeap::heap(); | 4533 G1CollectedHeap* g1h = G1CollectedHeap::heap(); |
4534 MemRegion g1_committed = g1h->g1_committed(); | 4534 MemRegion g1_committed = g1h->g1_committed(); |
4535 MemRegion g1_reserved = g1h->g1_reserved(); | 4535 MemRegion g1_reserved = g1h->g1_reserved(); |
4536 double now = os::elapsedTime(); | 4536 double now = os::elapsedTime(); |
4537 | 4537 |
4551 G1PPRL_ADDR_BASE_H_FORMAT | 4551 G1PPRL_ADDR_BASE_H_FORMAT |
4552 G1PPRL_BYTE_H_FORMAT | 4552 G1PPRL_BYTE_H_FORMAT |
4553 G1PPRL_BYTE_H_FORMAT | 4553 G1PPRL_BYTE_H_FORMAT |
4554 G1PPRL_BYTE_H_FORMAT | 4554 G1PPRL_BYTE_H_FORMAT |
4555 G1PPRL_DOUBLE_H_FORMAT | 4555 G1PPRL_DOUBLE_H_FORMAT |
4556 G1PPRL_BYTE_H_FORMAT | |
4556 G1PPRL_BYTE_H_FORMAT, | 4557 G1PPRL_BYTE_H_FORMAT, |
4557 "type", "address-range", | 4558 "type", "address-range", |
4558 "used", "prev-live", "next-live", "gc-eff", "remset"); | 4559 "used", "prev-live", "next-live", "gc-eff", |
4560 "remset", "code-roots"); | |
4559 _out->print_cr(G1PPRL_LINE_PREFIX | 4561 _out->print_cr(G1PPRL_LINE_PREFIX |
4560 G1PPRL_TYPE_H_FORMAT | 4562 G1PPRL_TYPE_H_FORMAT |
4561 G1PPRL_ADDR_BASE_H_FORMAT | 4563 G1PPRL_ADDR_BASE_H_FORMAT |
4562 G1PPRL_BYTE_H_FORMAT | 4564 G1PPRL_BYTE_H_FORMAT |
4563 G1PPRL_BYTE_H_FORMAT | 4565 G1PPRL_BYTE_H_FORMAT |
4564 G1PPRL_BYTE_H_FORMAT | 4566 G1PPRL_BYTE_H_FORMAT |
4565 G1PPRL_DOUBLE_H_FORMAT | 4567 G1PPRL_DOUBLE_H_FORMAT |
4568 G1PPRL_BYTE_H_FORMAT | |
4566 G1PPRL_BYTE_H_FORMAT, | 4569 G1PPRL_BYTE_H_FORMAT, |
4567 "", "", | 4570 "", "", |
4568 "(bytes)", "(bytes)", "(bytes)", "(bytes/ms)", "(bytes)"); | 4571 "(bytes)", "(bytes)", "(bytes)", "(bytes/ms)", |
4572 "(bytes)", "(bytes)"); | |
4569 } | 4573 } |
4570 | 4574 |
4571 // It takes as a parameter a reference to one of the _hum_* fields, it | 4575 // It takes as a parameter a reference to one of the _hum_* fields, it |
4572 // deduces the corresponding value for a region in a humongous region | 4576 // deduces the corresponding value for a region in a humongous region |
4573 // series (either the region size, or what's left if the _hum_* field | 4577 // series (either the region size, or what's left if the _hum_* field |
4606 size_t used_bytes = r->used(); | 4610 size_t used_bytes = r->used(); |
4607 size_t prev_live_bytes = r->live_bytes(); | 4611 size_t prev_live_bytes = r->live_bytes(); |
4608 size_t next_live_bytes = r->next_live_bytes(); | 4612 size_t next_live_bytes = r->next_live_bytes(); |
4609 double gc_eff = r->gc_efficiency(); | 4613 double gc_eff = r->gc_efficiency(); |
4610 size_t remset_bytes = r->rem_set()->mem_size(); | 4614 size_t remset_bytes = r->rem_set()->mem_size(); |
4615 size_t strong_code_roots_bytes = r->rem_set()->strong_code_roots_mem_size(); | |
4616 | |
4611 if (r->used() == 0) { | 4617 if (r->used() == 0) { |
4612 type = "FREE"; | 4618 type = "FREE"; |
4613 } else if (r->is_survivor()) { | 4619 } else if (r->is_survivor()) { |
4614 type = "SURV"; | 4620 type = "SURV"; |
4615 } else if (r->is_young()) { | 4621 } else if (r->is_young()) { |
4640 _total_used_bytes += used_bytes; | 4646 _total_used_bytes += used_bytes; |
4641 _total_capacity_bytes += capacity_bytes; | 4647 _total_capacity_bytes += capacity_bytes; |
4642 _total_prev_live_bytes += prev_live_bytes; | 4648 _total_prev_live_bytes += prev_live_bytes; |
4643 _total_next_live_bytes += next_live_bytes; | 4649 _total_next_live_bytes += next_live_bytes; |
4644 _total_remset_bytes += remset_bytes; | 4650 _total_remset_bytes += remset_bytes; |
4651 _total_strong_code_roots_bytes += strong_code_roots_bytes; | |
4645 | 4652 |
4646 // Print a line for this particular region. | 4653 // Print a line for this particular region. |
4647 _out->print_cr(G1PPRL_LINE_PREFIX | 4654 _out->print_cr(G1PPRL_LINE_PREFIX |
4648 G1PPRL_TYPE_FORMAT | 4655 G1PPRL_TYPE_FORMAT |
4649 G1PPRL_ADDR_BASE_FORMAT | 4656 G1PPRL_ADDR_BASE_FORMAT |
4650 G1PPRL_BYTE_FORMAT | 4657 G1PPRL_BYTE_FORMAT |
4651 G1PPRL_BYTE_FORMAT | 4658 G1PPRL_BYTE_FORMAT |
4652 G1PPRL_BYTE_FORMAT | 4659 G1PPRL_BYTE_FORMAT |
4653 G1PPRL_DOUBLE_FORMAT | 4660 G1PPRL_DOUBLE_FORMAT |
4661 G1PPRL_BYTE_FORMAT | |
4654 G1PPRL_BYTE_FORMAT, | 4662 G1PPRL_BYTE_FORMAT, |
4655 type, bottom, end, | 4663 type, bottom, end, |
4656 used_bytes, prev_live_bytes, next_live_bytes, gc_eff , remset_bytes); | 4664 used_bytes, prev_live_bytes, next_live_bytes, gc_eff, |
4665 remset_bytes, strong_code_roots_bytes); | |
4657 | 4666 |
4658 return false; | 4667 return false; |
4659 } | 4668 } |
4660 | 4669 |
4661 G1PrintRegionLivenessInfoClosure::~G1PrintRegionLivenessInfoClosure() { | 4670 G1PrintRegionLivenessInfoClosure::~G1PrintRegionLivenessInfoClosure() { |
4667 " SUMMARY" | 4676 " SUMMARY" |
4668 G1PPRL_SUM_MB_FORMAT("capacity") | 4677 G1PPRL_SUM_MB_FORMAT("capacity") |
4669 G1PPRL_SUM_MB_PERC_FORMAT("used") | 4678 G1PPRL_SUM_MB_PERC_FORMAT("used") |
4670 G1PPRL_SUM_MB_PERC_FORMAT("prev-live") | 4679 G1PPRL_SUM_MB_PERC_FORMAT("prev-live") |
4671 G1PPRL_SUM_MB_PERC_FORMAT("next-live") | 4680 G1PPRL_SUM_MB_PERC_FORMAT("next-live") |
4672 G1PPRL_SUM_MB_FORMAT("remset"), | 4681 G1PPRL_SUM_MB_FORMAT("remset") |
4682 G1PPRL_SUM_MB_FORMAT("code-roots"), | |
4673 bytes_to_mb(_total_capacity_bytes), | 4683 bytes_to_mb(_total_capacity_bytes), |
4674 bytes_to_mb(_total_used_bytes), | 4684 bytes_to_mb(_total_used_bytes), |
4675 perc(_total_used_bytes, _total_capacity_bytes), | 4685 perc(_total_used_bytes, _total_capacity_bytes), |
4676 bytes_to_mb(_total_prev_live_bytes), | 4686 bytes_to_mb(_total_prev_live_bytes), |
4677 perc(_total_prev_live_bytes, _total_capacity_bytes), | 4687 perc(_total_prev_live_bytes, _total_capacity_bytes), |
4678 bytes_to_mb(_total_next_live_bytes), | 4688 bytes_to_mb(_total_next_live_bytes), |
4679 perc(_total_next_live_bytes, _total_capacity_bytes), | 4689 perc(_total_next_live_bytes, _total_capacity_bytes), |
4680 bytes_to_mb(_total_remset_bytes)); | 4690 bytes_to_mb(_total_remset_bytes), |
4691 bytes_to_mb(_total_strong_code_roots_bytes)); | |
4681 _out->cr(); | 4692 _out->cr(); |
4682 } | 4693 } |