Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/referenceProcessor.cpp @ 21112:f01ebceea995
Graal should use same soft reference policy as C2
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Wed, 22 Apr 2015 16:34:32 -0700 |
parents | 7848fc12602b |
children | be896a1983c0 |
comparison
equal
deleted
inserted
replaced
21111:91d70d102132 | 21112:f01ebceea995 |
---|---|
55 _soft_ref_timestamp_clock = now; | 55 _soft_ref_timestamp_clock = now; |
56 // Also update the soft ref clock in j.l.r.SoftReference | 56 // Also update the soft ref clock in j.l.r.SoftReference |
57 java_lang_ref_SoftReference::set_clock(_soft_ref_timestamp_clock); | 57 java_lang_ref_SoftReference::set_clock(_soft_ref_timestamp_clock); |
58 | 58 |
59 _always_clear_soft_ref_policy = new AlwaysClearPolicy(); | 59 _always_clear_soft_ref_policy = new AlwaysClearPolicy(); |
60 _default_soft_ref_policy = new COMPILER2_PRESENT(LRUMaxHeapPolicy()) | 60 #if defined(COMPILER2) || defined(GRAAL) |
61 NOT_COMPILER2(LRUCurrentHeapPolicy()); | 61 _default_soft_ref_policy = new LRUMaxHeapPolicy(); |
62 #else | |
63 _default_soft_ref_policy = new LRUCurrentHeapPolicy(); | |
64 #endif | |
62 if (_always_clear_soft_ref_policy == NULL || _default_soft_ref_policy == NULL) { | 65 if (_always_clear_soft_ref_policy == NULL || _default_soft_ref_policy == NULL) { |
63 vm_exit_during_initialization("Could not allocate reference policy object"); | 66 vm_exit_during_initialization("Could not allocate reference policy object"); |
64 } | 67 } |
65 guarantee(RefDiscoveryPolicy == ReferenceBasedDiscovery || | 68 guarantee(RefDiscoveryPolicy == ReferenceBasedDiscovery || |
66 RefDiscoveryPolicy == ReferentBasedDiscovery, | 69 RefDiscoveryPolicy == ReferentBasedDiscovery, |