--- old/src/hotspot/share/gc/shared/collectedHeap.hpp 2020-02-18 14:16:42.416513431 +0800 +++ new/src/hotspot/share/gc/shared/collectedHeap.hpp 2020-02-18 14:16:42.280515414 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ #include "gc/shared/gcWhen.hpp" #include "gc/shared/verifyOption.hpp" #include "memory/allocation.hpp" +#include "memory/heapInspection.hpp" #include "runtime/handles.hpp" #include "runtime/perfData.hpp" #include "runtime/safepoint.hpp" @@ -43,6 +44,7 @@ // class defines the functions that a heap must implement, and contains // infrastructure common to all heaps. +class AbstractGangTask; class AdaptiveSizePolicy; class BarrierSet; class GCHeapSummary; @@ -386,6 +388,19 @@ // Iterate over all objects, calling "cl.do_object" on each. virtual void object_iterate(ObjectClosure* cl) = 0; + // Run parallel heap inspection, return false as not supported by heap. + virtual bool run_par_heap_inspect_task(KlassInfoTable* cit, + BoolObjectClosure* filter, + size_t* missed_count, + size_t thread_num) { + return false; + } + + // Parallel iterate over all objects, reture false if heap not support. + virtual bool object_iterate_try_parallel(AbstractGangTask *task, size_t thread_num) { + return false; + } + // Keep alive an object that was loaded with AS_NO_KEEPALIVE. virtual void keep_alive(oop obj) {}