< prev index next >

src/hotspot/share/prims/jvmtiEnv.cpp

Print this page
rev 49264 : [mq]: event-only
rev 49267 : [mq]: event5
rev 49268 : [mq]: event6
rev 49269 : [mq]: event7

@@ -3638,10 +3638,13 @@
   return JVMTI_ERROR_NONE;
 } /* end GetAvailableProcessors */
 
 jvmtiError
 JvmtiEnv::SetHeapSamplingRate(jint sampling_rate) {
+  if (sampling_rate < 0) {
+    return JVMTI_ERROR_ILLEGAL_ARGUMENT;
+  }
   ThreadHeapSampler::set_tlab_heap_sampling(sampling_rate);
   return JVMTI_ERROR_NONE;
 } /* end SetHeapSamplingRate */
 
   //
< prev index next >