X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.runtime%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fruntime%2Fprofiling%2FBranchPoint.java;fp=bundles%2Forg.simantics.scl.runtime%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fruntime%2Fprofiling%2FBranchPoint.java;h=77b8f80ef7f99abf25fd83062c17331b9d60b26c;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/profiling/BranchPoint.java b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/profiling/BranchPoint.java new file mode 100644 index 000000000..77b8f80ef --- /dev/null +++ b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/profiling/BranchPoint.java @@ -0,0 +1,23 @@ +package org.simantics.scl.runtime.profiling; + +public class BranchPoint { + public static final BranchPoint[] EMPTY_ARRAY = new BranchPoint[0]; + + public final long location; + public final int codeSize; + public final BranchPoint[] children; + + public int visitCounter; + + public BranchPoint(long location, int codeSize, BranchPoint[] children) { + this.location = location; + this.codeSize = codeSize; + this.children = children; + } + + public void resetVisitCountersRecursively() { + visitCounter = 0; + for(BranchPoint branchPoint : children) + branchPoint.resetVisitCountersRecursively(); + } +}