Skip to content

Commit 73ed478

Browse files
committed
Merge pull Tencent#844
1 parent 772d9e3 commit 73ed478

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

matrix/matrix-android/matrix-gradle-plugin/src/main/kotlin/com/tencent/matrix/plugin/compat/AgpCompat.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class AgpCompat {
4040
@JvmStatic
4141
val asmApi: Int
4242
get() = when {
43+
VersionsCompat.greatThanOrEqual(AGPVersion.AGP_7_3_1) -> Opcodes.ASM7
4344
VersionsCompat.greatThanOrEqual(AGPVersion.AGP_7_0_0) -> Opcodes.ASM6
4445
else -> Opcodes.ASM5
4546
}

matrix/matrix-android/matrix-gradle-plugin/src/main/kotlin/com/tencent/matrix/plugin/compat/VersionsCompat.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ enum class AGPVersion(
2424
AGP_3_6_0("3.6.0"),
2525
AGP_4_0_0("4.0.0"),
2626
AGP_4_1_0("4.1.0"),
27-
AGP_7_0_0("7.0.0")
27+
AGP_7_0_0("7.0.0"),
28+
AGP_7_3_1("7.3.1")
2829
}
2930

3031
class VersionsCompat {

matrix/matrix-android/matrix-trace-canary/src/main/java/com/tencent/matrix/trace/tracer/EvilMethodTracer.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,18 @@ public boolean isValid() {
8181
@Override
8282
public void onDispatchBegin(String log) {
8383
indexRecord = AppMethodBeat.getInstance().maskIndex("EvilMethodTracer#dispatchBegin");
84+
85+
if (config.isAppMethodBeatEnable()) {
86+
AppMethodBeat.i(AppMethodBeat.METHOD_ID_DISPATCH);
87+
}
8488
}
8589

8690
@Override
8791
public void onDispatchEnd(String log, long beginNs, long endNs) {
92+
if (config.isAppMethodBeatEnable()) {
93+
AppMethodBeat.o(AppMethodBeat.METHOD_ID_DISPATCH);
94+
}
95+
8896
long dispatchCost = (endNs - beginNs) / Constants.TIME_MILLIS_TO_NANO;
8997
try {
9098
if (dispatchCost >= evilThresholdMs) {

0 commit comments

Comments
 (0)