RFR(S) 8196923: [REDO] NMT: Report array class count in NMT summary
Zhengyu Gu
zgu at redhat.com
Thu Feb 8 18:08:19 UTC 2018
Thanks, Thomas,
-Zhengyu
On 02/08/2018 01:05 PM, Thomas Stüfe wrote:
> Hi Zhengyu,
>
> change looks fine.
>
> Best Regards, Thomas
>
> On Thu, Feb 8, 2018 at 4:43 PM, Zhengyu Gu <zgu at redhat.com
> <mailto:zgu at redhat.com>> wrote:
>
> This patch fixed compilation errors on Windows in early patch
> (JDK-8193184), due following size_t => int conversions.
>
> classLoaderData.cpp.patch
>
> InstanceKlass* try_get_next_class() {
> assert(SafepointSynchronize::is_at_safepoint(), "only called
> at safepoint");
> - int max_classes = InstanceKlass::number_of_instance_classes();
> + size_t max_classes = ClassLoaderDataGraph::num_instance_classes();
> assert(max_classes > 0, "should not be called with no instance
> classes");
> - for (int i = 0; i < max_classes; ) {
> + for (size_t i = 0; i < max_classes; ) {
>
>
> compilationPolicy.cpp.patch
>
> assert(SafepointSynchronize::is_at_safepoint(), "can only be
> executed at a safepoint");
> - int nclasses = InstanceKlass::number_of_instance_classes();
> - int classes_per_tick = nclasses * (CounterDecayMinIntervalLength
> * 1e-3 /
> + size_t nclasses = ClassLoaderDataGraph::num_instance_classes();
> + size_t classes_per_tick = nclasses *
> (CounterDecayMinIntervalLength * 1e-3 /
> CounterHalfLifeTime);
> - for (int i = 0; i < classes_per_tick; i++) {
> + for (size_t i = 0; i < classes_per_tick; i++) {
> InstanceKlass* k = ClassLoaderDataGraph::try_get_next_class();
> if (k != NULL) {
> k->methods_do(do_method);
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8196923
> <https://bugs.openjdk.java.net/browse/JDK-8196923>
>
> Webrev: http://cr.openjdk.java.net/~zgu/8196923/webrev.00/
> <http://cr.openjdk.java.net/~zgu/8196923/webrev.00/>
>
> Test:
>
> hotspot_runtime on Linux 64 (fastdebug and release)
>
> Thanks,
>
> -Zhengyu
>
>
>
>
More information about the hotspot-runtime-dev
mailing list