Skip to content

Commit 6501473

Browse files
authored
Merge pull request #691 from bytedance/fix-stopwatch
fix StopWatch cannot found
2 parents 2e00985 + 05e4f51 commit 6501473

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

rasp/jvm/JVMAgent/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jar {
3333
}
3434

3535
shadowJar {
36-
relocate 'io.netty', 'agent.io.netty'
37-
relocate 'org.apache.commons', 'agent.org.apache.commons'
36+
relocate 'io.netty', 'rasp.io.netty'
37+
relocate 'org.apache.commons', 'rasp.org.apache.commons'
3838
relocate 'META-INF/native/libnetty', 'META-INF/native/librasp_netty'
3939
}
4040

rasp/jvm/JVMAgent/src/main/java/com/security/smithloader/SmithAgent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public static Object ExceptionProxy(Object MethodNameObj,int classID, int method
101101
return obj;
102102
}
103103

104-
public static void RecordProxy(int classID, int methodID, Long t1, Long t2) {
104+
public static void RecordProxy(int classID, int methodID, long t1, long t2) {
105105
if (isBenchMark) {
106106
try {
107107
if (checkRecursive != null && checkRecursive.get() == true) {
@@ -111,7 +111,7 @@ public static void RecordProxy(int classID, int methodID, Long t1, Long t2) {
111111
checkRecursive.set(true);
112112
}
113113
if(SmithProberObj != null) {
114-
Class<?>[] argType = new Class[]{int.class,int.class, Long.class, Long.class};
114+
Class<?>[] argType = new Class[]{int.class,int.class, long.class, long.class};
115115
Reflection.invokeMethod(SmithProberObj,"record",argType,classID,methodID,t1,t2);
116116
}
117117
if (checkRecursive != null && checkRecursive.get() == true) {

rasp/jvm/JVMProbe/src/main/java/com/security/smith/SmithProbe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ public void show() {
682682
}
683683

684684
public void record(int classID, int methodID, long time,long totaltime) {
685-
SmithLogger.logger.info("record: " + classID + " " + methodID + " " + time);
685+
// SmithLogger.logger.info("record: " + classID + " " + methodID + " " + time);
686686
synchronized (records) {
687687
records.computeIfAbsent(new ImmutablePair<>(classID, methodID), k -> new ArrayList<>()).add(time);
688688
}

0 commit comments

Comments
 (0)