added command-line option --valueflow-max-iterations to control amount of valueflow iterations / also log debug warning when iterations are being exceeded - #4557
Conversation
…unt of valueflow iterations / also log debug warning when iterations are being exceeded
|
I have the feeling users would somehow be interested to have different settings for different files. Maybe a user normally wants to have 8 iterations, but then on some files valueflow is a big problem and then the user wants to have a low value for those. |
|
That's possible. But without any data collected in daca we don't even know how many iterations are actually being performed. In our code we don't exceed it - otherwise the selfcheck would have failed. |
I envision that this will be a large feature that we don't implement quickly. One possible workflow might be like this:
|
I think that would require a Starting with actually exposing those tunable and providing feedback is a way too start. We have too many hard-coded things. |
|
Well as a undocumented flag I can allow this. There is a potential business deal that would make it possible to look considerably into performance. I have no idea when I will know if we get it or not. |
|
Packages which exceed this: http://cppcheck1.osuosl.org:8000/head-valueFlowMaxIterations I will add it to the main page with some upcoming daca-server PR. |
|
I forgot to provide the filename that experiences this. |
Fixed in #4664. |
This would allow the user to fully leverage ValueFlow (given it already has a reasonable run-time).
It is intentionally left-out of the documentation (for now) since it might lead to false positives like
DISABLE_VALUEFLOW=1.Regarding the debug message. This is not that different from other ValueFlow bailouts so we should track this. With it we can check in daca how many packages are actually exceeding the ValueFlow iterations.
I also have some improvements for the existing experimental timeout code but I will tackle that in a different PR. If you have ideas/suggestion for other tunables feel free to mention them.