aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me/lucko/spark/common/sampler
diff options
context:
space:
mode:
authorishland <ishlandmc@yeah.net>2022-09-19 21:48:28 +0800
committerGitHub <noreply@github.com>2022-09-19 14:48:28 +0100
commit7ef9b6281135ce0a24f3c14c2255d9a2c2eca969 (patch)
tree59196f2253eb9ab3448339a64d68a426b48ce25f /spark-common/src/main/java/me/lucko/spark/common/sampler
parent618230b958d7822985e2702cd9528f1b4567e59c (diff)
downloadspark-7ef9b6281135ce0a24f3c14c2255d9a2c2eca969.tar.gz
spark-7ef9b6281135ce0a24f3c14c2255d9a2c2eca969.tar.bz2
spark-7ef9b6281135ce0a24f3c14c2255d9a2c2eca969.zip
Display source info for mixin injected methods (#249)
Co-authored-by: Luck <git@lucko.me>
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/sampler')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java
index 1c217db..3cfef0b 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java
@@ -164,8 +164,16 @@ public abstract class AbstractSampler implements Sampler {
classSourceVisitor.visit(entry);
}
- if (classSourceVisitor.hasMappings()) {
- proto.putAllClassSources(classSourceVisitor.getMapping());
+ if (classSourceVisitor.hasClassSourceMappings()) {
+ proto.putAllClassSources(classSourceVisitor.getClassSourceMapping());
+ }
+
+ if (classSourceVisitor.hasMethodSourceMappings()) {
+ proto.putAllMethodSources(classSourceVisitor.getMethodSourceMapping());
+ }
+
+ if (classSourceVisitor.hasLineSourceMappings()) {
+ proto.putAllLineSources(classSourceVisitor.getLineSourceMapping());
}
}
}