sub("\\(.*$", "", called_function)
if (called_function ~ /^[a-z][a-zA-Z_0-9]+$/) {
+ # Gather full API of the target_module
Calls[called_function]++
- Calls_from[caller_module_file, called_function]++
- Caller_modules[caller_module_file]++
+
+ # Gather target call sites
+ if (called_function ~ target_fun_regex) {
+ Calls_from[caller_module_file, called_function]++
+ Caller_modules[caller_module_file]++
+ }
} else {
printf \
"[WARN] skipped an invalid erlang function name. File: \"%s\", function: \"%s\", original line: \"%s\"\n", \
print caller_module_file;
for (cf in Calls_from) {
split(cf, call, SUBSEP);
- if (call[1] == caller_module_file && call[2] ~ target_fun_regex)
+ if (call[1] == caller_module_file)
printf "%s%s\n", indent, call[2] | "sort";
}
close("sort")