Repository navigation
Use function environment so Java functions show up in profile. - #3017
Open
toinehartman wants to merge 5 commits into
Open
toinehartman wants to merge 5 commits into
toinehartman wants to merge 5 commits into
Conversation
Co-authored-by: Sung-Shik Jongmans <sung-shik.jongmans@swat.engineering>
toinehartman
commented
Nov 23, 2026
| var currentAST = ctx.getCurrentAST(); | ||
| var env = new Environment(old, old, currentAST != null ? currentAST.getLocation() : null, getAst().getLocation(), name, true); | ||
| ctx.setCurrentEnvt(env); | ||
| ctx.setCurrentAST(getAst()); // otherwise it becomes the final parameter of the call site |
Member
Author
There was a problem hiding this comment.
I think this is what we're doing now; setting the location of the AST as the call site. Why is this a problem?
Member
There was a problem hiding this comment.
@jurgenvinju do you remember the background of this comment?
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3017 +/- ##
=======================================
Coverage 46% 46%
- Complexity 6933 6937 +4
=======================================
Files 851 851
Lines 69376 69376
Branches 10110 10111 +1
=======================================
+ Hits 32178 32192 +14
+ Misses 34764 34748 -16
- Partials 2434 2436 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
toinehartman
marked this pull request as ready for review
November 23, 2026 16:08
DavyLandman
reviewed
Nov 24, 2026
toinehartman
force-pushed
the
fix/java-functions-in-profile
branch
from
November 24, 2026 14:03
846083d to
876c2cd
Compare
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Use a function environment for
JavaMethodsuch that they show up properly in the function profile.Compare with profile in #3016:
Compare with flame graph in #3016:

Closes #3016
Joint work with @sungshik.