summaryrefslogtreecommitdiff
path: root/test/2263-method-trace-jit
diff options
context:
space:
mode:
Diffstat (limited to 'test/2263-method-trace-jit')
-rw-r--r--test/2263-method-trace-jit/Android.bp40
l---------test/2263-method-trace-jit/expected-stderr.txt1
l---------test/2263-method-trace-jit/expected-stdout.txt1
-rw-r--r--test/2263-method-trace-jit/info.txt15
-rw-r--r--test/2263-method-trace-jit/run.py19
-rw-r--r--test/2263-method-trace-jit/src/Main.java26
l---------test/2263-method-trace-jit/src/art/Test988.java1
l---------test/2263-method-trace-jit/src/art/Test988Intrinsics.java1
l---------test/2263-method-trace-jit/src/art/Trace.java1
l---------test/2263-method-trace-jit/trace_fib.cc1
10 files changed, 106 insertions, 0 deletions
diff --git a/test/2263-method-trace-jit/Android.bp b/test/2263-method-trace-jit/Android.bp
new file mode 100644
index 0000000000..798d6dae02
--- /dev/null
+++ b/test/2263-method-trace-jit/Android.bp
@@ -0,0 +1,40 @@
+// Generated by `regen-test-files`. Do not edit manually.
+
+// Build rules for ART run-test `2263-method-trace-jit`.
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "art_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["art_license"],
+}
+
+// Test's Dex code.
+java_test {
+ name: "art-run-test-2263-method-trace-jit",
+ defaults: ["art-run-test-defaults"],
+ test_config_template: ":art-run-test-target-no-test-suite-tag-template",
+ srcs: ["src/**/*.java"],
+ data: [
+ ":art-run-test-2263-method-trace-jit-expected-stdout",
+ ":art-run-test-2263-method-trace-jit-expected-stderr",
+ ],
+}
+
+// Test's expected standard output.
+genrule {
+ name: "art-run-test-2263-method-trace-jit-expected-stdout",
+ out: ["art-run-test-2263-method-trace-jit-expected-stdout.txt"],
+ srcs: ["expected-stdout.txt"],
+ cmd: "cp -f $(in) $(out)",
+}
+
+// Test's expected standard error.
+genrule {
+ name: "art-run-test-2263-method-trace-jit-expected-stderr",
+ out: ["art-run-test-2263-method-trace-jit-expected-stderr.txt"],
+ srcs: ["expected-stderr.txt"],
+ cmd: "cp -f $(in) $(out)",
+}
diff --git a/test/2263-method-trace-jit/expected-stderr.txt b/test/2263-method-trace-jit/expected-stderr.txt
new file mode 120000
index 0000000000..0abcd1b926
--- /dev/null
+++ b/test/2263-method-trace-jit/expected-stderr.txt
@@ -0,0 +1 @@
+../988-method-trace/expected-stderr.txt \ No newline at end of file
diff --git a/test/2263-method-trace-jit/expected-stdout.txt b/test/2263-method-trace-jit/expected-stdout.txt
new file mode 120000
index 0000000000..e5311a05d1
--- /dev/null
+++ b/test/2263-method-trace-jit/expected-stdout.txt
@@ -0,0 +1 @@
+../988-method-trace/expected-stdout.txt \ No newline at end of file
diff --git a/test/2263-method-trace-jit/info.txt b/test/2263-method-trace-jit/info.txt
new file mode 100644
index 0000000000..f0a200dc18
--- /dev/null
+++ b/test/2263-method-trace-jit/info.txt
@@ -0,0 +1,15 @@
+Tests method tracing in JVMTI
+
+This test is sensitive to the internal implementations of:
+ * java.lang.Error
+ * java.lang.Integer
+ * java.lang.Math
+ * java.lang.String
+ * java.lang.System
+ * java.util.ArrayList
+ * java.util.Arrays
+ * java.util.StringBuilder
+ * all super-classes and super-interfaces of the above types.
+
+Changes to the internal implementation of these classes might (or might not)
+change the output of this test.
diff --git a/test/2263-method-trace-jit/run.py b/test/2263-method-trace-jit/run.py
new file mode 100644
index 0000000000..c02159d344
--- /dev/null
+++ b/test/2263-method-trace-jit/run.py
@@ -0,0 +1,19 @@
+#
+# Copyright 2023 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+def run(ctx, args):
+ # Ask for stack traces to be dumped to a file rather than to stdout.
+ ctx.default_run(args, jvmti=True)
diff --git a/test/2263-method-trace-jit/src/Main.java b/test/2263-method-trace-jit/src/Main.java
new file mode 100644
index 0000000000..470f8961b1
--- /dev/null
+++ b/test/2263-method-trace-jit/src/Main.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class Main {
+ public static void main(String[] args) throws Exception {
+ // Test calls to intrinsics from JITed code.
+ ensureJitCompiled(art.Test988Intrinsics.class, "test");
+ ensureJitCompiled(art.Test988.class, "doFibTest");
+ art.Test988.run();
+ }
+
+ public static native void ensureJitCompiled(Class<?> cls, String methodName);
+}
diff --git a/test/2263-method-trace-jit/src/art/Test988.java b/test/2263-method-trace-jit/src/art/Test988.java
new file mode 120000
index 0000000000..24dcdeb16f
--- /dev/null
+++ b/test/2263-method-trace-jit/src/art/Test988.java
@@ -0,0 +1 @@
+../../../988-method-trace/src/art/Test988.java \ No newline at end of file
diff --git a/test/2263-method-trace-jit/src/art/Test988Intrinsics.java b/test/2263-method-trace-jit/src/art/Test988Intrinsics.java
new file mode 120000
index 0000000000..7fb019c17b
--- /dev/null
+++ b/test/2263-method-trace-jit/src/art/Test988Intrinsics.java
@@ -0,0 +1 @@
+../../../988-method-trace/src/art/Test988Intrinsics.java \ No newline at end of file
diff --git a/test/2263-method-trace-jit/src/art/Trace.java b/test/2263-method-trace-jit/src/art/Trace.java
new file mode 120000
index 0000000000..5d9b44b463
--- /dev/null
+++ b/test/2263-method-trace-jit/src/art/Trace.java
@@ -0,0 +1 @@
+../../../jvmti-common/Trace.java \ No newline at end of file
diff --git a/test/2263-method-trace-jit/trace_fib.cc b/test/2263-method-trace-jit/trace_fib.cc
new file mode 120000
index 0000000000..d6167d4894
--- /dev/null
+++ b/test/2263-method-trace-jit/trace_fib.cc
@@ -0,0 +1 @@
+../988-method-trace/trace_fib.cc \ No newline at end of file