< prev index next >

src/hotspot/share/jfr/dcmd/jfrDcmds.cpp

Print this page




 421     delay = JfrJavaSupport::new_java_lang_Long(_delay.value()._nanotime, CHECK);
 422   }
 423 
 424   jobject disk = NULL;
 425   if (_disk.is_set()) {
 426     disk = JfrJavaSupport::new_java_lang_Boolean(_disk.value(), CHECK);
 427   }
 428 
 429   jobject dump_on_exit = NULL;
 430   if (_dump_on_exit.is_set()) {
 431     dump_on_exit = JfrJavaSupport::new_java_lang_Boolean(_dump_on_exit.value(), CHECK);
 432   }
 433 
 434   jobject path_to_gc_roots = NULL;
 435   if (_path_to_gc_roots.is_set()) {
 436     path_to_gc_roots = JfrJavaSupport::new_java_lang_Boolean(_path_to_gc_roots.value(), CHECK);
 437   }
 438 
 439   jobjectArray settings = NULL;
 440   if (_settings.is_set()) {
 441     int length = _settings.value()->array()->length();
 442     if (length == 1) {
 443       const char* c_str = _settings.value()->array()->at(0);
 444       if (strcmp(c_str, "none") == 0) {
 445         length = 0;
 446       }
 447     }
 448     settings = JfrJavaSupport::new_string_array(length, CHECK);
 449     assert(settings != NULL, "invariant");
 450     for (int i = 0; i < length; ++i) {
 451       jobject element = JfrJavaSupport::new_string(_settings.value()->array()->at(i), CHECK);
 452       assert(element != NULL, "invariant");
 453       JfrJavaSupport::set_array_element(settings, element, i, CHECK);
 454     }
 455   } else {
 456     settings = JfrJavaSupport::new_string_array(1, CHECK);
 457     assert(settings != NULL, "invariant");
 458     jobject element = JfrJavaSupport::new_string("default", CHECK);
 459     assert(element != NULL, "invariant");
 460     JfrJavaSupport::set_array_element(settings, element, 0, CHECK);
 461   }
 462 
 463   static const char klass[] = "jdk/jfr/internal/dcmd/DCmdStart";
 464   static const char method[] = "execute";
 465   static const char signature[] = "(Ljava/lang/String;[Ljava/lang/String;Ljava/lang/Long;"
 466     "Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;"
 467     "Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;)Ljava/lang/String;";




 421     delay = JfrJavaSupport::new_java_lang_Long(_delay.value()._nanotime, CHECK);
 422   }
 423 
 424   jobject disk = NULL;
 425   if (_disk.is_set()) {
 426     disk = JfrJavaSupport::new_java_lang_Boolean(_disk.value(), CHECK);
 427   }
 428 
 429   jobject dump_on_exit = NULL;
 430   if (_dump_on_exit.is_set()) {
 431     dump_on_exit = JfrJavaSupport::new_java_lang_Boolean(_dump_on_exit.value(), CHECK);
 432   }
 433 
 434   jobject path_to_gc_roots = NULL;
 435   if (_path_to_gc_roots.is_set()) {
 436     path_to_gc_roots = JfrJavaSupport::new_java_lang_Boolean(_path_to_gc_roots.value(), CHECK);
 437   }
 438 
 439   jobjectArray settings = NULL;
 440   if (_settings.is_set()) {
 441     const int length = _settings.value()->array()->length();






 442     settings = JfrJavaSupport::new_string_array(length, CHECK);
 443     assert(settings != NULL, "invariant");
 444     for (int i = 0; i < length; ++i) {
 445       jobject element = JfrJavaSupport::new_string(_settings.value()->array()->at(i), CHECK);
 446       assert(element != NULL, "invariant");
 447       JfrJavaSupport::set_array_element(settings, element, i, CHECK);
 448     }
 449   } else {
 450     settings = JfrJavaSupport::new_string_array(1, CHECK);
 451     assert(settings != NULL, "invariant");
 452     jobject element = JfrJavaSupport::new_string("default", CHECK);
 453     assert(element != NULL, "invariant");
 454     JfrJavaSupport::set_array_element(settings, element, 0, CHECK);
 455   }
 456 
 457   static const char klass[] = "jdk/jfr/internal/dcmd/DCmdStart";
 458   static const char method[] = "execute";
 459   static const char signature[] = "(Ljava/lang/String;[Ljava/lang/String;Ljava/lang/Long;"
 460     "Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;"
 461     "Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Boolean;)Ljava/lang/String;";


< prev index next >