< prev index next >
src/hotspot/share/opto/runtime.cpp
Print this page
rev 48565 : [mq]: event
@@ -215,10 +215,11 @@
JRT_BLOCK_ENTRY(void, OptoRuntime::new_instance_C(Klass* klass, JavaThread* thread))
JRT_BLOCK;
#ifndef PRODUCT
SharedRuntime::_new_instance_ctr++; // new instance requires GC
#endif
+ JvmtiSampledObjectAllocEventCollector sampled_collector;
assert(check_compiled_frame(thread), "incorrect caller");
// These checks are cheap to make and support reflective allocation.
int lh = klass->layout_helper();
if (Klass::layout_helper_needs_slow_path(lh) || !InstanceKlass::cast(klass)->is_initialized()) {
@@ -256,10 +257,11 @@
JRT_BLOCK;
#ifndef PRODUCT
SharedRuntime::_new_array_ctr++; // new array requires GC
#endif
assert(check_compiled_frame(thread), "incorrect caller");
+ JvmtiSampledObjectAllocEventCollector sampled_collector;
// Scavenge and allocate an instance.
oop result;
if (array_type->is_typeArray_klass()) {
@@ -295,10 +297,11 @@
JRT_BLOCK;
#ifndef PRODUCT
SharedRuntime::_new_array_ctr++; // new array requires GC
#endif
assert(check_compiled_frame(thread), "incorrect caller");
+ JvmtiSampledObjectAllocEventCollector sampled_collector;
// Scavenge and allocate an instance.
oop result;
assert(array_type->is_typeArray_klass(), "should be called only for type array");
@@ -343,10 +346,11 @@
// multianewarray for 2 dimensions
JRT_ENTRY(void, OptoRuntime::multianewarray2_C(Klass* elem_type, int len1, int len2, JavaThread *thread))
#ifndef PRODUCT
SharedRuntime::_multi2_ctr++; // multianewarray for 1 dimension
#endif
+ JvmtiSampledObjectAllocEventCollector sampled_collector;
assert(check_compiled_frame(thread), "incorrect caller");
assert(elem_type->is_klass(), "not a class");
jint dims[2];
dims[0] = len1;
dims[1] = len2;
@@ -359,10 +363,11 @@
// multianewarray for 3 dimensions
JRT_ENTRY(void, OptoRuntime::multianewarray3_C(Klass* elem_type, int len1, int len2, int len3, JavaThread *thread))
#ifndef PRODUCT
SharedRuntime::_multi3_ctr++; // multianewarray for 1 dimension
#endif
+ JvmtiSampledObjectAllocEventCollector sampled_collector;
assert(check_compiled_frame(thread), "incorrect caller");
assert(elem_type->is_klass(), "not a class");
jint dims[3];
dims[0] = len1;
dims[1] = len2;
@@ -376,10 +381,11 @@
// multianewarray for 4 dimensions
JRT_ENTRY(void, OptoRuntime::multianewarray4_C(Klass* elem_type, int len1, int len2, int len3, int len4, JavaThread *thread))
#ifndef PRODUCT
SharedRuntime::_multi4_ctr++; // multianewarray for 1 dimension
#endif
+ JvmtiSampledObjectAllocEventCollector sampled_collector;
assert(check_compiled_frame(thread), "incorrect caller");
assert(elem_type->is_klass(), "not a class");
jint dims[4];
dims[0] = len1;
dims[1] = len2;
@@ -394,10 +400,11 @@
// multianewarray for 5 dimensions
JRT_ENTRY(void, OptoRuntime::multianewarray5_C(Klass* elem_type, int len1, int len2, int len3, int len4, int len5, JavaThread *thread))
#ifndef PRODUCT
SharedRuntime::_multi5_ctr++; // multianewarray for 1 dimension
#endif
+ JvmtiSampledObjectAllocEventCollector sampled_collector;
assert(check_compiled_frame(thread), "incorrect caller");
assert(elem_type->is_klass(), "not a class");
jint dims[5];
dims[0] = len1;
dims[1] = len2;
@@ -412,10 +419,11 @@
JRT_ENTRY(void, OptoRuntime::multianewarrayN_C(Klass* elem_type, arrayOopDesc* dims, JavaThread *thread))
assert(check_compiled_frame(thread), "incorrect caller");
assert(elem_type->is_klass(), "not a class");
assert(oop(dims)->is_typeArray(), "not an array");
+ JvmtiSampledObjectAllocEventCollector sampled_collector;
ResourceMark rm;
jint len = dims->length();
assert(len > 0, "Dimensions array should contain data");
jint *j_dims = typeArrayOop(dims)->int_at_addr(0);
< prev index next >