diff options
author | 2017-03-13 13:10:00 -0700 | |
---|---|---|
committer | 2017-03-14 08:18:08 -0700 | |
commit | 5e03a305edafb49a34b436d9a858281e53d390f2 (patch) | |
tree | 97b34d7eb5ab9b1408325c7d8f9085c9f6f6cf67 | |
parent | fbe1516b91f2117bb9c7282aaea5537572f62dd7 (diff) |
ART: Refactor libopenjdkjvmti
Move jvmti.h to its own folder and fix up include setup.
Bug: 31455788
Test: m
Change-Id: I5beb66fc5d0178746216f61f9214cda54fc2c7ac
35 files changed, 39 insertions, 34 deletions
diff --git a/build/Android.cpplint.mk b/build/Android.cpplint.mk index d09f2902db..f924a855b7 100644 --- a/build/Android.cpplint.mk +++ b/build/Android.cpplint.mk @@ -21,7 +21,7 @@ ART_CPPLINT_FILTER := --filter=-whitespace/line_length,-build/include,-readabili ART_CPPLINT_FLAGS := --quiet --root=$(ANDROID_BUILD_TOP) ART_CPPLINT_INGORED := \ runtime/elf.h \ - runtime/openjdkjvmti/jvmti.h + runtime/openjdkjvmti/include/jvmti.h # This: # 1) Gets a list of all .h & .cc files in the art directory. diff --git a/runtime/openjdkjvmti/Android.bp b/runtime/openjdkjvmti/Android.bp index c01e3f4152..dd49ad0cfb 100644 --- a/runtime/openjdkjvmti/Android.bp +++ b/runtime/openjdkjvmti/Android.bp @@ -13,6 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +cc_library_headers { + name: "libopenjdkjvmti_headers", + host_supported: true, + export_include_dirs: ["include"], +} + cc_defaults { name: "libopenjdkjvmti_defaults", defaults: ["art_defaults"], @@ -40,6 +46,7 @@ cc_defaults { "ti_timers.cc", "transform.cc"], include_dirs: ["art/runtime"], + header_libs: ["libopenjdkjvmti_headers"], shared_libs: [ "libbase", "libnativehelper", diff --git a/runtime/openjdkjvmti/OpenjdkJvmTi.cc b/runtime/openjdkjvmti/OpenjdkJvmTi.cc index 5e0d4bdd07..5401e5cdf8 100644 --- a/runtime/openjdkjvmti/OpenjdkJvmTi.cc +++ b/runtime/openjdkjvmti/OpenjdkJvmTi.cc @@ -35,7 +35,7 @@ #include <jni.h> -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "art_jvmti.h" #include "base/logging.h" diff --git a/runtime/openjdkjvmti/jvmti.h b/runtime/openjdkjvmti/include/jvmti.h index de07c163fc..de07c163fc 100644 --- a/runtime/openjdkjvmti/jvmti.h +++ b/runtime/openjdkjvmti/include/jvmti.h diff --git a/test/901-hello-ti-agent/basics.cc b/test/901-hello-ti-agent/basics.cc index 0b17656303..91662770be 100644 --- a/test/901-hello-ti-agent/basics.cc +++ b/test/901-hello-ti-agent/basics.cc @@ -20,7 +20,7 @@ #include <stdio.h> #include <string.h> #include "base/macros.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ti-agent/common_helper.h" #include "ti-agent/common_load.h" diff --git a/test/903-hello-tagging/tagging.cc b/test/903-hello-tagging/tagging.cc index 6177263cd2..b85ed48930 100644 --- a/test/903-hello-tagging/tagging.cc +++ b/test/903-hello-tagging/tagging.cc @@ -25,7 +25,7 @@ #include "art_method-inl.h" #include "base/logging.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ti-agent/common_helper.h" #include "ti-agent/common_load.h" #include "utils.h" diff --git a/test/904-object-allocation/tracking.cc b/test/904-object-allocation/tracking.cc index 95eab0c6cc..cc6f681d79 100644 --- a/test/904-object-allocation/tracking.cc +++ b/test/904-object-allocation/tracking.cc @@ -21,7 +21,7 @@ #include "base/logging.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" #include "ScopedUtfChars.h" #include "ti-agent/common_helper.h" diff --git a/test/905-object-free/tracking_free.cc b/test/905-object-free/tracking_free.cc index 7b26d79edb..5eed4729af 100644 --- a/test/905-object-free/tracking_free.cc +++ b/test/905-object-free/tracking_free.cc @@ -21,7 +21,7 @@ #include "base/logging.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" #include "ScopedUtfChars.h" #include "ti-agent/common_helper.h" diff --git a/test/906-iterate-heap/iterate_heap.cc b/test/906-iterate-heap/iterate_heap.cc index 13c3562b60..f2532debfb 100644 --- a/test/906-iterate-heap/iterate_heap.cc +++ b/test/906-iterate-heap/iterate_heap.cc @@ -26,7 +26,7 @@ #include "android-base/stringprintf.h" #include "base/logging.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedPrimitiveArray.h" #include "ti-agent/common_helper.h" #include "ti-agent/common_load.h" diff --git a/test/907-get-loaded-classes/get_loaded_classes.cc b/test/907-get-loaded-classes/get_loaded_classes.cc index 5bda7ebac8..48ce2e2de1 100644 --- a/test/907-get-loaded-classes/get_loaded_classes.cc +++ b/test/907-get-loaded-classes/get_loaded_classes.cc @@ -21,7 +21,7 @@ #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" #include "ScopedUtfChars.h" diff --git a/test/908-gc-start-finish/gc_callbacks.cc b/test/908-gc-start-finish/gc_callbacks.cc index 8f96ee63ef..45148f87cd 100644 --- a/test/908-gc-start-finish/gc_callbacks.cc +++ b/test/908-gc-start-finish/gc_callbacks.cc @@ -19,7 +19,7 @@ #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ti-agent/common_helper.h" #include "ti-agent/common_load.h" diff --git a/test/909-attach-agent/attach.cc b/test/909-attach-agent/attach.cc index adae844ef0..67c756745f 100644 --- a/test/909-attach-agent/attach.cc +++ b/test/909-attach-agent/attach.cc @@ -20,7 +20,7 @@ #include <stdio.h> #include <string.h> #include "base/macros.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" namespace art { namespace Test909AttachAgent { diff --git a/test/910-methods/methods.cc b/test/910-methods/methods.cc index f60fabb1df..fdc4cdbe04 100644 --- a/test/910-methods/methods.cc +++ b/test/910-methods/methods.cc @@ -18,7 +18,7 @@ #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" #include "ti-agent/common_helper.h" diff --git a/test/911-get-stack-trace/stack_trace.cc b/test/911-get-stack-trace/stack_trace.cc index 68f6d8dfb2..5a3a311255 100644 --- a/test/911-get-stack-trace/stack_trace.cc +++ b/test/911-get-stack-trace/stack_trace.cc @@ -24,7 +24,7 @@ #include "base/logging.h" #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" #include "ti-agent/common_helper.h" #include "ti-agent/common_load.h" diff --git a/test/912-classes/classes.cc b/test/912-classes/classes.cc index 3ccfe86bed..5bd34f6be8 100644 --- a/test/912-classes/classes.cc +++ b/test/912-classes/classes.cc @@ -20,7 +20,7 @@ #include "class_linker.h" #include "jni.h" #include "mirror/class_loader.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "runtime.h" #include "ScopedLocalRef.h" #include "ScopedUtfChars.h" diff --git a/test/913-heaps/heaps.cc b/test/913-heaps/heaps.cc index 39fa000195..66fc7bef9a 100644 --- a/test/913-heaps/heaps.cc +++ b/test/913-heaps/heaps.cc @@ -28,7 +28,7 @@ #include "jit/jit.h" #include "jni.h" #include "native_stack_dump.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "runtime.h" #include "scoped_thread_state_change-inl.h" #include "thread-inl.h" diff --git a/test/918-fields/fields.cc b/test/918-fields/fields.cc index 7d29912f47..c659126aae 100644 --- a/test/918-fields/fields.cc +++ b/test/918-fields/fields.cc @@ -18,7 +18,7 @@ #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" #include "ti-agent/common_helper.h" diff --git a/test/920-objects/objects.cc b/test/920-objects/objects.cc index 0553a9d007..ad1431ed00 100644 --- a/test/920-objects/objects.cc +++ b/test/920-objects/objects.cc @@ -18,7 +18,7 @@ #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" #include "ti-agent/common_helper.h" diff --git a/test/922-properties/properties.cc b/test/922-properties/properties.cc index cb732c74f1..3fd274e9d6 100644 --- a/test/922-properties/properties.cc +++ b/test/922-properties/properties.cc @@ -18,7 +18,7 @@ #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedUtfChars.h" #include "ti-agent/common_helper.h" diff --git a/test/923-monitors/monitors.cc b/test/923-monitors/monitors.cc index 4baa530ec2..131fc6a4d4 100644 --- a/test/923-monitors/monitors.cc +++ b/test/923-monitors/monitors.cc @@ -18,7 +18,7 @@ #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedUtfChars.h" #include "ti-agent/common_helper.h" diff --git a/test/924-threads/threads.cc b/test/924-threads/threads.cc index 0380433d19..14ea5af60e 100644 --- a/test/924-threads/threads.cc +++ b/test/924-threads/threads.cc @@ -20,7 +20,7 @@ #include "base/macros.h" #include "base/logging.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" #include "ti-agent/common_helper.h" diff --git a/test/925-threadgroups/threadgroups.cc b/test/925-threadgroups/threadgroups.cc index 6c6e835dd3..2feaab079b 100644 --- a/test/925-threadgroups/threadgroups.cc +++ b/test/925-threadgroups/threadgroups.cc @@ -20,7 +20,7 @@ #include "base/macros.h" #include "base/logging.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" #include "ti-agent/common_helper.h" diff --git a/test/927-timers/timers.cc b/test/927-timers/timers.cc index 58d5c271e6..7b1d5c3f52 100644 --- a/test/927-timers/timers.cc +++ b/test/927-timers/timers.cc @@ -20,7 +20,7 @@ #include "base/logging.h" #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ti-agent/common_helper.h" #include "ti-agent/common_load.h" diff --git a/test/928-jni-table/jni_table.cc b/test/928-jni-table/jni_table.cc index 5123d3a43f..b5c0efdd95 100644 --- a/test/928-jni-table/jni_table.cc +++ b/test/928-jni-table/jni_table.cc @@ -17,7 +17,7 @@ #include <stdio.h> #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "base/logging.h" #include "base/macros.h" diff --git a/test/929-search/search.cc b/test/929-search/search.cc index d1c698491e..ad7a05323b 100644 --- a/test/929-search/search.cc +++ b/test/929-search/search.cc @@ -20,7 +20,7 @@ #include "base/logging.h" #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedUtfChars.h" #include "ti-agent/common_helper.h" diff --git a/test/931-agent-thread/agent_thread.cc b/test/931-agent-thread/agent_thread.cc index a488d9a803..f8f9e48657 100644 --- a/test/931-agent-thread/agent_thread.cc +++ b/test/931-agent-thread/agent_thread.cc @@ -21,7 +21,7 @@ #include "base/logging.h" #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "runtime.h" #include "ScopedLocalRef.h" #include "thread-inl.h" diff --git a/test/933-misc-events/misc_events.cc b/test/933-misc-events/misc_events.cc index 860d4b5e16..7043350b5a 100644 --- a/test/933-misc-events/misc_events.cc +++ b/test/933-misc-events/misc_events.cc @@ -21,7 +21,7 @@ #include "base/logging.h" #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ti-agent/common_helper.h" #include "ti-agent/common_load.h" diff --git a/test/936-search-onload/search_onload.cc b/test/936-search-onload/search_onload.cc index 2286a467d3..3b19ca591d 100644 --- a/test/936-search-onload/search_onload.cc +++ b/test/936-search-onload/search_onload.cc @@ -22,7 +22,7 @@ #include "base/logging.h" #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedUtfChars.h" #include "ti-agent/common_helper.h" diff --git a/test/944-transform-classloaders/classloader.cc b/test/944-transform-classloaders/classloader.cc index 5fbd8e11c9..7cb3c08dc3 100644 --- a/test/944-transform-classloaders/classloader.cc +++ b/test/944-transform-classloaders/classloader.cc @@ -16,8 +16,8 @@ #include "base/macros.h" #include "jni.h" +#include "jvmti.h" #include "mirror/class-inl.h" -#include "openjdkjvmti/jvmti.h" #include "ScopedLocalRef.h" #include "ti-agent/common_helper.h" diff --git a/test/945-obsolete-native/obsolete_native.cc b/test/945-obsolete-native/obsolete_native.cc index 061e7afbbc..442836b7ff 100644 --- a/test/945-obsolete-native/obsolete_native.cc +++ b/test/945-obsolete-native/obsolete_native.cc @@ -24,7 +24,7 @@ #include "base/logging.h" #include "base/macros.h" #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" #include "ti-agent/common_helper.h" #include "ti-agent/common_load.h" diff --git a/test/Android.bp b/test/Android.bp index 00c890a834..594cce2a6e 100644 --- a/test/Android.bp +++ b/test/Android.bp @@ -279,6 +279,7 @@ art_cc_defaults { shared_libs: [ "libbase", ], + header_libs: ["libopenjdkjvmti_headers"], } art_cc_test_library { diff --git a/test/ti-agent/common_helper.cc b/test/ti-agent/common_helper.cc index ea6359e5e0..4ddd0aafb0 100644 --- a/test/ti-agent/common_helper.cc +++ b/test/ti-agent/common_helper.cc @@ -25,7 +25,7 @@ #include "art_method.h" #include "jni.h" #include "jni_internal.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "scoped_thread_state_change-inl.h" #include "ScopedLocalRef.h" #include "stack.h" diff --git a/test/ti-agent/common_helper.h b/test/ti-agent/common_helper.h index 031850147e..0a316edc7b 100644 --- a/test/ti-agent/common_helper.h +++ b/test/ti-agent/common_helper.h @@ -18,7 +18,7 @@ #define ART_TEST_TI_AGENT_COMMON_HELPER_H_ #include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" #include "ScopedLocalRef.h" namespace art { diff --git a/test/ti-agent/common_load.cc b/test/ti-agent/common_load.cc index 351857d1d9..fddae3af02 100644 --- a/test/ti-agent/common_load.cc +++ b/test/ti-agent/common_load.cc @@ -18,8 +18,6 @@ #include <jni.h> #include <stdio.h> -// TODO I don't know? -#include "openjdkjvmti/jvmti.h" #include "art_method-inl.h" #include "base/logging.h" diff --git a/test/ti-agent/common_load.h b/test/ti-agent/common_load.h index d2544214ec..e79a0067b0 100644 --- a/test/ti-agent/common_load.h +++ b/test/ti-agent/common_load.h @@ -17,8 +17,7 @@ #ifndef ART_TEST_TI_AGENT_COMMON_LOAD_H_ #define ART_TEST_TI_AGENT_COMMON_LOAD_H_ -#include "jni.h" -#include "openjdkjvmti/jvmti.h" +#include "jvmti.h" namespace art { |