FlowDroid
FlowDroid copied to clipboard
How to measure accurate time required to construct callgraph?
Hello @StevenArzt ! FlowDroid by default gives the following: Callgraph construction took 0 seconds // for all the applications being analyzed (a set of 50 different apps) callgraph construction is the same irrespective of the apps being analyzed and callgraph being used. Furthermore, It also gives: Collecting callbacks and building a callgraph took 18 seconds // this time is different for all apps being analyzed and callgraph being used. So, I need to measure the accurate time taken to construct the callgraph. What is the best way to do this? Any suggestion Please!
FlowDroid uses an iterative approach for building the callgraph. It first detects the entry points in the Android components (activities, services, etc.) of the app and builds a callgraph from that list. It then enumerates callback registrations that are reachable inside this initial callgraph, adds the respective callbacks to its model, and builds the callgaph again. This process is repeated until a fixpoint is reached, i.e., no more previously-unseen callback registration sites are found. Therefore, it makes little sense to talk about callgraph generation alone. That's also why FlowDroid reports that accumulated timing that you observed.
Thanks, @StevenArzt ! for your precise and helpful information. So, can I consider time required for collecting callbacks and building a callgraph as the time taken for constructing a callgraph?
Yes.
By the way, if you use FlowDroid as an API, you can get all of that data fro mthe InfoflowResults
object and don't need to parse command-line output.
Thank you @StevenArzt !
Hello @StevenArzt ! I have followed the same procedure to measure the time for call graph construction. Based on my observations, RTA is taking much more time than other precise call graphs like SPARK or GEOM and conservative call graphs like CHA. Is this observation surprising or may it occur as such?