src/share/vm/gc_implementation/g1/g1StringDedupThread.hpp

Mon, 19 Aug 2019 10:11:31 +0200

author
neugens
date
Mon, 19 Aug 2019 10:11:31 +0200
changeset 9861
a248d0be1309
parent 6690
1772223a25a2
child 6876
710a3c8b516e
permissions
-rw-r--r--

8229401: Fix JFR code cache test failures
8223689: Add JFR Thread Sampling Support
8223690: Add JFR BiasedLock Event Support
8223691: Add JFR G1 Region Type Change Event Support
8223692: Add JFR G1 Heap Summary Event Support
Summary: Backport JFR from JDK11, additional fixes
Reviewed-by: neugens, apetushkov
Contributed-by: denghui.ddh@alibaba-inc.com

pliden@6413 1 /*
pliden@6413 2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
pliden@6413 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
pliden@6413 4 *
pliden@6413 5 * This code is free software; you can redistribute it and/or modify it
pliden@6413 6 * under the terms of the GNU General Public License version 2 only, as
pliden@6413 7 * published by the Free Software Foundation.
pliden@6413 8 *
pliden@6413 9 * This code is distributed in the hope that it will be useful, but WITHOUT
pliden@6413 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
pliden@6413 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
pliden@6413 12 * version 2 for more details (a copy is included in the LICENSE file that
pliden@6413 13 * accompanied this code).
pliden@6413 14 *
pliden@6413 15 * You should have received a copy of the GNU General Public License version
pliden@6413 16 * 2 along with this work; if not, write to the Free Software Foundation,
pliden@6413 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
pliden@6413 18 *
pliden@6413 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
pliden@6413 20 * or visit www.oracle.com if you need additional information or have any
pliden@6413 21 * questions.
pliden@6413 22 *
pliden@6413 23 */
pliden@6413 24
pliden@6413 25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1STRINGDEDUPTHREAD_HPP
pliden@6413 26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1STRINGDEDUPTHREAD_HPP
pliden@6413 27
pliden@6413 28 #include "gc_implementation/g1/g1StringDedupStat.hpp"
pliden@6413 29 #include "gc_implementation/shared/concurrentGCThread.hpp"
pliden@6413 30
pliden@6413 31 //
pliden@6413 32 // The deduplication thread is where the actual deduplication occurs. It waits for
pliden@6413 33 // deduplication candidates to appear on the deduplication queue, removes them from
pliden@6413 34 // the queue and tries to deduplicate them. It uses the deduplication hashtable to
pliden@6413 35 // find identical, already existing, character arrays on the heap. The thread runs
pliden@6413 36 // concurrently with the Java application but participates in safepoints to allow
pliden@6413 37 // the GC to adjust and unlink oops from the deduplication queue and table.
pliden@6413 38 //
pliden@6413 39 class G1StringDedupThread: public ConcurrentGCThread {
pliden@6413 40 private:
pliden@6413 41 static G1StringDedupThread* _thread;
pliden@6413 42
pliden@6413 43 G1StringDedupThread();
pliden@6413 44 ~G1StringDedupThread();
pliden@6413 45
pliden@6413 46 void print(outputStream* st, const G1StringDedupStat& last_stat, const G1StringDedupStat& total_stat);
pliden@6413 47
pliden@6413 48 public:
pliden@6413 49 static void create();
pliden@6690 50 static void stop();
pliden@6690 51
pliden@6413 52 static G1StringDedupThread* thread();
pliden@6413 53
pliden@6413 54 virtual void run();
pliden@6413 55 virtual void print_on(outputStream* st) const;
pliden@6413 56 };
pliden@6413 57
pliden@6413 58 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1STRINGDEDUPTHREAD_HPP

mercurial