< prev index next >
src/hotspot/share/gc/g1/g1StringDedupThread.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2014, 2017, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2014, 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 33,60 ****
#include "oops/oop.inline.hpp"
#include "runtime/atomic.hpp"
G1StringDedupThread* G1StringDedupThread::_thread = NULL;
! G1StringDedupThread::G1StringDedupThread(const char* name) :
ConcurrentGCThread() {
! set_name("%s", name);
create_and_start();
}
G1StringDedupThread::~G1StringDedupThread() {
ShouldNotReachHere();
}
! void G1StringDedupThread::create(const char* name) {
assert(G1StringDedup::is_enabled(), "String deduplication not enabled");
assert(_thread == NULL, "One string deduplication thread allowed");
! _thread = new G1StringDedupThread(name);
! }
!
! void G1StringDedupThread::create() {
! create("G1 StrDedup");
}
G1StringDedupThread* G1StringDedupThread::thread() {
assert(G1StringDedup::is_enabled(), "String deduplication not enabled");
assert(_thread != NULL, "String deduplication thread not created");
--- 33,56 ----
#include "oops/oop.inline.hpp"
#include "runtime/atomic.hpp"
G1StringDedupThread* G1StringDedupThread::_thread = NULL;
! G1StringDedupThread::G1StringDedupThread() :
ConcurrentGCThread() {
! set_name("G1 StrDedup");
create_and_start();
}
G1StringDedupThread::~G1StringDedupThread() {
ShouldNotReachHere();
}
! void G1StringDedupThread::create() {
assert(G1StringDedup::is_enabled(), "String deduplication not enabled");
assert(_thread == NULL, "One string deduplication thread allowed");
! _thread = new G1StringDedupThread();
}
G1StringDedupThread* G1StringDedupThread::thread() {
assert(G1StringDedup::is_enabled(), "String deduplication not enabled");
assert(_thread != NULL, "String deduplication thread not created");
< prev index next >