mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8232689: Remove ParCompactionManager::Action enum
Reviewed-by: lkorinth, kbarrett, tschatzl
This commit is contained in:
parent
0b22124ee4
commit
41f962d784
2 changed files with 4 additions and 33 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -52,8 +52,7 @@ RegionTaskQueueSet* ParCompactionManager::_region_array = NULL;
|
||||||
GrowableArray<size_t >* ParCompactionManager::_shadow_region_array = NULL;
|
GrowableArray<size_t >* ParCompactionManager::_shadow_region_array = NULL;
|
||||||
Monitor* ParCompactionManager::_shadow_region_monitor = NULL;
|
Monitor* ParCompactionManager::_shadow_region_monitor = NULL;
|
||||||
|
|
||||||
ParCompactionManager::ParCompactionManager() :
|
ParCompactionManager::ParCompactionManager() {
|
||||||
_action(CopyAndUpdate) {
|
|
||||||
|
|
||||||
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
|
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
|
||||||
|
|
||||||
|
@ -115,19 +114,6 @@ void ParCompactionManager::reset_all_bitmap_query_caches() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ParCompactionManager::should_update() {
|
|
||||||
assert(action() != NotValid, "Action is not set");
|
|
||||||
return (action() == ParCompactionManager::Update) ||
|
|
||||||
(action() == ParCompactionManager::CopyAndUpdate) ||
|
|
||||||
(action() == ParCompactionManager::UpdateAndCopy);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ParCompactionManager::should_copy() {
|
|
||||||
assert(action() != NotValid, "Action is not set");
|
|
||||||
return (action() == ParCompactionManager::Copy) ||
|
|
||||||
(action() == ParCompactionManager::CopyAndUpdate) ||
|
|
||||||
(action() == ParCompactionManager::UpdateAndCopy);
|
|
||||||
}
|
|
||||||
|
|
||||||
ParCompactionManager*
|
ParCompactionManager*
|
||||||
ParCompactionManager::gc_thread_compaction_manager(uint index) {
|
ParCompactionManager::gc_thread_compaction_manager(uint index) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -50,16 +50,6 @@ class ParCompactionManager : public CHeapObj<mtGC> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// ------------------------ Don't putback if not needed
|
|
||||||
// Actions that the compaction manager should take.
|
|
||||||
enum Action {
|
|
||||||
Update,
|
|
||||||
Copy,
|
|
||||||
UpdateAndCopy,
|
|
||||||
CopyAndUpdate,
|
|
||||||
NotValid
|
|
||||||
};
|
|
||||||
// ------------------------ End don't putback if not needed
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// 32-bit: 4K * 8 = 32KiB; 64-bit: 8K * 16 = 128KiB
|
// 32-bit: 4K * 8 = 32KiB; 64-bit: 8K * 16 = 128KiB
|
||||||
|
@ -95,8 +85,6 @@ private:
|
||||||
// See pop/push_shadow_region_mt_safe() below
|
// See pop/push_shadow_region_mt_safe() below
|
||||||
static Monitor* _shadow_region_monitor;
|
static Monitor* _shadow_region_monitor;
|
||||||
|
|
||||||
Action _action;
|
|
||||||
|
|
||||||
HeapWord* _last_query_beg;
|
HeapWord* _last_query_beg;
|
||||||
oop _last_query_obj;
|
oop _last_query_obj;
|
||||||
size_t _last_query_ret;
|
size_t _last_query_ret;
|
||||||
|
@ -138,9 +126,6 @@ private:
|
||||||
_last_query_ret = 0;
|
_last_query_ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Action action() { return _action; }
|
|
||||||
void set_action(Action v) { _action = v; }
|
|
||||||
|
|
||||||
// Bitmap query support, cache last query and result
|
// Bitmap query support, cache last query and result
|
||||||
HeapWord* last_query_begin() { return _last_query_beg; }
|
HeapWord* last_query_begin() { return _last_query_beg; }
|
||||||
oop last_query_object() { return _last_query_obj; }
|
oop last_query_object() { return _last_query_obj; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue