< prev index next >
src/hotspot/share/gc/shared/stringdedup/stringDedupTable.hpp
Print this page
rev 57656 : 8236878: Use atomic instruction to update StringDedupTable's entries and entries_removed counters
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -120,11 +120,11 @@
// Cache for reuse and fast alloc/free of table entries.
static StringDedupEntryCache* _entry_cache;
StringDedupEntry** _buckets;
size_t _size;
- uintx _entries;
+ volatile uintx _entries;
uintx _shrink_threshold;
uintx _grow_threshold;
bool _rehash_needed;
// The hash seed also dictates which hash function to use. A
@@ -142,11 +142,11 @@
static const uintx _rehash_threshold;
static const double _max_cache_factor;
// Table statistics, only used for logging.
static uintx _entries_added;
- static uintx _entries_removed;
+ static volatile uintx _entries_removed;
static uintx _resize_count;
static uintx _rehash_count;
static volatile size_t _claimed_index;
< prev index next >