< prev index next >
src/hotspot/share/prims/jvmtiEnv.cpp
Print this page
rev 47590 : [mq]: heap8
rev 47591 : [mq]: heap10a
*** 44,62 ****
--- 44,64 ----
#include "prims/jvmtiAgentThread.hpp"
#include "prims/jvmtiClassFileReconstituter.hpp"
#include "prims/jvmtiCodeBlobEvents.hpp"
#include "prims/jvmtiExtensions.hpp"
#include "prims/jvmtiGetLoadedClasses.hpp"
+ #include "prims/jvmtiHeapTransition.hpp"
#include "prims/jvmtiImpl.hpp"
#include "prims/jvmtiManageCapabilities.hpp"
#include "prims/jvmtiRawMonitor.hpp"
#include "prims/jvmtiRedefineClasses.hpp"
#include "prims/jvmtiTagMap.hpp"
#include "prims/jvmtiThreadState.inline.hpp"
#include "prims/jvmtiUtil.hpp"
#include "runtime/arguments.hpp"
#include "runtime/deoptimization.hpp"
+ #include "runtime/heapMonitoring.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/jfieldIDWorkaround.hpp"
#include "runtime/osThread.hpp"
#include "runtime/reflectionUtils.hpp"
*** 1945,1954 ****
--- 1947,2031 ----
TraceTime t("IterateOverInstancesOfClass", TRACETIME_LOG(Debug, jvmti, objecttagging));
JvmtiTagMap::tag_map_for(this)->iterate_over_heap(object_filter, klass, heap_object_callback, user_data);
return JVMTI_ERROR_NONE;
} /* end IterateOverInstancesOfClass */
+ // Start the sampler.
+ jvmtiError
+ JvmtiEnv::StartHeapSampling(jint monitoring_rate, jint max_gc_storage) {
+ if (monitoring_rate < 0) {
+ return JVMTI_ERROR_ILLEGAL_ARGUMENT;
+ }
+
+ HeapThreadTransition htt(Thread::current());
+ HeapMonitoring::initialize_profiling(monitoring_rate, max_gc_storage);
+ return JVMTI_ERROR_NONE;
+ } /* end StartHeapSampling */
+
+ // Stop the sampler.
+ jvmtiError
+ JvmtiEnv::StopHeapSampling() {
+ HeapThreadTransition htt(Thread::current());
+ HeapMonitoring::stop_profiling();
+ return JVMTI_ERROR_NONE;
+ } /* end StopHeapSampling */
+
+ // Get the currently live sampled allocations.
+ jvmtiError
+ JvmtiEnv::GetLiveTraces(jvmtiStackTraces* stack_traces) {
+ HeapThreadTransition htt(Thread::current());
+ if (stack_traces == NULL) {
+ return JVMTI_ERROR_ILLEGAL_ARGUMENT;
+ }
+
+ HeapMonitoring::get_live_traces(stack_traces);
+ return JVMTI_ERROR_NONE;
+ } /* end GetLiveTraces */
+
+ // Get the currently live sampled allocations.
+ jvmtiError
+ JvmtiEnv::GetGarbageTraces(jvmtiStackTraces* stack_traces) {
+ HeapThreadTransition htt(Thread::current());
+ if (stack_traces == NULL) {
+ return JVMTI_ERROR_ILLEGAL_ARGUMENT;
+ }
+
+ HeapMonitoring::get_garbage_traces(stack_traces);
+ return JVMTI_ERROR_NONE;
+ } /* end GetGarbageTraces */
+
+ // Get the currently live sampled allocations.
+ jvmtiError
+ JvmtiEnv::GetFrequentGarbageTraces(jvmtiStackTraces* stack_traces) {
+ HeapThreadTransition htt(Thread::current());
+ if (stack_traces == NULL) {
+ return JVMTI_ERROR_ILLEGAL_ARGUMENT;
+ }
+
+ HeapMonitoring::get_frequent_garbage_traces(stack_traces);
+ return JVMTI_ERROR_NONE;
+ } /* end GetFrequentGarbageTraces */
+
+ // Release sampled traces.
+ jvmtiError
+ JvmtiEnv::ReleaseTraces(jvmtiStackTraces* stack_traces) {
+ if (stack_traces == NULL) {
+ return JVMTI_ERROR_NONE;
+ }
+ HeapMonitoring::release_traces(stack_traces);
+ return JVMTI_ERROR_NONE;
+ } /* end ReleaseTraces */
+
+ // Get the heap sampling statistics.
+ jvmtiError
+ JvmtiEnv::GetHeapSamplingStats(jvmtiHeapSamplingStats* stats) {
+ if (stats == NULL) {
+ return JVMTI_ERROR_ILLEGAL_ARGUMENT;
+ }
+ HeapMonitoring::get_sampling_statistics(stats);
+ return JVMTI_ERROR_NONE;
+ } /* end GetHeapSamplingStats */
//
// Local Variable functions
//
< prev index next >