@ -13,13 +13,12 @@ module F = Format
module L = Logging
module L = Logging
module CLOpt = CommandLineOption
module CLOpt = CommandLineOption
let clear_caches () =
let clear_caches_except_lrus () =
Ondemand . LocalCache . clear () ;
Summary . OnDisk . clear_cache () ; Procname . SQLite . clear_cache () ; BufferOverrunUtils . clear_cache ()
Summary . OnDisk . clear_cache () ;
Procname . SQLite . clear_cache () ;
BufferOverrunUtils . clear_cache ()
let clear_caches () = Ondemand . LocalCache . clear () ; clear_caches_except_lrus ()
let analyze_target : ( SchedulerTypes . target , Procname . t ) Tasks . doer =
let analyze_target : ( SchedulerTypes . target , Procname . t ) Tasks . doer =
let analyze_source_file exe_env source_file =
let analyze_source_file exe_env source_file =
if Topl . is_active () then DB . Results_dir . init ( Topl . sourcefile () ) ;
if Topl . is_active () then DB . Results_dir . init ( Topl . sourcefile () ) ;
@ -52,7 +51,7 @@ let analyze_target : (SchedulerTypes.target, Procname.t) Tasks.doer =
fun target ->
fun target ->
let exe_env = Exe_env . mk () in
let exe_env = Exe_env . mk () in
(* clear cache for each source file to avoid it growing unboundedly *)
(* clear cache for each source file to avoid it growing unboundedly *)
clear_caches () ;
clear_caches _except_lrus () ;
match target with
match target with
| Procname procname ->
| Procname procname ->
analyze_proc_name exe_env procname
analyze_proc_name exe_env procname