# HG changeset patch # User stefank # Date 1427274836 -3600 # Node ID 0bbea51cbaf8ff292c40c67be8ec44427943f600 # Parent 9ed339a5e096a3e6620a734fcd9af3448e2dcc35 8075829: Move CSpaceCounters implementation to cSpaceCounters.cpp Reviewed-by: jwilhelm, brutisso diff -r 9ed339a5e096 -r 0bbea51cbaf8 hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.cpp --- a/hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.cpp Wed Mar 25 10:08:09 2015 +0100 +++ b/hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.cpp Wed Mar 25 10:13:56 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2015, 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 @@ -63,3 +63,20 @@ _space->capacity(), CHECK); } } + +void CSpaceCounters::update_capacity() { + _capacity->set_value(_space->capacity()); +} + +void CSpaceCounters::update_used() { + _used->set_value(_space->used()); +} + +void CSpaceCounters::update_all() { + update_used(); + update_capacity(); +} + +jlong ContiguousSpaceUsedHelper::take_sample(){ + return _space->used(); +} diff -r 9ed339a5e096 -r 0bbea51cbaf8 hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.hpp --- a/hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.hpp Wed Mar 25 10:08:09 2015 +0100 +++ b/hotspot/src/share/vm/gc_implementation/shared/cSpaceCounters.hpp Wed Mar 25 10:13:56 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2015, 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 @@ -26,7 +26,7 @@ #define SHARE_VM_GC_IMPLEMENTATION_SHARED_CSPACECOUNTERS_HPP #include "gc_implementation/shared/generationCounters.hpp" -#include "memory/space.inline.hpp" +#include "memory/space.hpp" #include "runtime/perfData.hpp" // A CSpaceCounters is a holder class for performance counters @@ -56,18 +56,9 @@ if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space); } - virtual inline void update_capacity() { - _capacity->set_value(_space->capacity()); - } - - virtual inline void update_used() { - _used->set_value(_space->used()); - } - - virtual inline void update_all() { - update_used(); - update_capacity(); - } + virtual void update_capacity(); + virtual void update_used(); + virtual void update_all(); const char* name_space() const { return _name_space; } }; @@ -79,9 +70,7 @@ public: ContiguousSpaceUsedHelper(ContiguousSpace* space) : _space(space) { } - inline jlong take_sample() { - return _space->used(); - } + jlong take_sample(); }; #endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_CSPACECOUNTERS_HPP diff -r 9ed339a5e096 -r 0bbea51cbaf8 hotspot/src/share/vm/memory/space.hpp --- a/hotspot/src/share/vm/memory/space.hpp Wed Mar 25 10:08:09 2015 +0100 +++ b/hotspot/src/share/vm/memory/space.hpp Wed Mar 25 10:13:56 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, 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 @@ -195,7 +195,7 @@ // structure supporting these calls, possibly speeding up future calls. // The default implementation, however, is simply to call the const // version. - inline virtual HeapWord* block_start(const void* p); + virtual HeapWord* block_start(const void* p); // Requires "addr" to be the start of a chunk, and returns its size. // "addr + size" is required to be the start of a new chunk, or the end diff -r 9ed339a5e096 -r 0bbea51cbaf8 hotspot/src/share/vm/precompiled/precompiled.hpp --- a/hotspot/src/share/vm/precompiled/precompiled.hpp Wed Mar 25 10:08:09 2015 +0100 +++ b/hotspot/src/share/vm/precompiled/precompiled.hpp Wed Mar 25 10:13:56 2015 +0100 @@ -135,7 +135,6 @@ # include "memory/resourceArea.hpp" # include "memory/sharedHeap.hpp" # include "memory/space.hpp" -# include "memory/space.inline.hpp" # include "memory/threadLocalAllocBuffer.hpp" # include "memory/threadLocalAllocBuffer.inline.hpp" # include "memory/universe.hpp"