/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/mutexLocker.hpp"
#include "services/gcNotifier.hpp"
#include "services/management.hpp"
#include "services/memoryService.hpp"
#include "memoryManager.hpp"
#include "memory/oopFactory.hpp"
// Make a copy of the last GC statistics
// GC may occur between now and the creation of the notification
// stat is deallocated inside GCNotificationRequest
GCNotificationRequest *request = new GCNotificationRequest(os::javaTimeMillis(),mgr,action,cause,stat);
}
if(first_request == NULL) {
} else {
}
}
if(first_request != NULL) {
}
return request;
}
return first_request != NULL;
}
&args,
CHECK_NH);
}
// Fill the arrays of MemoryUsage objects with before and after GC
// per pool memory usage
// The array allocations below should use a handle containing mu_klass
// as the first allocation could trigger a GC, causing the actual
// klass oop to move, and leaving mu_klass pointing to the old
// location.
for (int i = 0; i < MemoryService::num_memory_pools(); i++) {
Handle before_usage = MemoryService::create_MemoryUsage_obj(gcStatInfo->before_gc_usage_for_pool(i), CHECK_NH);
// If max size == 0, this pool is a survivor space.
// Set max size = -1 since the pools will be swapped after GC.
} else {
}
}
// Current implementation only has 1 attribute (number of GC threads)
// The type is 'I'
objArrayOop extra_args_array = oopFactory::new_objArray(SystemDictionary::Integer_klass(), 1, CHECK_NH);
{
intK,
&argsInt,
CHECK_NH);
}
ik,
CHECK_NH);
return Handle(gcInfo_instance());
}
// Clearing pending exception to avoid premature termination of
// the service thread
if (HAS_PENDING_EXCEPTION) {
}
}
// This class is used in GCNotifier::sendNotificationInternal to ensure that
// the GCNotificationRequest object is properly cleaned up, whatever path
// is used to exit the method.
public:
_request = r;
}
~NotificationMark() {
delete _request;
}
};
Handle objName = java_lang_String::create_from_platform_dependent_str(request->gcManager->name(), CHECK);
if (!gc_mbean_h->is_a(k)) {
"This GCMemoryManager doesn't have a GarbageCollectorMXBean");
}
&args,
CHECK);
}
}