Data flow: Add precise call contexts to stage 2#6586
Merged
hvitved merged 5 commits intogithub:mainfrom Sep 10, 2021
Merged
Conversation
Before:
```
[2021-08-25 09:56:29] (1395s) Tuple counts for DataFlowImpl2::Stage3::callMayFlowThroughFwd#ff/2@111fb3:
15495496 ~5% {5} r1 = SCAN DataFlowImpl2::Stage3::fwdFlowOutFromArg#fffff#reorder_0_2_4_1_3 OUTPUT In.3, In.4, In.2 'config', In.0 'call', In.1
1450611958 ~6335% {5} r2 = JOIN r1 WITH DataFlowImpl2::Stage3::fwdFlow#fffff_03412#join_rhs ON FIRST 3 OUTPUT Lhs.3 'call', Lhs.4, Lhs.2 'config', Rhs.3, Rhs.4
7043648 ~20415% {2} r3 = JOIN r2 WITH DataFlowImpl2::Stage3::fwdFlowIsEntered#fffff#reorder_0_3_4_1_2 ON FIRST 5 OUTPUT Lhs.0 'call', Lhs.2 'config'
return r3
```
After:
```
[2021-08-25 10:57:02] (2652s) Tuple counts for DataFlowImpl2::Stage3::callMayFlowThroughFwd#ff/2@d3e27b:
15495496 ~0% {6} r1 = SCAN DataFlowImpl2::Stage3::fwdFlowOutFromArg#fffff#reorder_0_2_4_1_3 OUTPUT In.0 'call', In.1, In.2 'config', In.3, In.4, In.2 'config'
9236888 ~22% {7} r2 = JOIN r1 WITH DataFlowImpl2::Stage3::fwdFlowIsEntered#fffff#reorder_0_3_4_1_2 ON FIRST 3 OUTPUT Lhs.3, Rhs.3, Rhs.4, Lhs.4, Lhs.5, Lhs.0 'call', Lhs.2 'config'
7043648 ~20415% {2} r3 = JOIN r2 WITH DataFlowImpl2::Stage3::fwdFlow#fffff ON FIRST 5 OUTPUT Lhs.5 'call', Lhs.6 'config'
return r3
```
tamasvajk
previously approved these changes
Sep 9, 2021
Contributor
tamasvajk
left a comment
There was a problem hiding this comment.
LGTM
This is a low confidence approval, you might want to wait for another approval before merging.
aschackmull
reviewed
Sep 9, 2021
csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll
Outdated
Show resolved
Hide resolved
aschackmull
requested changes
Sep 9, 2021
Contributor
aschackmull
left a comment
There was a problem hiding this comment.
The join-order fix looks broken to me.
aschackmull
approved these changes
Sep 10, 2021
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.
The motivation for this PR is to revert the temporary virtual dispatch cap put in place for C#. The change mostly makes a difference for DBs with huge virtual dispatch fan-out. The timings below are for a proprietary C# database.
Before this PR:
First commit of this PR (revert https://github.com//pull/6394):
This PR:
https://jenkins.internal.semmle.com/job/Changes/job/CSharp-Differences/1299/ (first commit against base)
https://jenkins.internal.semmle.com/job/Changes/job/CSharp-Differences/1312/ (PR against first commit)
https://jenkins.internal.semmle.com/job/Changes/job/CPP-Differences/2235/
https://jenkins.internal.semmle.com/job/Changes/job/Java-Differences/1579/
https://jenkins.internal.semmle.com/job/Changes/job/Python-Differences/682/