Freeze capabilities JVMTI tests request by default.
Some capabilities might change the characteristics of the runtime when
they are gained (for example disabling the jit). We want to test in
all configurations when possible so freeze the default jvmti
capabilities given to jvmti tests to those that are known not to make
major runtime changes.
Test: ./test.py --host -j40
Change-Id: I90a8ad31f203590153ef53bc4950b2f3952b4970
diff --git a/test/ti-stress/stress.cc b/test/ti-stress/stress.cc
index d197acd..aa50648 100644
--- a/test/ti-stress/stress.cc
+++ b/test/ti-stress/stress.cc
@@ -780,8 +780,49 @@
}
// Just get all capabilities.
- jvmtiCapabilities caps;
- jvmti->GetPotentialCapabilities(&caps);
+ jvmtiCapabilities caps = {
+ .can_tag_objects = 0,
+ .can_generate_field_modification_events = 1,
+ .can_generate_field_access_events = 1,
+ .can_get_bytecodes = 0,
+ .can_get_synthetic_attribute = 0,
+ .can_get_owned_monitor_info = 0,
+ .can_get_current_contended_monitor = 0,
+ .can_get_monitor_info = 0,
+ .can_pop_frame = 0,
+ .can_redefine_classes = 1,
+ .can_signal_thread = 0,
+ .can_get_source_file_name = 1,
+ .can_get_line_numbers = 1,
+ .can_get_source_debug_extension = 0,
+ .can_access_local_variables = 0,
+ .can_maintain_original_method_order = 0,
+ .can_generate_single_step_events = 1,
+ .can_generate_exception_events = 0,
+ .can_generate_frame_pop_events = 0,
+ .can_generate_breakpoint_events = 0,
+ .can_suspend = 0,
+ .can_redefine_any_class = 0,
+ .can_get_current_thread_cpu_time = 0,
+ .can_get_thread_cpu_time = 0,
+ .can_generate_method_entry_events = 1,
+ .can_generate_method_exit_events = 1,
+ .can_generate_all_class_hook_events = 0,
+ .can_generate_compiled_method_load_events = 0,
+ .can_generate_monitor_events = 0,
+ .can_generate_vm_object_alloc_events = 0,
+ .can_generate_native_method_bind_events = 1,
+ .can_generate_garbage_collection_events = 0,
+ .can_generate_object_free_events = 0,
+ .can_force_early_return = 0,
+ .can_get_owned_monitor_stack_depth_info = 0,
+ .can_get_constant_pool = 0,
+ .can_set_native_method_prefix = 0,
+ .can_retransform_classes = 1,
+ .can_retransform_any_class = 0,
+ .can_generate_resource_exhaustion_heap_events = 0,
+ .can_generate_resource_exhaustion_threads_events = 0,
+ };
jvmti->AddCapabilities(&caps);
// Set callbacks.