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

Print this page
rev 6361 : 8042474: Clean up duplicated code in RSHashTable
Summary: Removed duplicate code in RSHashTable to fetch SparsePRTEntries
Reviewed-by:
Contributed-by: Andreas Sjoberg <andreas.sjoberg@oracle.com>

*** 1,7 **** /* ! * Copyright (c) 2001, 2013, 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) 2001, 2014, 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,135 **** int _free_list; // Requires that the caller hold a lock preventing parallel modifying // operations, and that the the table be less than completely full. If // an entry for "region_ind" is already in the table, finds it and - // returns its address; otherwise returns "NULL." - SparsePRTEntry* entry_for_region_ind(RegionIdx_t region_ind) const; - - // Requires that the caller hold a lock preventing parallel modifying - // operations, and that the the table be less than completely full. If - // an entry for "region_ind" is already in the table, finds it and // returns its address; otherwise allocates, initializes, inserts and // returns a new entry for "region_ind". SparsePRTEntry* entry_for_region_ind_create(RegionIdx_t region_ind); // Returns the index of the next free entry in "_entries". --- 120,129 ----
*** 156,166 **** bool contains_card(RegionIdx_t region_id, CardIdx_t card_index) const; void add_entry(SparsePRTEntry* e); ! SparsePRTEntry* get_entry(RegionIdx_t region_id); void clear(); size_t capacity() const { return _capacity; } size_t capacity_mask() const { return _capacity_mask; } --- 150,160 ---- bool contains_card(RegionIdx_t region_id, CardIdx_t card_index) const; void add_entry(SparsePRTEntry* e); ! SparsePRTEntry* get_entry(RegionIdx_t region_id) const; void clear(); size_t capacity() const { return _capacity; } size_t capacity_mask() const { return _capacity_mask; }